From 71ab55b50345fab1575907464d39ff94b802bf3a Mon Sep 17 00:00:00 2001 From: lccsw <805383944@qq.com> Date: Sat, 6 May 2023 16:01:51 +0800 Subject: [PATCH] edit-sylive-bw --- api/controllers/plan/Syt.php | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/api/controllers/plan/Syt.php b/api/controllers/plan/Syt.php index 0ff21ba5..505df13d 100644 --- a/api/controllers/plan/Syt.php +++ b/api/controllers/plan/Syt.php @@ -542,6 +542,7 @@ class Syt extends CI_Controller $this->load->model('market/market_sylive_user_model', 'user_model'); $this->load->model('market/market_sylive_order_model'); $this->load->model('market/market_sylive_groups_user_model', 'groups_user_model'); + $this->load->model('market/market_sylive_groups_model', 'groups_model'); $this->load->model('market/market_sylive_organization_model'); $page = $this->input->get('page'); $size = $this->input->get('size'); @@ -549,6 +550,7 @@ class Syt extends CI_Controller !$size && $size=40; $where = [ "activityId" => 11, + "itemId" => 18, "areaId" =>0 ]; $count = $this->market_sylive_order_model->count($where); @@ -557,15 +559,16 @@ class Syt extends CI_Controller $syt = new SytApi(); foreach ($rows as $key => $val) { $gwUser = $this->user_model->get(['userId'=>$val["cfUserId"]]); - $dlrCode = ""; + $dlrCode = "79968V"; $mediaCaName = ""; $leadNo = $val["userId"]; //获取意向网点编码 if($gwUser){ $mediaCaName = $gwUser['uname']; $group_user = $this->groups_user_model->get(['activityId' => $val["activityId"], 'userId' => $val['cfUserId'], 'status' => 0]); - $biz = $this->market_sylive_organization_model->get(['organizationId'=>$group_user['bizId']]); - $dlrCode = $biz['comments']; + $group = $this->groups_model->get(["groupsId" => $group_user["groupsId"]]); + $biz = $this->market_sylive_organization_model->get(['organizationId'=>$group['originalBizId']]); + $biz["comments"] && $dlrCode = $biz['comments']; } $syt->Tj($dlrCode,"活动客户",$val["mobile"],$mediaCaName,$leadNo); $this->market_sylive_order_model->update(["areaId"=>1],["id"=>$val["id"]]); @@ -583,25 +586,27 @@ class Syt extends CI_Controller $this->load->model('market/market_sylive_user_model', 'user_model'); $this->load->model('market/market_sylive_order_model'); $this->load->model('market/market_sylive_groups_user_model', 'groups_user_model'); + $this->load->model('market/market_sylive_groups_model', 'groups_model'); $this->load->model('market/market_sylive_organization_model'); $id = $this->input->get('id'); $where = [ "activityId" => 11, - "areaId" =>0, + "itemId" => 18, "id" => $id, ]; $row = $this->market_sylive_order_model->get($where); if($row){ $gwUser = $this->user_model->get(['userId'=>$row["cfUserId"]]); - $dlrCode = ""; + $dlrCode = "79968V"; $mediaCaName = ""; $leadNo = $row["userId"]; //获取意向网点编码 if($gwUser){ $mediaCaName = $gwUser['uname']; $group_user = $this->groups_user_model->get(['activityId' => $row["activityId"], 'userId' => $row['cfUserId'], 'status' => 0]); - $biz = $this->market_sylive_organization_model->get(['organizationId'=>$group_user['bizId']]); - $dlrCode = $biz['comments']; + $group = $this->groups_model->get(["groupsId" => $group_user["groupsId"]]); + $biz = $this->market_sylive_organization_model->get(['organizationId'=>$group['originalBizId']]); + $biz["comments"] && $dlrCode = $biz['comments']; } $syt = new SytApi(); $req = $syt->Bw($dlrCode,"活动客户",$row["mobile"],$mediaCaName,$leadNo);