|
@@ -225,7 +225,7 @@ class NoticeLogic extends BaseLogic
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- public static function getInformation($adminId)
|
|
|
|
|
|
|
+ public static function getInformation($params)
|
|
|
{
|
|
{
|
|
|
try {
|
|
try {
|
|
|
$noticeInfo = [
|
|
$noticeInfo = [
|
|
@@ -233,24 +233,29 @@ class NoticeLogic extends BaseLogic
|
|
|
'massage' => '',
|
|
'massage' => '',
|
|
|
'to_router' => '',
|
|
'to_router' => '',
|
|
|
];
|
|
];
|
|
|
- if(!in_array($adminId,[1,2])){
|
|
|
|
|
- return $noticeInfo;
|
|
|
|
|
- }
|
|
|
|
|
- // 用户下单待派单
|
|
|
|
|
- $serviceWorkCount = ServiceWork::where('work_status', 0)->where('work_pay_status','>', 0)->count('id');
|
|
|
|
|
- if($serviceWorkCount){
|
|
|
|
|
- $noticeInfo['confirm_code'] = 101;
|
|
|
|
|
- $noticeInfo['massage'] .= '您有'.$serviceWorkCount.'个工单待派单';
|
|
|
|
|
- $noticeInfo['to_router'] = '/works/service_work';
|
|
|
|
|
- return $noticeInfo;
|
|
|
|
|
- }
|
|
|
|
|
- // 师傅入驻待审核
|
|
|
|
|
- $workerRegisterCount = MasterWorkerRegister::where('status', 0)->count('id');
|
|
|
|
|
- if($workerRegisterCount){
|
|
|
|
|
- $noticeInfo['confirm_code'] = 101;
|
|
|
|
|
- $noticeInfo['massage'] .= '您有'.$workerRegisterCount.'个师傅入驻待审核';
|
|
|
|
|
- $noticeInfo['to_router'] = '/worker/master_worker_register';
|
|
|
|
|
|
|
+ /*if(!in_array($adminId,[1,2])){
|
|
|
return $noticeInfo;
|
|
return $noticeInfo;
|
|
|
|
|
+ }*/
|
|
|
|
|
+ //$params['business_code']
|
|
|
|
|
+ switch ($params['business_code']){
|
|
|
|
|
+ case 'service_work':
|
|
|
|
|
+ // 用户下单待派单
|
|
|
|
|
+ $serviceWorkCount = ServiceWork::where('work_status', 0)->where('work_pay_status','>', 0)->count('id');
|
|
|
|
|
+ if($serviceWorkCount){
|
|
|
|
|
+ $noticeInfo['confirm_code'] = 101;
|
|
|
|
|
+ $noticeInfo['massage'] .= '您有'.$serviceWorkCount.'个工单待派单';
|
|
|
|
|
+ $noticeInfo['to_router'] = '/works/service_work';
|
|
|
|
|
+ }
|
|
|
|
|
+ break;
|
|
|
|
|
+ case 'worker_register':
|
|
|
|
|
+ // 师傅入驻待审核
|
|
|
|
|
+ $workerRegisterCount = MasterWorkerRegister::where('status', 0)->count('id');
|
|
|
|
|
+ if($workerRegisterCount){
|
|
|
|
|
+ $noticeInfo['confirm_code'] = 101;
|
|
|
|
|
+ $noticeInfo['massage'] .= '您有'.$workerRegisterCount.'个师傅入驻待审核';
|
|
|
|
|
+ $noticeInfo['to_router'] = '/worker/master_worker_register?master_worker_register.master_worker_register/lists';
|
|
|
|
|
+ }
|
|
|
|
|
+ break;
|
|
|
}
|
|
}
|
|
|
return $noticeInfo;
|
|
return $noticeInfo;
|
|
|
} catch (\Exception $e) {
|
|
} catch (\Exception $e) {
|