增加更新客户等级接口
This commit is contained in:
@@ -409,7 +409,15 @@ class Clues extends BaseController
|
||||
$unlockCustomer = $unLockReason = $is_unlock = '';
|
||||
if ($v['status'] == 1) {
|
||||
$unlockCustomer = $this->customers_model->get(['rid' => $v['id'], 'un_lock' => Receiver_customers_model::LOCK_STATUS]);
|
||||
$is_unlock = $unlockCustomer ? '已解锁' : '未解锁';
|
||||
if (!$unlockCustomer) {
|
||||
if ($this->customers_model->get(['rid' => $v['id'], 'un_lock' => Receiver_customers_model::LOCK_STATUS_2])) {
|
||||
$is_unlock = '不解锁';
|
||||
} else {
|
||||
$is_unlock = '未解锁';
|
||||
}
|
||||
} else {
|
||||
$is_unlock = '已解锁';
|
||||
}
|
||||
}
|
||||
if ($limit >= 10000) {
|
||||
if ($v['status'] == 1 && !$unlockCustomer) {
|
||||
@@ -446,7 +454,8 @@ class Clues extends BaseController
|
||||
'belongUserName' => $belongUserName,
|
||||
'brandList' => $brandList,
|
||||
'poi' => $poi,
|
||||
'isUnlock' => $is_unlock
|
||||
'isUnlock' => $is_unlock,
|
||||
'level' => $v['level'],
|
||||
];
|
||||
}
|
||||
|
||||
@@ -459,5 +468,22 @@ class Clues extends BaseController
|
||||
}
|
||||
return ['list' => $list, 'count' => $count, 'statusList' => $statusList, 'columns' => $columns];
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新登记
|
||||
* @return void
|
||||
*/
|
||||
public function level_post()
|
||||
{
|
||||
$params = $this->input_param();
|
||||
if (!$params['id']) {
|
||||
$this->return_json('参数错误!');
|
||||
}
|
||||
$res = $this->clues_model->update(['level' => $params['level']], ['id' => $params['id']]);
|
||||
if (!$res) {
|
||||
$this->return_json('更新失败!');
|
||||
}
|
||||
$this->return_response();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user