1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889 |
- <?php
- namespace app\api\controller\v1;
- use app\api\controller\Base;
- use app\hander\HelpHander;
- use think\Db;
- class Message extends Base
- {
- // 催办
- public function remindAudit(){
- $applyId = input('applyId/d',0);
- model('Apply')->remindAudit($applyId,$this->userId);
- HelpHander::success([],'操作成功');
- }
- // pc消息提醒列表
- public function queryAllMessageByType(){
- $page = input('page/d',1);
- $size = input('size/d',10);
- $type = input('type/d',0);
- $status = input('status/d',-1);
- $context = input('context','','trim');
- $ret = model('Message')->lists($page,$size,$this->userId,$this->orgId,$type,$context,$status);
- HelpHander::success($ret);
- }
- // 消息未读数
- public function selUnreadNum(){
- $ret = model('Message')->selUnreadNum($this->userId,$this->orgId);
- HelpHander::success($ret);
- }
- // 标记为已读
- public function updataStatus(){
- $id = input('id/d',0);
- model('Message')->updataStatus($id,$this->userId);
- HelpHander::success([],'操作成功');
- }
- // 全部已读
- public function batcheUpdateStatus(){
- $type = input('type/d',0);
- model('Message')->batcheUpdateStatus($type,$this->userId);
- HelpHander::success([],'操作成功');
- }
- // 批量删除
- public function batcheDelete(){
- $ids = input('ids','','trim');
- if(!$ids){
- HelpHander::error('未选择要删除的数据');
- }
- model('Message')->batcheDelete($ids,$this->userId);
- HelpHander::success([],'操作成功');
- }
- // 系统消息通知列表
- public function selMessageByOrg(){
- $page = input('page/d',1);
- $size = input('size/d',10);
- $ret = model('Message')->selMessageByOrg($page,$size,$this->userId);
- HelpHander::success($ret);
- }
- // 工作提醒
- public function selMessageWork(){
- $page = input('page/d',1);
- $size = input('size/d',10);
- $ret = model('Message')->selMessageWork($page,$size,$this->userId,$this->orgId);
- HelpHander::success($ret);
- }
- // 工作通知
- public function queryWorkNotice(){
- $page = input('page/d',1);
- $size = input('size/d',10);
- $ret = model('Message')->queryWorkNotice($page,$size,$this->userId,$this->orgId);
- HelpHander::success($ret);
- }
- // 工作汇报
- public function selMessageReport(){
- $page = input('page/d',1);
- $size = input('size/d',10);
- $ret = model('Message')->selMessageReport($page,$size,$this->userId,$this->orgId);
- HelpHander::success($ret);
- }
- }
|