From 59d83c83cb1575f2c780934d2b9a5a1d68dcc449 Mon Sep 17 00:00:00 2001 From: "HDM58\\hdm58" Date: Mon, 30 Oct 2023 23:42:14 +0800 Subject: [PATCH] =?UTF-8?q?#I7YNEI=20=E5=B7=A5=E4=BD=9C=E6=B1=87=E6=8A=A5?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=B6=88=E6=81=AF=E9=80=9A=E7=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/oa/controller/Work.php | 8 ++++++++ config/message.php | 20 ++++++++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/app/oa/controller/Work.php b/app/oa/controller/Work.php index c15c358..8a82a6f 100644 --- a/app/oa/controller/Work.php +++ b/app/oa/controller/Work.php @@ -314,6 +314,14 @@ class Work extends BaseController 'send_time' => time() ); } + //组合要发的消息 + $types=['','日报','周报','月报','其他']; + $msg=[ + 'from_uid'=>$this->uid, + 'title' => $types[$param['type']], + 'action_id'=>$wid + ]; + sendMessage($users,5,$msg); $res = Db::name('WorkRecord')->strict(false)->field(true)->insertAll($send_data); add_log('send',$wid); return to_assign(0, '发送成功'); diff --git a/config/message.php b/config/message.php index 474ef70..ba489e2 100644 --- a/config/message.php +++ b/config/message.php @@ -11,6 +11,26 @@ return [ 'title' => '{from_user}发了一个新『公告』,请及时查看', 'content' => '您有一个新公告:{title}。', 'link' => '查看详情', + ], + 2 => [ + 'title' => '{from_user}给您发了一个『会议邀请』通知,请及时查看', + 'content' => '您有一个新的会议邀请:{title}。', + 'link' => '查看详情', + ], + 3 => [ + 'title' => '{from_user}给您发了一个『会议取消』通知,请及时查看', + 'content' => '您有一个会议取消通知:{title}。', + 'link' => '查看详情', + ], + 4 => [ + 'title' => '{from_user}给您发了一个『会议审批』通知,请及时查看', + 'content' => '您有一个会议审批通知:{title}。', + 'link' => '查看详情', + ], + 5 => [ + 'title' => '{from_user}给您发了一份『工作汇报』,请及时查看', + 'content' => '您有一份新的工作汇报待查看:{title}。', + 'link' => '查看详情', ], 21 => [ 'title' => '{from_user}提交了一个『{title}申请』,请及时审批',