|
@@ -1471,6 +1471,11 @@ class Goodup extends Base
|
|
|
if ($data['is_gold_price'] == 1) {
|
|
|
$gold = Db::name("gold_price1")->where(["type" => $data['noble_metal'], "status" => 1, "is_del" => 0])->order("addtime desc")->find();
|
|
|
}
|
|
|
+ $data['cgd_price'] = 0;
|
|
|
+ if($data['create_source']==1){
|
|
|
+ $data['cgd_price'] = Db::name("purchease_order")->where(["spuCode"=>$supcode,"order_type"=>3])->value
|
|
|
+ ("good_price",0);
|
|
|
+ }
|
|
|
$data['gold_price'] =isset($gold["price"])?$gold["price"]:0;
|
|
|
$speclist=[];
|
|
|
if(!empty($spec)){
|
|
@@ -1565,11 +1570,17 @@ class Goodup extends Base
|
|
|
if($platform==""){
|
|
|
return error_show(1004,"参数platform不能为空");
|
|
|
}
|
|
|
- $spuCode =isset($this->post['codes'])&&!empty($this->post['codes'])? $this->post['codes']:"";
|
|
|
- if($spuCode===''){
|
|
|
- return error_show(1004,"参数codes不能为空");
|
|
|
+// $spuCode =isset($this->post['codes'])&&!empty($this->post['codes'])? $this->post['codes']:"";
|
|
|
+// if($spuCode===''){
|
|
|
+// return error_show(1004,"参数codes不能为空");
|
|
|
+// }
|
|
|
+
|
|
|
+ $goodinfo =isset($this->post['goodinfo'])&&!empty($this->post['goodinfo'])? $this->post['goodinfo']:[];
|
|
|
+ if(empty($goodinfo)){
|
|
|
+ return error_show(1004,'参数goodinfo不能为空');
|
|
|
}
|
|
|
- $datas = Db::name("good_basic")->where(["spuCode"=>$spuCode,"is_del"=>0])->select()->toArray();
|
|
|
+ $datas = Db::name("good_basic")->where(["spuCode"=>array_column($goodinfo,"spuCode"),"is_del"=>0])->select()
|
|
|
+ ->toArray();
|
|
|
if(empty($datas)){
|
|
|
return error_show(1004,"未找到商品数据");
|
|
|
}
|
|
@@ -1581,10 +1592,11 @@ class Goodup extends Base
|
|
|
if($online_remark===""){
|
|
|
return error_show(1004,"参数online_remark不能为空");
|
|
|
}
|
|
|
+
|
|
|
$fixed = isset($this->post['is_fixed'])&&$this->post['is_fixed']!==''? intval($this->post['is_fixed']):1;
|
|
|
if($fixed==1){
|
|
|
//使用实时金价
|
|
|
- $nake=Db::name('good_nake')->where(['spuCode'=> $spuCode,'is_del'=>0,"nake_fee"=>0])->findOrEmpty();
|
|
|
+ $nake=Db::name('good_nake')->where(['spuCode'=> array_column($goodinfo,'spuCode'),'is_del'=>0,"nake_fee"=>0])->findOrEmpty();
|
|
|
if(!empty($nake)) return error_show(1004,'一口价商品请先完善商品成本单价');
|
|
|
|
|
|
}
|
|
@@ -1612,11 +1624,12 @@ class Goodup extends Base
|
|
|
'online_reason'=>$online_reason,
|
|
|
'online_remark'=>$online_remark,
|
|
|
'good_data'=>$datas,
|
|
|
+ 'good_info'=>$goodinfo,
|
|
|
'createrid'=>$createrid,
|
|
|
'creater'=>$creater,
|
|
|
]);
|
|
|
}
|
|
|
-
|
|
|
+ $market = array_column( $goodinfo,"market_url",'spuCode');
|
|
|
|
|
|
$data=[];
|
|
|
$isonline=[];
|
|
@@ -1672,6 +1685,7 @@ class Goodup extends Base
|
|
|
"exam_status"=>$count>0 ?2:1,
|
|
|
"is_online"=>0,
|
|
|
"is_fixed"=>$fixed,
|
|
|
+ 'market_url'=>$market[$value['spuCode']]??"",
|
|
|
"status"=>1,
|
|
|
"is_del"=>0,
|
|
|
"creater"=>$creater,
|
|
@@ -2727,14 +2741,14 @@ class Goodup extends Base
|
|
|
$param = $this->request->only([
|
|
|
'platform',
|
|
|
"is_fixed",
|
|
|
- 'codes',
|
|
|
+ 'goodinfo',
|
|
|
'online_reason',
|
|
|
'online_remark',
|
|
|
'token'], 'post', 'trim');
|
|
|
|
|
|
$val = Validate::rule([
|
|
|
'platform|所选上线平台' => 'require|number|gt:0',
|
|
|
- 'codes|所选上线商品编号' => 'require',
|
|
|
+ 'goodinfo|所选上线商品编号' => 'require|array',
|
|
|
'is_fixed|是否一口价' => 'require|number|in:0,1',
|
|
|
'online_reason|上线原因' => 'require',
|
|
|
'online_remark|上线备注' => 'require',
|
|
@@ -2742,13 +2756,13 @@ class Goodup extends Base
|
|
|
]);
|
|
|
|
|
|
if (!$val->check($param)) return error_show(1004, $val->getError());
|
|
|
-
|
|
|
+ $codes= array_column($param['goodinfo'],"spuCode");
|
|
|
$good_zixun_list = Db::name("good_zixun")
|
|
|
->where(["is_del" => 0])
|
|
|
- ->whereIn('spuCode', $param['codes'])
|
|
|
+ ->whereIn('spuCode',$codes)
|
|
|
->column('*', 'spuCode');
|
|
|
if (empty($good_zixun_list)) return error_show(1004, "未找到相关咨询商品数据");
|
|
|
- $a = array_diff($param['codes'], array_keys($good_zixun_list));
|
|
|
+ $a = array_diff($codes, array_keys($good_zixun_list));
|
|
|
|
|
|
if (!empty($a)) return error_show(1005, '该咨询商品不存在' . implode(',', $a));
|
|
|
|
|
@@ -2756,7 +2770,7 @@ class Goodup extends Base
|
|
|
->alias('gp')
|
|
|
->field('gp.id,gp.spuCode,gb.good_name,gb.good_img,gp.exam_status')
|
|
|
->where(["gp.platform_code" => $param['platform'], "gp.is_del" => 0])
|
|
|
- ->whereIn('gp.spuCode', $param['codes'])
|
|
|
+ ->whereIn('gp.spuCode', $codes)
|
|
|
->leftJoin('good_basic gb', 'gb.spuCode=gp.spuCode AND gb.is_del=0')
|
|
|
->select()
|
|
|
->toArray();
|
|
@@ -2803,39 +2817,40 @@ class Goodup extends Base
|
|
|
|
|
|
$all_nakes = Db::name("good_nake")
|
|
|
->where(["is_del" => 0])->fetchSql()
|
|
|
- ->whereIn('spuCode', $param['codes'])
|
|
|
+ ->whereIn('spuCode',$codes)
|
|
|
->group('spuCode')
|
|
|
->column('count(`id`) total', 'spuCode');
|
|
|
|
|
|
$all_good = Db::name('good')
|
|
|
->where('is_del', 0)
|
|
|
- ->whereIn('spuCode', $param['codes'])
|
|
|
+ ->whereIn('spuCode', $codes)
|
|
|
->column('id', 'spuCode');
|
|
|
|
|
|
if (!empty($all_good)) return error_show(1004, '请从商品成本提交该商品上线');
|
|
|
|
|
|
$all_good_basic = Db::name('good_basic')
|
|
|
->where('is_del', 0)
|
|
|
- ->whereIn('spuCode', $param['codes'])
|
|
|
+ ->whereIn('spuCode', $codes)
|
|
|
->column('id', 'spuCode');
|
|
|
if (!empty($all_good_basic)) return error_show(1004, '请从商品成本提交该商品上线');
|
|
|
|
|
|
- foreach ($param['codes'] as $value) {
|
|
|
- if($good_zixun_list[$value]['is_gold_price']==1&&$param['is_fixed']==1){
|
|
|
- return error_show(1004," {$good_zixun_list[$value]['good_name']}商品使用实时金价,不可使用一口价!");
|
|
|
+ foreach ($param['goodinfo'] as $value) {
|
|
|
+ if($good_zixun_list[$value['spuCode']]['is_gold_price']==1&&$param['is_fixed']==1){
|
|
|
+ return error_show(1004," {$good_zixun_list[$value['spuCode']]['good_name']}商品使用实时金价,不可使用一口价!");
|
|
|
}
|
|
|
//改变编码规则,将原来的skuCode后两位换成序列号
|
|
|
//str_pad字符串填充
|
|
|
$skuCode = makeNo("SN");
|
|
|
$skuCode = substr($skuCode, 0, -2) . str_pad($i, 2, '0', STR_PAD_LEFT);
|
|
|
$data[] = [
|
|
|
- "spuCode" => $value,
|
|
|
+ "spuCode" => $value['spuCode'],
|
|
|
"skuCode" => $skuCode,
|
|
|
"platform_code" => $param['platform'],
|
|
|
"online_reason" => $param['online_reason'],
|
|
|
"online_remark" => $param['online_remark'],
|
|
|
"exam_status" => isset($all_nakes[$value]) ? ($all_nakes[$value] > 0 ? 2 : 1) : 1,
|
|
|
"is_online" => 0,
|
|
|
+ "market_url" =>$value['market_url'],
|
|
|
"is_fixed" =>$param['is_fixed'],
|
|
|
"status" => 0,
|
|
|
"is_del" => 0,
|
|
@@ -2847,55 +2862,55 @@ class Goodup extends Base
|
|
|
|
|
|
|
|
|
//good表
|
|
|
- if (!isset($all_good[$value])) {
|
|
|
+ if (!isset($all_good[$value['spuCode']])) {
|
|
|
$good_insert_data[] = [
|
|
|
- 'spuCode' => $good_zixun_list[$value]['spuCode'],
|
|
|
- 'good_code' => $good_zixun_list[$value]['good_code'],
|
|
|
- 'good_name' => $good_zixun_list[$value]['good_name'],
|
|
|
- 'cat_id' => $good_zixun_list[$value]['cat_id'],
|
|
|
- 'brand_id' => $good_zixun_list[$value]['brand_id'],
|
|
|
- 'good_unit' => $good_zixun_list[$value]['good_unit'],
|
|
|
- 'good_type' => $good_zixun_list[$value]['good_type'],
|
|
|
- 'companyNo' => $good_zixun_list[$value]['companyNo'],
|
|
|
- 'companyName' => $good_zixun_list[$value]['companyName'],
|
|
|
- 'moq' => $good_zixun_list[$value]['moq'],
|
|
|
- 'customized' => $good_zixun_list[$value]['customized'],
|
|
|
- 'tax' => $good_zixun_list[$value]['tax'],
|
|
|
- 'supplierNo' => $good_zixun_list[$value]['supplierNo'],
|
|
|
- 'supplierName' => $good_zixun_list[$value]['supplierName'],
|
|
|
- 'is_auth' => $good_zixun_list[$value]['is_auth'],
|
|
|
+ 'spuCode' => $good_zixun_list[$value['spuCode']]['spuCode'],
|
|
|
+ 'good_code' => $good_zixun_list[$value['spuCode']]['good_code'],
|
|
|
+ 'good_name' => $good_zixun_list[$value['spuCode']]['good_name'],
|
|
|
+ 'cat_id' => $good_zixun_list[$value['spuCode']]['cat_id'],
|
|
|
+ 'brand_id' => $good_zixun_list[$value['spuCode']]['brand_id'],
|
|
|
+ 'good_unit' => $good_zixun_list[$value['spuCode']]['good_unit'],
|
|
|
+ 'good_type' => $good_zixun_list[$value['spuCode']]['good_type'],
|
|
|
+ 'companyNo' => $good_zixun_list[$value['spuCode']]['companyNo'],
|
|
|
+ 'companyName' => $good_zixun_list[$value['spuCode']]['companyName'],
|
|
|
+ 'moq' => $good_zixun_list[$value['spuCode']]['moq'],
|
|
|
+ 'customized' => $good_zixun_list[$value['spuCode']]['customized'],
|
|
|
+ 'tax' => $good_zixun_list[$value['spuCode']]['tax'],
|
|
|
+ 'supplierNo' => $good_zixun_list[$value['spuCode']]['supplierNo'],
|
|
|
+ 'supplierName' => $good_zixun_list[$value['spuCode']]['supplierName'],
|
|
|
+ 'is_auth' => $good_zixun_list[$value['spuCode']]['is_auth'],
|
|
|
'is_stock' => '',
|
|
|
- 'auth_img' => $good_zixun_list[$value]['auth_img'],
|
|
|
+ 'auth_img' => $good_zixun_list[$value['spuCode']]['auth_img'],
|
|
|
'after_sales' => '',
|
|
|
- 'craft_desc' => $good_zixun_list[$value]['craft_desc'],
|
|
|
- 'good_remark' => $good_zixun_list[$value]['good_remark'],
|
|
|
+ 'craft_desc' => $good_zixun_list[$value['spuCode']]['craft_desc'],
|
|
|
+ 'good_remark' => $good_zixun_list[$value['spuCode']]['good_remark'],
|
|
|
'good_size' => '',
|
|
|
- 'weight' => $good_zixun_list[$value]['weight'],
|
|
|
+ 'weight' => $good_zixun_list[$value['spuCode']]['weight'],
|
|
|
'packing_way' => '',
|
|
|
'packing_size' => '',
|
|
|
'packing_spec' => '',
|
|
|
'packing_list' => '',
|
|
|
'packing_weight' => '',
|
|
|
'good_bar' => '',
|
|
|
- 'supply_area' => $good_zixun_list[$value]['supply_area'],
|
|
|
+ 'supply_area' => $good_zixun_list[$value['spuCode']]['supply_area'],
|
|
|
'delivery_place' => '',
|
|
|
'origin_place' => '',
|
|
|
'delivery_day' => 0,
|
|
|
'lead_time' => '',
|
|
|
'sample_day' => '',
|
|
|
'sample_fee' => '',
|
|
|
- 'good_img' => $good_zixun_list[$value]['good_img'],
|
|
|
- 'good_thumb_img' => $good_zixun_list[$value]['good_thumb_img'],
|
|
|
- 'good_info_img' => $good_zixun_list[$value]['good_info_img'],
|
|
|
+ 'good_img' => $good_zixun_list[$value['spuCode']]['good_img'],
|
|
|
+ 'good_thumb_img' => $good_zixun_list[$value['spuCode']]['good_thumb_img'],
|
|
|
+ 'good_info_img' => $good_zixun_list[$value['spuCode']]['good_info_img'],
|
|
|
'cert_fee' => '',
|
|
|
'packing_fee' => '',
|
|
|
'cost_fee' => '',
|
|
|
'mark_fee' => '',
|
|
|
'demo_fee' => '',
|
|
|
'open_fee' => '',
|
|
|
- 'noble_metal' => $good_zixun_list[$value]['noble_metal'],
|
|
|
- 'noble_weight' => $good_zixun_list[$value]['good_weight'],
|
|
|
- 'is_gold_price' => $good_zixun_list[$value]['is_gold_price'],
|
|
|
+ 'noble_metal' => $good_zixun_list[$value['spuCode']]['noble_metal'],
|
|
|
+ 'noble_weight' => $good_zixun_list[$value['spuCode']]['good_weight'],
|
|
|
+ 'is_gold_price' => $good_zixun_list[$value['spuCode']]['is_gold_price'],
|
|
|
'cgd_gold_price' => '',
|
|
|
'market_price' => '',
|
|
|
'nake_price' => '',
|
|
@@ -2910,60 +2925,60 @@ class Goodup extends Base
|
|
|
'addtime' => date('Y-m-d H:i:s'),
|
|
|
'updatetime' => date('Y-m-d H:i:s'),
|
|
|
'is_exclusive' => '',
|
|
|
- 'is_diff' => $good_zixun_list[$value]['is_diff'],
|
|
|
- 'config' => $good_zixun_list[$value]['config'],
|
|
|
- 'other_config' => $good_zixun_list[$value]['other_config'],
|
|
|
+ 'is_diff' => $good_zixun_list[$value['spuCode']]['is_diff'],
|
|
|
+ 'config' => $good_zixun_list[$value['spuCode']]['config'],
|
|
|
+ 'other_config' => $good_zixun_list[$value['spuCode']]['other_config'],
|
|
|
];
|
|
|
}
|
|
|
|
|
|
//good_basic表
|
|
|
- if (!isset($all_good_basic[$value])) {
|
|
|
+ if (!isset($all_good_basic[$value['spuCode']])) {
|
|
|
$good_basic_insert_data[] = [
|
|
|
- 'spuCode' => $good_zixun_list[$value]['spuCode'],
|
|
|
- 'good_code' => $good_zixun_list[$value]['good_code'],
|
|
|
- 'good_name' => $good_zixun_list[$value]['good_name'],
|
|
|
- 'cat_id' => $good_zixun_list[$value]['cat_id'],
|
|
|
- 'brand_id' => $good_zixun_list[$value]['brand_id'],
|
|
|
- 'companyNo' => $good_zixun_list[$value]['companyNo'],
|
|
|
- 'companyName' => $good_zixun_list[$value]['companyName'],
|
|
|
- 'good_unit' => $good_zixun_list[$value]['good_unit'],
|
|
|
- 'good_type' => $good_zixun_list[$value]['good_type'],
|
|
|
- 'moq' => $good_zixun_list[$value]['moq'],
|
|
|
- 'customized' => $good_zixun_list[$value]['customized'],
|
|
|
- 'tax' => $good_zixun_list[$value]['tax'],
|
|
|
- 'supplierNo' => $good_zixun_list[$value]['supplierNo'],
|
|
|
- 'supplierName' => $good_zixun_list[$value]['supplierName'],
|
|
|
- 'is_auth' => $good_zixun_list[$value]['is_auth'],
|
|
|
- 'auth_img' => $good_zixun_list[$value]['auth_img'],
|
|
|
+ 'spuCode' => $value['spuCode'],
|
|
|
+ 'good_code' => $good_zixun_list[$value['spuCode']]['good_code'],
|
|
|
+ 'good_name' => $good_zixun_list[$value['spuCode']]['good_name'],
|
|
|
+ 'cat_id' => $good_zixun_list[$value['spuCode']]['cat_id'],
|
|
|
+ 'brand_id' => $good_zixun_list[$value['spuCode']]['brand_id'],
|
|
|
+ 'companyNo' => $good_zixun_list[$value['spuCode']]['companyNo'],
|
|
|
+ 'companyName' => $good_zixun_list[$value['spuCode']]['companyName'],
|
|
|
+ 'good_unit' => $good_zixun_list[$value['spuCode']]['good_unit'],
|
|
|
+ 'good_type' => $good_zixun_list[$value['spuCode']]['good_type'],
|
|
|
+ 'moq' => $good_zixun_list[$value['spuCode']]['moq'],
|
|
|
+ 'customized' => $good_zixun_list[$value['spuCode']]['customized'],
|
|
|
+ 'tax' => $good_zixun_list[$value['spuCode']]['tax'],
|
|
|
+ 'supplierNo' => $good_zixun_list[$value['spuCode']]['supplierNo'],
|
|
|
+ 'supplierName' => $good_zixun_list[$value['spuCode']]['supplierName'],
|
|
|
+ 'is_auth' => $good_zixun_list[$value['spuCode']]['is_auth'],
|
|
|
+ 'auth_img' => $good_zixun_list[$value['spuCode']]['auth_img'],
|
|
|
'after_sales' => '',
|
|
|
- 'craft_desc' => $good_zixun_list[$value]['craft_desc'],
|
|
|
- 'good_remark' => $good_zixun_list[$value]['good_remark'],
|
|
|
- 'weight' => $good_zixun_list[$value]['weight'],
|
|
|
+ 'craft_desc' => $good_zixun_list[$value['spuCode']]['craft_desc'],
|
|
|
+ 'good_remark' => $good_zixun_list[$value['spuCode']]['good_remark'],
|
|
|
+ 'weight' => $good_zixun_list[$value['spuCode']]['weight'],
|
|
|
'packing_way' => '',
|
|
|
'packing_size' => '',
|
|
|
'packing_spec' => '',
|
|
|
'packing_list' => '',
|
|
|
'packing_weight' => '',
|
|
|
'good_bar' => '',
|
|
|
- 'supply_area' => $good_zixun_list[$value]['supply_area'],
|
|
|
+ 'supply_area' => $good_zixun_list[$value['spuCode']]['supply_area'],
|
|
|
'delivery_place' => '',
|
|
|
'origin_place' => '',
|
|
|
'delivery_day' => '',
|
|
|
'lead_time' => '',
|
|
|
'sample_day' => '',
|
|
|
'sample_fee' => '',
|
|
|
- 'good_img' => '',//$good_zixun_list[$value]['good_img'],
|
|
|
- 'good_thumb_img' => $good_zixun_list[$value]['good_thumb_img'],
|
|
|
- 'good_info_img' => $good_zixun_list[$value]['good_img'],//商品主图对应到商品详情
|
|
|
+ 'good_img' => '',//$good_zixun_list[$value['spuCode']]['good_img'],
|
|
|
+ 'good_thumb_img' => $good_zixun_list[$value['spuCode']]['good_thumb_img'],
|
|
|
+ 'good_info_img' => $good_zixun_list[$value['spuCode']]['good_img'],//商品主图对应到商品详情
|
|
|
'cert_fee' => '',
|
|
|
'packing_fee' => '',
|
|
|
'cost_fee' => '',
|
|
|
'mark_fee' => '',
|
|
|
'demo_fee' => '',
|
|
|
'open_fee' => '',
|
|
|
- 'noble_metal' => $good_zixun_list[$value]['noble_metal'],
|
|
|
- 'noble_weight' => $good_zixun_list[$value]['good_weight'],
|
|
|
- 'is_gold_price' => $good_zixun_list[$value]['is_gold_price'],
|
|
|
+ 'noble_metal' => $good_zixun_list[$value['spuCode']]['noble_metal'],
|
|
|
+ 'noble_weight' => $good_zixun_list[$value['spuCode']]['good_weight'],
|
|
|
+ 'is_gold_price' => $good_zixun_list[$value['spuCode']]['is_gold_price'],
|
|
|
'cgd_gold_price' => '',
|
|
|
'market_price' => '',
|
|
|
'nake_price' => '',
|
|
@@ -2977,26 +2992,26 @@ class Goodup extends Base
|
|
|
'is_del' => 0,
|
|
|
'addtime' => date('Y-m-d H:i:s'),
|
|
|
'updatetime' => date('Y-m-d H:i:s'),
|
|
|
- 'is_diff' => $good_zixun_list[$value]['is_diff'],
|
|
|
- 'config' => $good_zixun_list[$value]['config'],
|
|
|
- 'other_config' => $good_zixun_list[$value]['other_config'],
|
|
|
+ 'is_diff' => $good_zixun_list[$value['spuCode']]['is_diff'],
|
|
|
+ 'config' => $good_zixun_list[$value['spuCode']]['config'],
|
|
|
+ 'other_config' => $good_zixun_list[$value['spuCode']]['other_config'],
|
|
|
];
|
|
|
}
|
|
|
|
|
|
//good_spec
|
|
|
- if (!empty($good_zixun_list[$value]['specinfo'])) {
|
|
|
+ if (!empty($good_zixun_list[$value['spuCode']]['specinfo'])) {
|
|
|
|
|
|
- $spec_list = json_decode($good_zixun_list[$value]['specinfo'], true);
|
|
|
+ $spec_list = json_decode($good_zixun_list[$value['spuCode']]['specinfo'], true);
|
|
|
|
|
|
foreach ($spec_list as $spec) {
|
|
|
$specid = $spec['specid']??($spec['spec_id']??"");
|
|
|
$temp = Db::name('good_spec')
|
|
|
->field('id')
|
|
|
- ->where(['spuCode' => $value, 'spec_id' => $specid, 'spec_value_id' => $spec['spec_value_id'], 'is_del' => 0])
|
|
|
+ ->where(['spuCode' => $value['spuCode'], 'spec_id' => $specid, 'spec_value_id' => $spec['spec_value_id'], 'is_del' => 0])
|
|
|
->find();
|
|
|
if (!empty($temp)) {
|
|
|
$good_spec_insert_data[] = [
|
|
|
- 'spuCode' => $value,
|
|
|
+ 'spuCode' => $value['spuCode'],
|
|
|
'spec_id' => $specid,
|
|
|
'spec_value_id' => $spec['spec_value_id'],
|
|
|
'is_del' => 0,
|
|
@@ -3020,7 +3035,7 @@ class Goodup extends Base
|
|
|
|
|
|
Db::name("good_zixun")
|
|
|
->where(["is_del" => 0, 'status' => 1])
|
|
|
- ->whereIn('spuCode', $param['codes'])
|
|
|
+ ->whereIn('spuCode', $codes)
|
|
|
->update(['status' => 2, 'updatetime' => date('Y-m-d H:i:s')]);
|
|
|
|
|
|
if (!empty($good_insert_data)) Db::name('good')->insertAll($good_insert_data);
|