|
|
@@ -122,9 +122,26 @@ class MasterWorkerMessageLogic extends BaseLogic
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * @param $userId
|
|
|
+ * @return array
|
|
|
+ * @throws \think\db\exception\DataNotFoundException
|
|
|
+ * @throws \think\db\exception\DbException
|
|
|
+ * @throws \think\db\exception\ModelNotFoundException
|
|
|
+ */
|
|
|
public static function orderPrompt($userId)
|
|
|
{
|
|
|
- $count = ServiceWork::where(['master_worker_id'=>$userId,'work_status'=> 1] )->count('id');
|
|
|
- return $count?:false;
|
|
|
+ $where = [
|
|
|
+ 'master_worker_id'=>$userId,
|
|
|
+ 'approval'=>1,//派单的时候默认审核了
|
|
|
+ 'work_status'=>1,
|
|
|
+ ];
|
|
|
+
|
|
|
+ return ServiceWork::where($where)
|
|
|
+ ->field(['id', 'work_sn', 'address', 'title', 'work_status', 'service_status','work_pay_status', 'appointment_time','receive_time','base_service_fee','service_fee'])
|
|
|
+ ->append(['work_status_text','service_status_text'])
|
|
|
+ ->order(['appointment_time' => 'asc'])//上门时间排序
|
|
|
+ ->select()
|
|
|
+ ->toArray();
|
|
|
}
|
|
|
}
|