代码提交

This commit is contained in:
wong
2025-08-06 18:00:50 +08:00
parent d4c10de30a
commit 7a2553940c

View File

@@ -270,7 +270,7 @@ class GetPotentialListWithInCompanyV1Controller extends BaseController
$percentage = number_format(($taskNum / $passNum) * 100, 2);
$total['percentage'] = $percentage;
}
$data['total'] = $total;
@@ -322,14 +322,20 @@ class GetPotentialListWithInCompanyV1Controller extends BaseController
public function getUserTags()
{
$userId = $this->request->param('userId', '');
$companyId = $this->getUserInfo('companyId');
if (empty($userId)) {
return json_encode(['code' => 500, 'msg' => '用户id不能为空']);
}
$data = Db::name('traffic_pool')->alias('tp')
->join(['s2_wechat_friend' => 'wf'], 'tp.wechatId=wf.wechatId', 'left')
->join('wechat_friendship f', 'tp.wechatId=f.wechatId AND f.companyId='.$companyId, 'left')
->join(['s2_wechat_friend' => 'wf'], 'f.wechatId=wf.wechatId', 'left')
->where(['tp.id' => $userId])
->order('tp.createTime desc')
->column('wf.id,wf.labels,wf.siteLabels');
if (empty($data)) {
return ResponseHelper::success(['wechat' => [], 'siteLabels' => []]);
}
$tags = [];
$siteLabels = [];
@@ -350,5 +356,31 @@ class GetPotentialListWithInCompanyV1Controller extends BaseController
return ResponseHelper::success(['wechat' => $tags, 'siteLabels' => $siteLabels]);
}
/* public function editUserTags()
{
$userId = $this->request->param('userId', '');
if (empty($userId)) {
return json_encode(['code' => 500, 'msg' => '用户id不能为空']);
}
$tags = $this->request->param('tags', []);
$tags = $this->request->param('tags', []);
$isWechat = $this->request->param('isWechat', false);
$companyId = $this->getUserInfo('companyId');
$friend = Db::name('traffic_pool')->alias('tp')
->join('wechat_friendship f', 'tp.wechatId=f.wechatId AND f.companyId='.$companyId, 'left')
->join(['s2_wechat_friend' => 'wf'], 'f.wechatId=wf.wechatId', 'left')
->where(['tp.id' => $userId])
->order('tp.createTime desc')
->column('wf.id,wf.accountId,wf.labels,wf.siteLabels');
if (empty($data)) {
return ResponseHelper::error('该用户不存在');
}
}*/
}