作者 lyh

hx

@@ -41,7 +41,10 @@ class WebSettingController extends BaseController @@ -41,7 +41,10 @@ class WebSettingController extends BaseController
41 * @time :2023/8/1 9:33 41 * @time :2023/8/1 9:33
42 */ 42 */
43 public function sendNotify(WebSettingLogic $webSettingLogic){ 43 public function sendNotify(WebSettingLogic $webSettingLogic){
44 - http_get($webSettingLogic->sendNotifyMessage()); 44 + $list = $webSettingLogic->sendNotifyMessage();
  45 + if(!empty($list)){
  46 + $this->response('当前页面正在生成了,请完成后再点击',Code::SUCCESS,$list);
  47 + }
45 $this->response('success'); 48 $this->response('success');
46 } 49 }
47 } 50 }
@@ -67,12 +67,13 @@ class WebSettingLogic extends BaseLogic @@ -67,12 +67,13 @@ class WebSettingLogic extends BaseLogic
67 public function sendNotifyMessage(){ 67 public function sendNotifyMessage(){
68 //获取当前项目所有未处理的更新并更换为1:处理中 2:处理完成 68 //获取当前项目所有未处理的更新并更换为1:处理中 2:处理完成
69 $updateNotifyModel = new UpdateNotify(); 69 $updateNotifyModel = new UpdateNotify();
70 - $info = $updateNotifyModel->read(['project_id'=>$this->user['project_id'],'status'=>0]);  
71 - if($info !== false){  
72 - $this->fail('当前页面正在生成中,请勿重复点击'); 70 + $list = $updateNotifyModel->list(['project_id'=>$this->user['project_id'],'status'=>1]);
  71 + if(!empty($list)){
  72 + return $this->success($list);
73 } 73 }
74 $updateNotifyModel->edit(['status'=>1],['project_id'=>$this->user['project_id'],'status'=>0]); 74 $updateNotifyModel->edit(['status'=>1],['project_id'=>$this->user['project_id'],'status'=>0]);
75 $urlStr = $this->user['domain'].'api/updateHtmlNotify?project_id='.$this->user['project_id']; 75 $urlStr = $this->user['domain'].'api/updateHtmlNotify?project_id='.$this->user['project_id'];
76 - return $urlStr; 76 + http_get($urlStr);
  77 + return $this->success();
77 } 78 }
78 } 79 }