1234567891011121314151617181920212223 |
- <?php
- namespace app\common\model;
- use app\hander\HelpHander;
- use think\Db;
- use think\Model;
- class WorkLog extends Model
- {
- // 获取工作汇报未读数量
- public function unReadNums($userId,$orgId){
- $count = Db::name('work_daily_record')
- ->alias('wdr')
- ->join('work_daily wd','wd.id = wdr.work_daily_id')
- ->where('wdr.is_read',0)
- ->where('wdr.type',2)
- ->where('wdr.receive_user_id',$userId)
- ->where('wd.org_id',$orgId)
- ->count();
- return $count;
- }
- }
|