Jelajahi Sumber

获取所有改约通知

whitefang 1 tahun lalu
induk
melakukan
7a7ae9ddf2

+ 2 - 0
app/adminapi/logic/works/ServiceWorkLogic.php

@@ -627,6 +627,8 @@ class ServiceWorkLogic extends BaseLogic
     public static function getAppointmentNotice($userId)
     {
         return ServiceWork::where(['master_worker_id'=>$userId,'appoint_approval'=>1])
+            ->where('work_status','>',1)
+            ->where('work_status','<',7)
             ->field(['id', 'work_sn','real_name','mobile', 'address', 'title', 'appointment_time','work_status'])
             ->order(['appointment_time' => 'asc'])//上门时间排序
             ->select()->each(function (&$item){

+ 1 - 1
app/workerapi/controller/MasterWorkerMessageController.php

@@ -60,7 +60,7 @@ class MasterWorkerMessageController extends BaseApiController
 
         //预约时间更新确认
         $appoint_result = ServiceWorkLogic::getAppointmentNotice($this->userId);
-        if(!empty($appoint_result) and $appoint_result['work_status']>1 and $appoint_result['work_status']<7){
+        if(!empty($appoint_result)){
             $result = ['confirm_code'=>102,'msg'=>'您有工单更改了预约时间,请注意查看','data'=>$appoint_result];
             return $this->success('操作成功', $result, 1, 0);
         }