edit-sylive-bw

This commit is contained in:
lccsw
2023-05-06 16:01:51 +08:00
parent 30e525fd35
commit 71ab55b503
+12 -7
View File
@@ -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);