From 81c2e9dea703422f98171b0db6e4b5d180cc1886 Mon Sep 17 00:00:00 2001 From: wuhui_zzw <1760308791@qq.com> Date: Thu, 22 Feb 2024 10:30:22 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=EF=BC=9A=E7=9C=81=E5=85=AC?= =?UTF-8?q?=E5=8F=B8=E6=B7=BB=E5=8A=A0=E7=9C=81=E5=85=AC=E5=8F=B8=E5=90=8D?= =?UTF-8?q?=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/repositories/marketing/AgentRepository.php | 6 ++++-- app/controller/admin/marketing/Agent.php | 7 ++++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/app/common/repositories/marketing/AgentRepository.php b/app/common/repositories/marketing/AgentRepository.php index c4b6daa..59ce1e6 100644 --- a/app/common/repositories/marketing/AgentRepository.php +++ b/app/common/repositories/marketing/AgentRepository.php @@ -173,7 +173,8 @@ class AgentRepository extends BaseRepository{ "address", "lat", "lng", - "mer_id" + "mer_id", + 'province_corporate_name' ]); $updateInfo = array_intersect_key($data, $keys); Agent::update($updateInfo,['id'=>$agentId]); @@ -213,7 +214,8 @@ class AgentRepository extends BaseRepository{ "address", "lat", "lng", - "mer_id" + "mer_id", + 'province_corporate_name' ]); $eightUpdateIds = []; // 循环:区分对应的操作 diff --git a/app/controller/admin/marketing/Agent.php b/app/controller/admin/marketing/Agent.php index 709ead8..cf49a71 100644 --- a/app/controller/admin/marketing/Agent.php +++ b/app/controller/admin/marketing/Agent.php @@ -63,7 +63,8 @@ class Agent extends BaseController{ 'lat', 'lng', ['mer_id', 0], - ['mer_id_list', []] + ['mer_id_list', []], + ['province_corporate_name',''] ]); $agentId = (int)$this->request->param('id'); $childrenList = $this->request->param('children_list'); @@ -86,6 +87,8 @@ class Agent extends BaseController{ // if((float)$childrenItem['agent_stock'] <= 0) throw new ValidateException('发起人的股份必须大于0!'); break; case 2: + if(empty($childrenItem['province_corporate_name'])) throw new ValidateException('请输入省公司名称!'); + break; case 3: case 4: // if((float)$childrenItem['province_id'] <= 0) throw new ValidateException('请完善地区信息!'); @@ -210,6 +213,8 @@ class Agent extends BaseController{ // 判断:根据当前角色判断 数据 switch((int)$data['agent_type']){ case 2: + if(empty($data['province_corporate_name'])) throw new ValidateException('请输入省公司名称!'); + break; case 3: case 4: // if((float)$data['province_id'] <= 0) throw new ValidateException('请完善地区信息!');