|
|
@@ -125,7 +125,7 @@ class ViolationStore extends Controller
|
|
|
$store_scope = request('store_scope', '');
|
|
|
$all_data['store_scope'] = $store_scope;
|
|
|
//查询是否存在
|
|
|
- $map = ['store_name' => $all_data['store_name'], 'company_name' => $all_data['company_name']];
|
|
|
+ $map = ['company_name' => $all_data['company_name']];
|
|
|
$data = $ViolationStoreModel->where($map)->first();
|
|
|
if ($data) return json_send(['code' => 'error', 'msg' => '记录已存在']);
|
|
|
// 写入数据表
|
|
|
@@ -153,7 +153,7 @@ class ViolationStore extends Controller
|
|
|
$store_scope = request('store_scope','');
|
|
|
$all_data['store_scope'] = $store_scope;
|
|
|
//查询是否存在
|
|
|
- $map = ['store_name' => $all_data['store_name'], 'company_name' => $all_data['company_name']];
|
|
|
+ $map = ['company_name' => $all_data['company_name']];
|
|
|
$data = $ViolationStoreModel->where($map)->where('id', '!=', $id)->first();
|
|
|
if ($data) return json_send(['code' => 'error', 'msg' => '记录已存在']);
|
|
|
// 更新数据表
|