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}申请』,请及时审批',