|
|
@@ -107,16 +107,18 @@ class ViolationProduct extends Model
|
|
|
DB::beginTransaction();
|
|
|
try {
|
|
|
$ViolationProductCompanyModel = new ViolationProductCompanyModel();
|
|
|
+ $store_scope = $data['store_scope'] !='' ? 2 : 1; //店铺范围1=全部店铺 2=指定店铺
|
|
|
+ $company_scope = $data['company_scope'] !='' ? 2 : 1; //公司范围1=全部公司 2=指定公司
|
|
|
$ViolationProduct->platform = $data['platform'];
|
|
|
$ViolationProduct->product_name = $data['product_name'];
|
|
|
$ViolationProduct->product_specs = $data['product_specs'];
|
|
|
- $ViolationProduct->store_scope = $data['store_scope'] !='' ? 2 : 1; //店铺范围1=全部店铺 2=指定店铺
|
|
|
- $ViolationProduct->company_scope = $data['company_scope'] !='' ? 2 : 1; //公司范围1=全部公司 2=指定公司
|
|
|
+ $ViolationProduct->store_scope = $store_scope;
|
|
|
+ $ViolationProduct->company_scope = $company_scope;
|
|
|
$ViolationProduct->update_time = time();
|
|
|
$ViolationProduct->save();
|
|
|
|
|
|
$ViolationProductCompanyModel->where('violation_product_logid', $ViolationProduct->id)->delete();
|
|
|
- if ($ViolationProduct->company_scope == 2) {
|
|
|
+ if ($company_scope == 2) {
|
|
|
$insert_company_data = [];
|
|
|
$company_scope = explode(',', $data['company_scope']);
|
|
|
foreach ($company_scope as $company_id) {
|