场景获客优化

This commit is contained in:
wong
2025-08-12 15:02:00 +08:00
parent f6b620383c
commit 67fac4b2f2
3 changed files with 82 additions and 16 deletions

View File

@@ -118,19 +118,19 @@ class GetAddFriendPlanDetailV1Controller extends Controller
// 解析JSON字段
$sceneConf = json_decode($plan['sceneConf'], true) ?: [];
$sceneConf['wechatGroups'] = !empty($sceneConf['groupSelected']) ? $sceneConf['groupSelected'] : [];
$reqConf = json_decode($plan['reqConf'], true) ?: [];
$reqConf['deveiceGroups'] = $reqConf['device'];
$msgConf = json_decode($plan['msgConf'], true) ?: [];
$tagConf = json_decode($plan['tagConf'], true) ?: [];
if(!empty($sceneConf['wechatGroups'])){
$groupList = Db::name('wechat_group')->alias('wg')
->join('wechat_account wa', 'wa.wechatId = wg.ownerWechatId')
->where('wg.id', 'in', $sceneConf['wechatGroups'])
->order('wg.id', 'desc')
->field('wg.id,wg.name as groupName,wg.ownerWechatId,wa.nickName,wa.avatar,wa.alias,wg.avatar as groupAvatar')
->field('wg.id,wg.name,wg.chatroomId,wg.ownerWechatId,wa.nickName as ownerNickName,wa.avatar as ownerAvatar,wa.alias as ownerAlias,wg.avatar')
->select();
$sceneConf['wechatGroupsOptions'] = $groupList;
}else{
@@ -138,8 +138,6 @@ class GetAddFriendPlanDetailV1Controller extends Controller
}
if (!empty($reqConf['deveiceGroups'])){
$deveiceGroupsOptions = DeviceModel::alias('d')
->field([