|
@@ -140,7 +140,7 @@ use think\App;class CatPlat extends Base{
|
|
|
// return error_show(1004,"参数 fund_code 不能为空");
|
|
|
// }
|
|
|
if($sale_rate> $ist['sale_rate']){
|
|
|
- $list= $this->checkGood($cat_id,$sale_rate);
|
|
|
+ $list= $this->checkGood($cat_id,$sale_rate,$plat_id);
|
|
|
if(!empty($list)){
|
|
|
return app_show(10004,"存在不满足毛利率得商品价格",["skuCode"=>$list]);
|
|
|
}
|
|
@@ -350,9 +350,9 @@ use think\App;class CatPlat extends Base{
|
|
|
return app_show(0, "获取成功",["list"=>$data,"count"=>$count]);
|
|
|
}
|
|
|
|
|
|
- public function checkGood($catid,$sale_rate){
|
|
|
+ public function checkGood($catid,$sale_rate,$plat_id){
|
|
|
$good =Db::name("platform_youzan")->alias("a")->leftJoin("good_basic b","a.spuCode=b.spuCode")
|
|
|
- ->where(["b.cat_id"=>$catid,"a.exam_status"=>6,"a.is_del"=>0])->field("a.spuCode,a.skuCode,b.good_name,a.start_sale_num,final_price")
|
|
|
+ ->where(["b.cat_id"=>$catid,"a.platform_id"=>$plat_id,"a.exam_status"=>6,"a.is_del"=>0])->field("a.spuCode,a.skuCode,b.good_name,a.start_sale_num,final_price")
|
|
|
->select()->toArray();
|
|
|
$spucode=[];
|
|
|
if(!empty($good)){
|