|
...
|
...
|
@@ -92,10 +92,11 @@ class KeywordController extends BaseController |
|
|
|
*/
|
|
|
|
public function batchAdd(KeywordLogic $logic){
|
|
|
|
$this->request->validate([
|
|
|
|
'title'=>['required','array']
|
|
|
|
'title'=>['required','array', 'max:1000']
|
|
|
|
],[
|
|
|
|
'title.required' => 'title不能为空',
|
|
|
|
'title.array' => 'title为数组'
|
|
|
|
'title.array' => 'title为数组',
|
|
|
|
'title.max' => '批量操作不能超过1000条数据'
|
|
|
|
]);
|
|
|
|
$logic->batchAdd();
|
|
|
|
$this->response('success');
|
|
...
|
...
|
@@ -119,4 +120,22 @@ class KeywordController extends BaseController |
|
|
|
$this->response('success');
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 批量删除
|
|
|
|
* @param KeywordLogic $logic
|
|
|
|
* @author zbj
|
|
|
|
* @date 2023/11/22
|
|
|
|
*/
|
|
|
|
public function batchDel(KeywordLogic $logic){
|
|
|
|
$this->request->validate([
|
|
|
|
'title'=>['required','array', 'max:1000']
|
|
|
|
],[
|
|
|
|
'title.required' => 'title不能为空',
|
|
|
|
'title.array' => 'title为数组',
|
|
|
|
'title.max' => '批量操作不能超过1000条数据'
|
|
|
|
]);
|
|
|
|
$logic->batchDel();
|
|
|
|
$this->response('success');
|
|
|
|
}
|
|
|
|
|
|
|
|
} |
...
|
...
|
|