合并分支 'lyh-server' 到 'master'
Lyh server 查看合并请求 !2379
正在显示
5 个修改的文件
包含
16 行增加
和
7 行删除
| @@ -84,7 +84,7 @@ class GeoQuestionRes extends Command | @@ -84,7 +84,7 @@ class GeoQuestionRes extends Command | ||
| 84 | GET_RESULT: | 84 | GET_RESULT: |
| 85 | $error_num++; | 85 | $error_num++; |
| 86 | try { | 86 | try { |
| 87 | - echo '执行时间:'.date('Y-m-d H:i:s').'->执行次数:'.$error_num.',执行平台:'.$platform.PHP_EOL; | 87 | + $this->output('执行时间:'.date('Y-m-d H:i:s').'->执行次数:'.$error_num.',执行平台:'.$platform.'执行的项目id:'.$taskInfo['project_id'].PHP_EOL); |
| 88 | if ($error_num >= 3) { | 88 | if ($error_num >= 3) { |
| 89 | continue; | 89 | continue; |
| 90 | } | 90 | } |
| @@ -114,9 +114,10 @@ class GeoArticleController extends BaseController | @@ -114,9 +114,10 @@ class GeoArticleController extends BaseController | ||
| 114 | */ | 114 | */ |
| 115 | public function del(){ | 115 | public function del(){ |
| 116 | $this->request->validate([ | 116 | $this->request->validate([ |
| 117 | - 'id'=>'required', | 117 | + 'ids'=>'required|array', |
| 118 | ],[ | 118 | ],[ |
| 119 | - 'id.required' => 'ID不能为空', | 119 | + 'ids.required' => 'IDs不能为空', |
| 120 | + 'ids.array' => '数据详情为数组', | ||
| 120 | ]); | 121 | ]); |
| 121 | $data = $this->logic->delArticle(); | 122 | $data = $this->logic->delArticle(); |
| 122 | $this->response('success',Code::SUCCESS,$data); | 123 | $this->response('success',Code::SUCCESS,$data); |
| @@ -91,9 +91,10 @@ class GeoLinkController extends BaseController | @@ -91,9 +91,10 @@ class GeoLinkController extends BaseController | ||
| 91 | */ | 91 | */ |
| 92 | public function del(){ | 92 | public function del(){ |
| 93 | $this->request->validate([ | 93 | $this->request->validate([ |
| 94 | - 'id'=>'required', | 94 | + 'ids'=>'required|array', |
| 95 | ],[ | 95 | ],[ |
| 96 | - 'id.required' => 'ID不能为空', | 96 | + 'ids.required' => 'IDs不能为空', |
| 97 | + 'ids.array' => '数据详情为数组', | ||
| 97 | ]); | 98 | ]); |
| 98 | $data = $this->logic->delLink(); | 99 | $data = $this->logic->delLink(); |
| 99 | $this->response('success',Code::SUCCESS,$data); | 100 | $this->response('success',Code::SUCCESS,$data); |
| @@ -115,7 +115,7 @@ class GeoArticleLogic extends BaseLogic | @@ -115,7 +115,7 @@ class GeoArticleLogic extends BaseLogic | ||
| 115 | */ | 115 | */ |
| 116 | public function delArticle(){ | 116 | public function delArticle(){ |
| 117 | try { | 117 | try { |
| 118 | - $this->model->del($this->param); | 118 | + $this->model->del(['id'=>['in',$this->param['ids']]]); |
| 119 | }catch (\Exception $e){ | 119 | }catch (\Exception $e){ |
| 120 | $this->fail('删除失败,请联系管理员.'); | 120 | $this->fail('删除失败,请联系管理员.'); |
| 121 | } | 121 | } |
| @@ -64,6 +64,13 @@ class GeoLinkLogic extends BaseLogic | @@ -64,6 +64,13 @@ class GeoLinkLogic extends BaseLogic | ||
| 64 | * @time :2025/7/14 16:50 | 64 | * @time :2025/7/14 16:50 |
| 65 | */ | 65 | */ |
| 66 | public function saveLink(){ | 66 | public function saveLink(){ |
| 67 | + $data = [ | ||
| 68 | + 'project_id' => 1, | ||
| 69 | + 'data' => [ | ||
| 70 | + ['da'=>'ce_shi1', 'url'=>'www.baidu.com', 'send_time'=>'2021-07-09 11:12:12'], | ||
| 71 | + ['da'=>'ce_shi2', 'url'=>'www.baidu1.com', 'send_time'=>'2021-07-10 11:13:12'], | ||
| 72 | + ], | ||
| 73 | + ]; | ||
| 67 | try { | 74 | try { |
| 68 | if(!empty($this->param['data'])){ | 75 | if(!empty($this->param['data'])){ |
| 69 | $data = []; | 76 | $data = []; |
| @@ -92,7 +99,7 @@ class GeoLinkLogic extends BaseLogic | @@ -92,7 +99,7 @@ class GeoLinkLogic extends BaseLogic | ||
| 92 | */ | 99 | */ |
| 93 | public function delLink(){ | 100 | public function delLink(){ |
| 94 | try { | 101 | try { |
| 95 | - $this->model->del($this->param); | 102 | + $this->model->del(['id'=>['in',$this->param['ids']]]); |
| 96 | }catch (\Exception $e){ | 103 | }catch (\Exception $e){ |
| 97 | $this->fail('删除失败,请联系管理员.'); | 104 | $this->fail('删除失败,请联系管理员.'); |
| 98 | } | 105 | } |
-
请 注册 或 登录 后发表评论