diff --git a/application/crm/logic/MessageLogic.php b/application/crm/logic/MessageLogic.php index 6954442..da2d9e8 100644 --- a/application/crm/logic/MessageLogic.php +++ b/application/crm/logic/MessageLogic.php @@ -177,7 +177,7 @@ class MessageLogic extends Common */ public function checkBusiness($param){ $type = !empty($param['type']) ? $param['type'] : 1; - $isSub = 1; + $isSub = 3; unset($param['type']); $businessModel = model('Business'); $request = $this->whereCheck($param, $type,$isSub); @@ -242,6 +242,23 @@ class MessageLogic extends Common $param['dealt'] = 1; break; } + }elseif($isSub==3){ + switch ($type) { + case '1' : + # 待审核、审核中 + $param['check_status'] = ['lt', 2]; + $param['check_user_id'] = ['like', '%,'. $param['user_id'] .',%']; + # 要提醒的发票ID + $businessIdArray = db('crm_dealt_relation')->where(['types' => ['eq', 'crm_business'], 'user_id' => ['eq', $param['user_id']]])->column('types_id'); + $param['businessIdArray'] = !empty($businessIdArray) ? $businessIdArray : -1; + $param['dealt'] = 1; + break; + case '2' : + # 全部 + $param['flow_user_id'] = ['like', '%,'. $param['user_id'] .',%']; + $param['dealt'] = 1; + break; + } } return $param; }