|
@@ -142,7 +142,7 @@ use think\App;class CatPlat extends Base{
|
|
|
if($sale_rate> $ist['sale_rate']){
|
|
|
$list= $this->checkGood($cat_id,$sale_rate);
|
|
|
if(!empty($list)){
|
|
|
- return app_show(1004,"存在不满足毛利率得商品价格",["spuCode"=>$list]);
|
|
|
+ return app_show(10004,"存在不满足毛利率得商品价格",["spuCode"=>$list]);
|
|
|
}
|
|
|
}
|
|
|
$data=[
|
|
@@ -352,7 +352,7 @@ use think\App;class CatPlat extends Base{
|
|
|
|
|
|
public function checkGood($catid,$sale_rate){
|
|
|
$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.start_sale_num,final_price")
|
|
|
+ ->where(["b.cat_id"=>$catid,"a.exam_status"=>6,"a.is_del"=>0])->field("a.spuCode,a.skuCode,a.start_sale_num,final_price")
|
|
|
->select()->toArray();
|
|
|
$spucode=[];
|
|
|
if(!empty($good)){
|
|
@@ -364,7 +364,7 @@ use think\App;class CatPlat extends Base{
|
|
|
continue;
|
|
|
}
|
|
|
}
|
|
|
- $spucode[]=$value['spuCode'];
|
|
|
+ $spucode[]=$value['skuCode'];
|
|
|
}
|
|
|
}
|
|
|
return $spucode;
|