修改报名专题
This commit is contained in:
@@ -10,6 +10,7 @@ class Enroll extends BaseController
|
||||
$this->load->model('market/Market_sytopic_model', 'mSytopic');
|
||||
$this->load->model('market/Market_sytopic_enroll_model', 'sytopic_enroll_model');
|
||||
$this->load->model('market/market_sylive_user_model', 'user_model');
|
||||
$this->load->model('market/market_sylive_organization_model');
|
||||
$this->load->library('MyEncryption');
|
||||
}
|
||||
|
||||
@@ -78,7 +79,7 @@ class Enroll extends BaseController
|
||||
if ($topicId) {
|
||||
$where['topicId'] = $topicId;
|
||||
}
|
||||
if(strlen($status)){
|
||||
if (strlen($status)) {
|
||||
$where['status'] = (int)$status;
|
||||
}
|
||||
$count = $this->sytopic_enroll_model->count($where);
|
||||
@@ -93,8 +94,13 @@ class Enroll extends BaseController
|
||||
$channelUserIds = array_column($res, 'channelId');
|
||||
$channelUserIdsStr = implode(',', array_unique($channelUserIds));
|
||||
$channelUserMap = [];
|
||||
$channelUserIdsStr && $channelUserMap = $this->user_model->map('userId', 'uname', ["userId in ({$channelUserIdsStr})" => null], '', '', '', 'userId,uname');
|
||||
$channelUserIdsStr && $channelUserMap = $this->user_model->map('userId', '', ["userId in ({$channelUserIdsStr})" => null], '', '', '', 'userId,uname,bizId');
|
||||
foreach ($res as $val) {
|
||||
$channelUser = $channelUserMap[$val['channelId']];
|
||||
$bizId = $channelUser[0]['bizId'];
|
||||
if ($bizId) {
|
||||
$biz = $this->market_sylive_organization_model->get(['organizationId' => $bizId]);
|
||||
}
|
||||
$tmp_data = [
|
||||
'id' => $val['id'],
|
||||
'name' => $val['name'],
|
||||
@@ -102,9 +108,10 @@ class Enroll extends BaseController
|
||||
'enTime' => $val['enTime'],
|
||||
'enrollDeal' => (int)$val['enrollDeal']
|
||||
];
|
||||
$tmp_data['channelName'] = $channelUserMap[$val['channelId']] ?: '';
|
||||
$tmp_data['channelName'] = $channelUser ? $channelUser[0]['uname'] : '';
|
||||
$tmp_data['topicTitle'] = $topicMap[$val['topicId']] ?: '';
|
||||
$tmp_data['status_cn'] = $statusCn[$val['status']];
|
||||
$tmp_data['bizName'] = $biz ? $biz['organizationName'] : '';
|
||||
if ($limit < 10000) {
|
||||
$tmp_data['status'] = intval($val['status']);
|
||||
}
|
||||
@@ -120,8 +127,9 @@ class Enroll extends BaseController
|
||||
/**
|
||||
* 专题管理列表
|
||||
*/
|
||||
public function topicList_get(){
|
||||
$lists = $this->mSytopic->select(['status>='=>0], 'id desc', 1, 10000,'id,title');
|
||||
public function topicList_get()
|
||||
{
|
||||
$lists = $this->mSytopic->select(['status>=' => 0], 'id desc', 1, 10000, 'id,title');
|
||||
!$lists && $lists = [];
|
||||
|
||||
$this->return_response_list($lists);
|
||||
|
||||
Reference in New Issue
Block a user