From 0191e053dbea1430b6162af1cf30b8b7a731da2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E8=90=8C?= <494089941@qq.com> Date: Fri, 3 Mar 2023 18:25:10 +0800 Subject: [PATCH] bug fix --- application/crm/logic/MessageLogic.php | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) 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; }