Quellcode durchsuchen

[智价云] 新增公司校验更新

tangyuanwang vor 5 Tagen
Ursprung
Commit
ca2b6079c7
1 geänderte Dateien mit 4 neuen und 4 gelöschten Zeilen
  1. 4 4
      app/Http/Controllers/Manager/WashConfig/ViolationStore.php

+ 4 - 4
app/Http/Controllers/Manager/WashConfig/ViolationStore.php

@@ -125,9 +125,9 @@ class ViolationStore extends Controller
         $store_scope = request('store_scope', '');
         $all_data['store_scope'] = $store_scope;
         //查询是否存在
-        $map = ['company_name' => $all_data['company_name']];
+        $map = ['social_credit_code' => $all_data['social_credit_code']];
         $data = $ViolationStoreModel->where($map)->first();
-        if ($data)     return json_send(['code' => 'error', 'msg' => '记录已存在']);
+        if ($data)     return json_send(['code' => 'error', 'msg' => '营业执照记录已存在']);
         // 写入数据表
         $result     =  $ViolationStoreModel->addViolationStore($all_data);
         // 如果操作失败
@@ -153,9 +153,9 @@ class ViolationStore extends Controller
         $store_scope = request('store_scope','');
         $all_data['store_scope'] = $store_scope;
                 //查询是否存在
-        $map = ['company_name' => $all_data['company_name']];
+        $map = ['social_credit_code' => $all_data['social_credit_code']];
         $data = $ViolationStoreModel->where($map)->where('id', '!=', $id)->first();
-        if ($data)     return json_send(['code' => 'error', 'msg' => '记录已存在']);
+        if ($data)     return json_send(['code' => 'error', 'msg' => '营业执照记录已存在']);
         // 更新数据表
         $where = ['id' => $id];
         $result =  $ViolationStoreModel->updateViolationStore($where, $all_data);