Commit 9de03dc6 authored by clone's avatar clone

1

parent d2332efa
......@@ -26,20 +26,14 @@ use app\model\ACollectUser;
use app\model\ASite;
use app\model\AuthGroup;
use app\model\AuthRule;
use app\model\ChatUserExt;
use app\model\Evaluate;
use app\model\GOperatingRecords;
use app\model\NoteLog;
use app\model\OBargainModel;
use app\model\OfficeFollowUpLogModel;
use app\model\OfficeUPhoneFollowUp;
use app\model\OfficeUPhoneFollowUpImg;
use app\model\SecretReport;
use app\model\UPhoneFollowUp;
use app\model\UPhoneFollowUpImg;
use app\model\UPhoneFollowUpTemporary;
use app\model\Users;
use app\task\controller\FollowUpTask;
use think\Exception;
use think\Log;
use think\Request;
......@@ -484,7 +478,7 @@ class Broker extends Basic
'agent_id' => 1,
'type' => 1,//0电话跟进 1普通跟进
'entrust_type' => 1,//委托类型 0找铺 1找办公楼
'img_arr' => []
'img_str' => ""
);*/
......@@ -495,25 +489,15 @@ class Broker extends Basic
if ($params['agent_id'] != $this->agentId) {
return $this->response("101", "身份验证失败!");
}
$img_arr = isset($params["img_arr"]) ? json_decode($params["img_arr"], true) : "";
unset($params["march_in_img"]);
$entrust_type = $params["entrust_type"];
$result = [];
if ($entrust_type == 0) {
$s_phone_follow_up = new UPhoneFollowUpTemporary($this->siteId);
$result = $s_phone_follow_up->savePhoneFollow($params);
$oImgModel = new UPhoneFollowUpImg();
} else {
$office_follow_up = new OfficeUPhoneFollowUp($this->siteId);
$result = $office_follow_up->savePhoneFollow($params);
$oImgModel = new OfficeUPhoneFollowUpImg();
}
if($img_arr && $result){
$oImgModel->addImgAll($result, 1, $img_arr);
}
if ($result > 0) {
$redis_service = new RedisCacheService();
......
......@@ -86,7 +86,7 @@ class HomePageLog extends Basic
$pageNo = empty($params['pageNo']) ? 1 : $params['pageNo'];
$pageSize = empty($params['pageSize']) ? 15 : $params['pageSize'];
$field = "id,user_id,agent_id,type,content,create_time,user_status,labels_id";
$field = "id,user_id,agent_id,type,content,create_time,user_status,labels_id,img_str";
$where_ = [];
$where = ' 1=1 ';
if (!empty($params["search_content"])) {
......@@ -150,13 +150,7 @@ class HomePageLog extends Basic
$result[$key]['img'] = '';
$result[$key]['store_name'] = '';
}
//查询跟进图片
$imgModel = new UPhoneFollowUpImg();
$img_param["img_id"] = $value["id"];
$img_param["img_type"] = 1;
$img_arr = $imgModel->getImgList($img_param, "id,img_name");
$v["img_path"] = CHAT_IMG_URL;
$result[$key]['follow_up_img_arr'] = $img_arr;
$result[$key]['img_str_path'] = CHAT_IMG_URL;
if ($if_search)
$result[$key]['create_time'] = date("Y-m-d H:i:s", $value["create_time"] / 1000);
......
......@@ -88,7 +88,7 @@ class OfficeHomePageLog extends Basic
$pageNo = empty($params['pageNo']) ? 1 : $params['pageNo'];
$pageSize = empty($params['pageSize']) ? 15 : $params['pageSize'];
$field = "id,user_id,agent_id,type,content,create_time,user_status,labels_id";
$field = "id,user_id,agent_id,type,content,create_time,user_status,labels_id,img_str";
$where = ' 1=1 ';
if (!empty($params["search_content"])) {
$search_content = trim($params['search_content']);
......@@ -129,13 +129,7 @@ class OfficeHomePageLog extends Basic
$result[$key]['img'] = '';
$result[$key]['store_name'] = '';
}
//查询跟进图片
$imgModel = new OfficeUPhoneFollowUpImg();
$img_param["img_id"] = $value["id"];
$img_param["img_type"] = 1;
$img_arr = $imgModel->getImgList($img_param, "id,img_name");
$v["img_path"] = CHAT_IMG_URL;
$result[$key]['follow_up_img_arr'] = $img_arr;
$result[$key]['img_str_path'] = CHAT_IMG_URL;
#保护期(0:保护器内 1:超过保护期)
$result[$key]['is_outstrip_twenty_four_hours'] = $user_service->isUserProtect($value['user_id']);
......
......@@ -52,6 +52,9 @@ class OfficeUPhoneFollowUp extends BaseModel
if (isset($params['create_time'])) {
$arr["create_time"] = $params["create_time"];
}
if (isset($params['img_str'])) {
$arr["img_str"] = $params["img_str"];
}
if (isset($this->siteId)) {
switch ($this->siteId) {
......
......@@ -66,6 +66,9 @@ class UPhoneFollowUpTemporary extends BaseModel
if (isset($params['create_time'])) {
$arr["create_time"] = $params["create_time"];
}
if (isset($params['img_str'])) {
$arr["img_str"] = $params["img_str"];
}
if (isset($this->siteId)) {
switch ($this->siteId) {
......
......@@ -87,6 +87,7 @@ class FollowUpTask
`labels_id` int(10) DEFAULT '0' COMMENT 'u_labels表主键',
`user_id` int(10) unsigned DEFAULT '0' COMMENT 'u_users ID用户表id',
`agent_id` int(10) unsigned DEFAULT '0' COMMENT 'agent表id',
`img_str` varchar(60) DEFAULT '' COMMENT '图片',
`province` varchar(60) DEFAULT '' COMMENT '省份',
`city` varchar(60) DEFAULT '' COMMENT '城市',
`disc` varchar(60) DEFAULT '' COMMENT '区域',
......@@ -145,8 +146,8 @@ class FollowUpTask
$isTable = $phoneFollowUpModel->query('SHOW TABLES LIKE "' . $table_name . '"');
if ($isTable) {
$sql = "INSERT into u_phone_follow_up_" . $site_id . "
(content,labels_id,user_id,agent_id,province,city,disc,type,create_time,update_time,user_status )
select content,labels_id,user_id,agent_id,province,city,disc,type,create_time,update_time,user_status
(content,labels_id,user_id,agent_id,province,city,disc,type,create_time,update_time,user_status,img_str )
select content,labels_id,user_id,agent_id,province,city,disc,type,create_time,update_time,user_status,img_str
from `" . $table_name . "`";
$followUpModel = new UPhoneFollowUp($site_id);
if (false !== $followUpModel->execute($sql)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment