正在显示
1 个修改的文件
包含
7 行增加
和
6 行删除
| @@ -69,17 +69,17 @@ class CNoticeController extends BaseController | @@ -69,17 +69,17 @@ class CNoticeController extends BaseController | ||
| 69 | $routeMapModel = new RouteMap(); | 69 | $routeMapModel = new RouteMap(); |
| 70 | $count = $routeMapModel->formatQuery(['project_id'=>$this->user['project_id']])->count(); | 70 | $count = $routeMapModel->formatQuery(['project_id'=>$this->user['project_id']])->count(); |
| 71 | $updateNotifyModel->edit(['status' => 1], ['project_id' => $this->user['project_id'], 'status' => 0]); | 71 | $updateNotifyModel->edit(['status' => 1], ['project_id' => $this->user['project_id'], 'status' => 0]); |
| 72 | - $this->addProgress($count,$this->param['type']); | 72 | + $this->addProgress($count,$this->param['type'],$this->param['page']); |
| 73 | }elseif($this->param['page'] == UpdateNotify::PAGE_SINGLE){ | 73 | }elseif($this->param['page'] == UpdateNotify::PAGE_SINGLE){ |
| 74 | //更新所有已修改的更新 | 74 | //更新所有已修改的更新 |
| 75 | $count = $updateNotifyModel->formatQuery(['project_id' => $this->user['project_id'], 'status' => 0])->count(); | 75 | $count = $updateNotifyModel->formatQuery(['project_id' => $this->user['project_id'], 'status' => 0])->count(); |
| 76 | $updateNotifyModel->edit(['status' => 1], ['project_id' => $this->user['project_id'], 'status' => 0]); | 76 | $updateNotifyModel->edit(['status' => 1], ['project_id' => $this->user['project_id'], 'status' => 0]); |
| 77 | - $this->addProgress($count,$this->param['type']); | 77 | + $this->addProgress($count,$this->param['type'],$this->param['page']); |
| 78 | }else{ | 78 | }else{ |
| 79 | //根据传递的参数更新 | 79 | //根据传递的参数更新 |
| 80 | $count = count($this->param['url']); | 80 | $count = count($this->param['url']); |
| 81 | $extent = json_encode(['url'=>$this->param['url']]); | 81 | $extent = json_encode(['url'=>$this->param['url']]); |
| 82 | - $this->addProgress($count,$this->param['type'],$extent); | 82 | + $this->addProgress($count,$this->param['type'],$this->param['page'],$extent); |
| 83 | } | 83 | } |
| 84 | }catch (\Exception $e){ | 84 | }catch (\Exception $e){ |
| 85 | $this->response('error',Code::USER_ERROR); | 85 | $this->response('error',Code::USER_ERROR); |
| @@ -108,7 +108,7 @@ class CNoticeController extends BaseController | @@ -108,7 +108,7 @@ class CNoticeController extends BaseController | ||
| 108 | $count = $routeMapModel->formatQuery(['project_id'=>$this->user['project_id']])->count(); | 108 | $count = $routeMapModel->formatQuery(['project_id'=>$this->user['project_id']])->count(); |
| 109 | $updateNotifyModel->edit(['minor_languages_status' => 1], ['project_id' => $this->user['project_id'], 'minor_languages_status' => 0]); | 109 | $updateNotifyModel->edit(['minor_languages_status' => 1], ['project_id' => $this->user['project_id'], 'minor_languages_status' => 0]); |
| 110 | $extent = json_encode(['language'=>$this->param['language']]); | 110 | $extent = json_encode(['language'=>$this->param['language']]); |
| 111 | - $this->addProgress($count,$this->param['type'],$extent); | 111 | + $this->addProgress($count,$this->param['type'],$this->param['page'],$extent); |
| 112 | }else{ | 112 | }else{ |
| 113 | $this->request->validate([ | 113 | $this->request->validate([ |
| 114 | 'url'=>'required', | 114 | 'url'=>'required', |
| @@ -120,7 +120,7 @@ class CNoticeController extends BaseController | @@ -120,7 +120,7 @@ class CNoticeController extends BaseController | ||
| 120 | //根据传递的参数更新 | 120 | //根据传递的参数更新 |
| 121 | $count = count($this->param['url']); | 121 | $count = count($this->param['url']); |
| 122 | $extent = json_encode(['url'=>$this->param['url'],'language'=>$this->param['language']]); | 122 | $extent = json_encode(['url'=>$this->param['url'],'language'=>$this->param['language']]); |
| 123 | - $this->addProgress($count,$this->param['type'],$extent); | 123 | + $this->addProgress($count,$this->param['type'],$this->param['page'],$extent); |
| 124 | } | 124 | } |
| 125 | }catch (\Exception $e){ | 125 | }catch (\Exception $e){ |
| 126 | $this->response('error',Code::USER_ERROR); | 126 | $this->response('error',Code::USER_ERROR); |
| @@ -161,11 +161,12 @@ class CNoticeController extends BaseController | @@ -161,11 +161,12 @@ class CNoticeController extends BaseController | ||
| 161 | * @method :post | 161 | * @method :post |
| 162 | * @time :2023/9/6 17:01 | 162 | * @time :2023/9/6 17:01 |
| 163 | */ | 163 | */ |
| 164 | - public function addProgress($count,$type,$extend = ''){ | 164 | + public function addProgress($count,$type,$page,$extend = ''){ |
| 165 | $data = [ | 165 | $data = [ |
| 166 | 'total_num'=>$count, | 166 | 'total_num'=>$count, |
| 167 | 'current_num'=>0, | 167 | 'current_num'=>0, |
| 168 | 'type'=>$type, | 168 | 'type'=>$type, |
| 169 | + 'page'=>$page, | ||
| 169 | 'extend'=>$extend, | 170 | 'extend'=>$extend, |
| 170 | 'project_id'=>$this->user['project_id'], | 171 | 'project_id'=>$this->user['project_id'], |
| 171 | 'created_at'=>date('Y-m-d H;i:s') | 172 | 'created_at'=>date('Y-m-d H;i:s') |
-
请 注册 或 登录 后发表评论