修改线索消息记录
This commit is contained in:
@@ -152,7 +152,8 @@ class Clues extends BaseController
|
||||
if (!$admin_id) {
|
||||
$where = [
|
||||
'clue_id' => $clues['id'],
|
||||
'uid>' => 0
|
||||
'uid>' => 0,
|
||||
'cf_platform' => Receiver_clue_oplogs_model::CF_PLATFORM_ADMIN
|
||||
];
|
||||
$firstRow = $this->mdOplogs->select($where, 'id asc', 1, 1);
|
||||
$admin_id = $firstRow ? $firstRow[0]['uid'] : 0;
|
||||
|
||||
@@ -1586,7 +1586,7 @@ class Customers extends Wxapp
|
||||
$content = "不解锁,理由为【{$reason}】";
|
||||
$this->customers_entity->add_log($id, $this->session['uid'], $uname, $content, Receiver_customer_oplogs_model::TYPE_UNLOCK);
|
||||
if ($row['rid']) {
|
||||
$this->clues_entity->add_log($row['rid'], $this->session['uid'], $uname, $content, Receiver_clue_oplogs_model::TYPE_UNLOCK);
|
||||
$this->clues_entity->add_log($row['rid'], $this->session['uid'], $uname, $content, Receiver_clue_oplogs_model::TYPE_UNLOCK, Receiver_clue_oplogs_model::CF_PLATFORM_WXAPP);
|
||||
}
|
||||
$msg = "保存成功";
|
||||
} else {
|
||||
|
||||
@@ -14,7 +14,7 @@ class Clues_entity
|
||||
}
|
||||
|
||||
//添加日志
|
||||
public function add_log($clue_id, $uid, $uname, $log, $type = '')
|
||||
public function add_log($clue_id, $uid, $uname, $log, $type = '', $cf_platform = 'admin')
|
||||
{
|
||||
$this->ci->load->model('receiver/receiver_clue_oplogs_model', 'oplogs_model');
|
||||
$data = [
|
||||
@@ -25,6 +25,7 @@ class Clues_entity
|
||||
'c_time' => time()
|
||||
];
|
||||
$type && $data['type'] = $type;
|
||||
$cf_platform && $data['cf_platform'] = $cf_platform;
|
||||
$r_id = $this->ci->oplogs_model->add($data);
|
||||
return $r_id;
|
||||
}
|
||||
|
||||
@@ -18,6 +18,11 @@ class Receiver_clue_oplogs_model extends HD_Model
|
||||
//type状态值11不解锁
|
||||
const TYPE_UNLOCK = 11;
|
||||
|
||||
//消息来源
|
||||
const CF_PLATFORM_ADMIN = 'admin';
|
||||
const CF_PLATFORM_WXAPP = 'wxapp';
|
||||
const CF_PLATFORM_PINGAN_ADMIN = 'pingan_admin';
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct($this->table_name, 'default');
|
||||
|
||||
Reference in New Issue
Block a user