新版流量池服务端提交

This commit is contained in:
wong
2026-02-04 10:58:56 +08:00
parent f956fc949b
commit 7534dd79fa
19 changed files with 1101 additions and 147 deletions

View File

@@ -25,10 +25,18 @@ class WorkbenchImportContactController extends Controller
];
// 查询发布记录
// ========== 旧版流量池代码(已废弃) ==========
// $list = Db::name('workbench_import_contact_item')->alias('wici')
// ->join('traffic_pool_v1 tp', 'tp.id = wici.poolId', 'left')
// ->join('traffic_source_v1 tc', 'tc.identifier = tp.identifier', 'left')
// ->join('wechat_account wa', 'wa.wechatId = tp.wechatId', 'left')
// ========== 新版流量池代码 ==========
$list = Db::name('workbench_import_contact_item')->alias('wici')
->join('traffic_pool_v1 tp', 'tp.id = wici.poolId', 'left')
->join('traffic_source_v1 tc', 'tc.identifier = tp.identifier', 'left')
->join('traffic_pool tp', 'tp.id = wici.poolId', 'left')
->join('traffic_pool_company tpc', 'tpc.poolId = tp.id AND tpc.companyId = ' . $this->getUserInfo('companyId'), 'left')
->join('traffic_pool_source tps', 'tps.poolCompanyId = tpc.id', 'left')
->join('wechat_account wa', 'wa.wechatId = tp.wechatId', 'left')
// ========== 旧版流量池代码结束 ==========
->field([
'wici.id',
'wici.workbenchId',
@@ -36,7 +44,7 @@ class WorkbenchImportContactController extends Controller
'tp.identifier',
'tp.mobile',
'tp.wechatId',
'tc.name',
'tps.sourceName as name', // 从新版来源表获取名称
'wa.nickName',
'wa.avatar',
'wa.alias',