触客宝部分功能提交

This commit is contained in:
wong
2025-09-13 17:20:34 +08:00
parent cc432ba18f
commit 410a43e6a1
6 changed files with 91 additions and 13 deletions

View File

@@ -155,11 +155,11 @@ class GetPotentialListWithInCompanyV1Controller extends BaseController
public function getUser()
{
$userId = $this->request->param('userId', '');
$wechatId = $this->request->param('wechatId', '');
$companyId = $this->getUserInfo('companyId');
if (empty($userId)) {
return json_encode(['code' => 500, 'msg' => '用户id不能为空']);
if (empty($wechatId)) {
return json_encode(['code' => 500, 'msg' => '微信id不能为空']);
}
$total = [
@@ -175,12 +175,11 @@ class GetPotentialListWithInCompanyV1Controller extends BaseController
'wa.nickname', 'wa.avatar', 'wa.gender', 'wa.phone', 'wa.alias'])
->join('wechat_account wa', 'p.identifier=wa.wechatId', 'left')
->order('p.id DESC')
->where(['p.id' => $userId])
->where(['p.identifier' => $wechatId])
->group('p.identifier')
->find();
$data['lastMsgTime'] = '';
//来源
$source = Db::name('traffic_source')->alias('ts')
->field(['wa.nickname', 'wa.avatar', 'wa.gender', 'wa.phone', 'wa.wechatId', 'wa.alias',