Commit c7b52683 authored by hujun's avatar hujun

user_agent

parent f2602ed3
......@@ -48,7 +48,7 @@ class UserLog extends Basic{
}
$user_id = $params['user_id'];
$agent_id = $params['agent_id'];
$result = $this->service_->userDetail($user_id,$agent_id);
$result = $this->service_->userDetail($user_id,$agent_id, $this->siteId);
if($result["code"] == 200){
return $this->response("200", "success!", $result["data"]);
......
......@@ -17,6 +17,7 @@ use app\model\OReportModel;
use app\model\ULabels;
use app\model\UPhoneFollowUp;
use app\model\UPhoneFollowUpTemporary;
use app\model\UserAgentModel;
use app\model\Users;
/**
......@@ -51,11 +52,12 @@ class UserLogService
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function userDetail($user_id, $agent_id)
public function userDetail($user_id, $agent_id, $site_id)
{
$redis_service = new RedisCacheService();
$user_service = new UserService();
$vip_services = new VipService();
$m_user_agent = new UserAgentModel();
$user_arr = $redis_service->getRedisCache(1, $user_id);
......@@ -71,14 +73,8 @@ class UserLogService
}
$user_arr['user_pic'] = HEADERIMGURL . $user_arr['user_pic'];
if ($user_arr['agent_id']) {
$agents_arr = $redis_service->getRedisCache(2, $user_arr['agent_id']);
if (empty($agents_arr)) {
$agents_arr = $this->agentModel->verifyUser('name,phone', '', ['id' => $user_arr['agent_id']]);
}
$agents_arr = $m_user_agent->getUserAgent('c.name,c.phone', ['a.site_id'=>$site_id, 'a.user_id'=>$user_id]);
if ($agents_arr['agent_id']) {
$user_arr['agent_info'] = $agents_arr ? $agents_arr['name'] . '-' . $agents_arr['phone'] : '未知';
} else {
$user_arr['agent_info'] = '';
......
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