|
|
@@ -2,6 +2,7 @@
|
|
|
|
|
|
namespace app\workerapi\controller;
|
|
|
|
|
|
+use app\adminapi\logic\works\ServiceWorkLogic;
|
|
|
use app\workerapi\lists\MasterWorkerMessageLists;
|
|
|
use app\workerapi\logic\MasterWorkerMessageLogic;
|
|
|
|
|
|
@@ -49,12 +50,21 @@ class MasterWorkerMessageController extends BaseApiController
|
|
|
*/
|
|
|
public function orderPrompt()
|
|
|
{
|
|
|
- $result = MasterWorkerMessageLogic::orderPrompt($this->userId);
|
|
|
- if ($result) {
|
|
|
- $result = ['confirm_code'=>101,'msg'=>'您有新的工单未领取,请点击领取'];
|
|
|
- }else{
|
|
|
- $result = ['confirm_code'=>0,'msg'=>'无'];
|
|
|
+ $result = ['confirm_code'=>0,'msg'=>'无'];
|
|
|
+ $prompt_result = MasterWorkerMessageLogic::orderPrompt($this->userId);
|
|
|
+ //新工单领取
|
|
|
+ if(!empty($prompt_result)){
|
|
|
+ $result = ['confirm_code'=>100,'msg'=>'您有新的工单未领取,请点击领取','data'=>[]];
|
|
|
+ return $this->success('操作成功', $result, 1, 0);
|
|
|
}
|
|
|
+
|
|
|
+ //预约时间更新确认
|
|
|
+ $appoint_result = ServiceWorkLogic::getAppointmentNotice($this->userId);
|
|
|
+ if(!empty($appoint_result)){
|
|
|
+ $result = ['confirm_code'=>102,'msg'=>'您有工单更改了预约时间,请注意查看','data'=>$appoint_result];
|
|
|
+ return $this->success('操作成功', $result, 1, 0);
|
|
|
+ }
|
|
|
+
|
|
|
return $this->success('操作成功', $result, 1, 0);
|
|
|
}
|
|
|
|