正在显示
1 个修改的文件
包含
6 行增加
和
1 行删除
| @@ -1224,12 +1224,17 @@ class ProjectController extends BaseController | @@ -1224,12 +1224,17 @@ class ProjectController extends BaseController | ||
| 1224 | * @time :2025/6/10 10:51 | 1224 | * @time :2025/6/10 10:51 |
| 1225 | */ | 1225 | */ |
| 1226 | public function generateCountCharts(){ | 1226 | public function generateCountCharts(){ |
| 1227 | + $this->request->validate([ | ||
| 1228 | + 'project_id'=>'required', | ||
| 1229 | + ],[ | ||
| 1230 | + 'project_id.required' => '项目id不能为空', | ||
| 1231 | + ]); | ||
| 1227 | $noticeModel = new NoticeLog(); | 1232 | $noticeModel = new NoticeLog(); |
| 1228 | $info = $noticeModel->read(['type'=>NoticeLog::TYPE_GENERATE_COUNT_CHARTS,'status'=>0,'data'=>['like','%"'.$this->param['project_id'].'"%']]); | 1233 | $info = $noticeModel->read(['type'=>NoticeLog::TYPE_GENERATE_COUNT_CHARTS,'status'=>0,'data'=>['like','%"'.$this->param['project_id'].'"%']]); |
| 1229 | if($info !== false){ | 1234 | if($info !== false){ |
| 1230 | $this->fail('当前数据在生成中'); | 1235 | $this->fail('当前数据在生成中'); |
| 1231 | } | 1236 | } |
| 1232 | - NoticeLog::createLog(NoticeLog::TYPE_GENERATE_COUNT_CHARTS, ['project_id' => $this->user['project_id']]); | 1237 | + NoticeLog::createLog(NoticeLog::TYPE_GENERATE_COUNT_CHARTS, ['project_id' => $this->param['project_id']]); |
| 1233 | $this->response('success'); | 1238 | $this->response('success'); |
| 1234 | } | 1239 | } |
| 1235 | } | 1240 | } |
-
请 注册 或 登录 后发表评论