修改消息推送

This commit is contained in:
lccsw
2025-12-03 13:49:15 +08:00
parent 61f80c87ae
commit 08a76fea26
2 changed files with 3 additions and 12 deletions
@@ -149,7 +149,6 @@ class Clues extends BaseController
);
$id = $this->mdOplogs->add($addData);
if ($id) {
$logFile = 'test.txt';
//消息推送给管理后台
$admin_id = $clues['admin_id'];
if (!$admin_id) {
@@ -161,18 +160,15 @@ class Clues extends BaseController
$firstRow = $this->mdOplogs->select($where, 'id asc', 1, 1);
$admin_id = $firstRow ? $firstRow[0]['uid'] : 0;
}
debug_log("admin_id:" . $admin_id, $logFile);
if ($admin_id) {
$params = [
'platform' => Sys_notice_model::PLAT_FORM_ADMIN,
'uid' => $clues['pingan_user_id'],
'content' => $addData['content'],
'uid' => $admin_id,
'content' => $addData['log'],
'url' => '/receiver/clues/get?id=' . $clues['id'],
];
$sendPlatform = Sys_notice_model::PLAT_FORM_SYS_PINGAN;
debug_log("params:" . json_encode($params, JSON_UNESCAPED_UNICODE), $logFile);
$req = $this->sys_notice_model->addNotice($params, $sendPlatform, $_SESSION['id']);
debug_log("req:" . json_encode($req), $logFile);
$this->sys_notice_model->addNotice($params, $sendPlatform, $_SESSION['id'], true);
}
$this->return_response();
} else {
-5
View File
@@ -65,11 +65,6 @@ class Sys_notice_model extends HD_Model
];
$addData['icon'] = self::ICON_TYPE[$params['type']] ?: self::ICON_DEFAULT;
$req = $this->add($addData);
if ($params['url'] == '/receiver/clues/get?id=21541') {
debug_log("sql语句:" . $this->db->last_query(), 'test.txt');
debug_log("保存日志id:" . json_encode($req), 'test.txt');
}
if (!is_numeric($req)) {
throw new Exception('添加失败');
}