|
|
|
@ -48,8 +48,7 @@ class MarketController extends ThinkController
|
|
|
|
|
if (count($recordCompanyIds) > 0) {
|
|
|
|
|
$recordCompanys = M('promote_company', 'tab_')->field(['id', 'company_name', 'company_belong'])->where(['id' => ['in', $recordCompanyIds]])->select();
|
|
|
|
|
}
|
|
|
|
|
$adminIds = array_merge(array_column($items, 'from_id'), array_column($items, 'to_id'));
|
|
|
|
|
$recordAdmins = M('ucenter_member', 'sys_')->field(['id', 'username'])->where(['id' => ['in', $adminIds]])->select();
|
|
|
|
|
$recordAdmins = M('ucenter_member', 'sys_')->field(['id', 'username'])->select();
|
|
|
|
|
$recordPromotes = index_by_column('id', $recordPromotes);
|
|
|
|
|
$recordCompanys = index_by_column('id', $recordCompanys);
|
|
|
|
|
$recordAdmins = index_by_column('id', $recordAdmins);
|
|
|
|
@ -82,7 +81,8 @@ class MarketController extends ThinkController
|
|
|
|
|
'split_time' => $item['split_time'] == 0 ? '全部' : date('Y-m-d H:i:s', $item['split_time']),
|
|
|
|
|
'created_time' => date('Y-m-d H:i:s', $item['created_time']),
|
|
|
|
|
'status_text' => $statusList[$item['status']],
|
|
|
|
|
'status' => $item['status']
|
|
|
|
|
'status' => $item['status'],
|
|
|
|
|
'creator_username' => isset($recordAdmins[$item['creator_id']]) ? $recordAdmins[$item['creator_id']]['username'] : '未知',
|
|
|
|
|
];
|
|
|
|
|
}
|
|
|
|
|
$companys = M('promote_company', 'tab_')->field(['id', 'company_name'])->where(['company_belong' => ['in', [1, 2]]])->select();
|
|
|
|
@ -99,8 +99,17 @@ class MarketController extends ThinkController
|
|
|
|
|
public function rebind()
|
|
|
|
|
{
|
|
|
|
|
$this->meta_title = '新增换绑';
|
|
|
|
|
$companyTypes = [
|
|
|
|
|
0 => '内团',
|
|
|
|
|
1 => '外团',
|
|
|
|
|
2 => '外团-分发联盟',
|
|
|
|
|
3 => '无'
|
|
|
|
|
];
|
|
|
|
|
$id = I('id', 0);
|
|
|
|
|
$companys = M('promote_company', 'tab_')->field(['id', 'company_name'])->where(['company_belong' => ['in', [1, 2]]])->select();
|
|
|
|
|
$companys = M('promote_company', 'tab_')->field(['id', 'company_name', 'company_belong'])->where(['company_belong' => ['in', [1, 2]]])->select();
|
|
|
|
|
foreach ($companys as &$company) {
|
|
|
|
|
$company['company_belong'] = $companyTypes[$company['company_belong']] ?? '未知';
|
|
|
|
|
}
|
|
|
|
|
$marketAdmins = getMarketAdmins();
|
|
|
|
|
$this->assign('companys', $companys);
|
|
|
|
|
$this->assign('marketAdmins', $marketAdmins);
|
|
|
|
|