作者 赵彬吉

Merge branch 'dev' of http://47.244.231.31:8099/zhl/globalso-v6 into dev

@@ -30,8 +30,8 @@ class ProjectMenuController extends BaseController @@ -30,8 +30,8 @@ class ProjectMenuController extends BaseController
30 * @author :liyuhang 30 * @author :liyuhang
31 * @method 31 * @method
32 */ 32 */
33 - public function info(Request $request,ProjectMenuLogic $projectMenuLogic){  
34 - $request->validate([ 33 + public function info(ProjectMenuLogic $projectMenuLogic){
  34 + $this->request->validate([
35 'id'=>'required' 35 'id'=>'required'
36 ],[ 36 ],[
37 'id.required' => 'ID不能为空' 37 'id.required' => 'ID不能为空'
@@ -74,11 +74,12 @@ class ProjectMenuController extends BaseController @@ -74,11 +74,12 @@ class ProjectMenuController extends BaseController
74 * @author :liyuhang 74 * @author :liyuhang
75 * @method 75 * @method
76 */ 76 */
77 - public function del(Request $request,ProjectMenuLogic $projectMenuLogic){  
78 - $request->validate([  
79 - 'id'=>'required' 77 + public function del(ProjectMenuLogic $projectMenuLogic){
  78 + $this->request->validate([
  79 + 'id'=>['required','array'],
80 ],[ 80 ],[
81 - 'id.required' => 'ID不能为空' 81 + 'id.required' => 'ID不能为空',
  82 + 'id.array' => 'ID为数组',
82 ]); 83 ]);
83 $projectMenuLogic->menu_del(); 84 $projectMenuLogic->menu_del();
84 $this->response('success'); 85 $this->response('success');
@@ -29,8 +29,8 @@ class ProjectRoleController extends BaseController @@ -29,8 +29,8 @@ class ProjectRoleController extends BaseController
29 * @author :liyuhang 29 * @author :liyuhang
30 * @method 30 * @method
31 */ 31 */
32 - public function info(Request $request,ProjectRoleLogic $roleLogic){  
33 - $request->validate([ 32 + public function info(ProjectRoleLogic $roleLogic){
  33 + $this->request->validate([
34 'id'=>'required' 34 'id'=>'required'
35 ],[ 35 ],[
36 'id.required' => 'ID不能为空' 36 'id.required' => 'ID不能为空'
@@ -86,11 +86,12 @@ class ProjectRoleController extends BaseController @@ -86,11 +86,12 @@ class ProjectRoleController extends BaseController
86 * @author :liyuhang 86 * @author :liyuhang
87 * @method 87 * @method
88 */ 88 */
89 - public function del(Request $request,ProjectRoleLogic $roleLogic){  
90 - $request->validate([  
91 - 'id'=>'required' 89 + public function del(ProjectRoleLogic $roleLogic){
  90 + $this->request->validate([
  91 + 'id'=>['required','array'],
92 ],[ 92 ],[
93 - 'id.required' => 'ID不能为空' 93 + 'id.required' => 'ID不能为空',
  94 + 'id.array' => 'ID为数组',
94 ]); 95 ]);
95 $roleLogic->role_del(); 96 $roleLogic->role_del();
96 //TODO::删除 97 //TODO::删除
@@ -74,10 +74,11 @@ class ProjectUserController extends BaseController @@ -74,10 +74,11 @@ class ProjectUserController extends BaseController
74 * @method 74 * @method
75 */ 75 */
76 public function del(Request $request,UserLogic $userLogic){ 76 public function del(Request $request,UserLogic $userLogic){
77 - $request->validate([  
78 - 'id'=>'required' 77 + $this->request->validate([
  78 + 'id'=>['required','array'],
79 ],[ 79 ],[
80 - 'id.required' => 'ID不能为空' 80 + 'id.required' => 'ID不能为空',
  81 + 'id.array' => 'ID为数组',
81 ]); 82 ]);
82 $userLogic->user_del(); 83 $userLogic->user_del();
83 $this->response('success'); 84 $this->response('success');
@@ -92,9 +92,10 @@ class BlogCategoryController extends BaseController @@ -92,9 +92,10 @@ class BlogCategoryController extends BaseController
92 */ 92 */
93 public function del(BlogCategoryLogic $blogCategoryLogic){ 93 public function del(BlogCategoryLogic $blogCategoryLogic){
94 $this->request->validate([ 94 $this->request->validate([
95 - 'id'=>['required'], 95 + 'id'=>['required','array'],
96 ],[ 96 ],[
97 'id.required' => 'ID不能为空', 97 'id.required' => 'ID不能为空',
  98 + 'id.array' => 'ID为数组',
98 ]); 99 ]);
99 $blogCategoryLogic->del_blog_category(); 100 $blogCategoryLogic->del_blog_category();
100 //TODO::写入操作日志 101 //TODO::写入操作日志
@@ -136,9 +136,10 @@ class BlogController extends BaseController @@ -136,9 +136,10 @@ class BlogController extends BaseController
136 */ 136 */
137 public function del(BlogLogic $blogLogic){ 137 public function del(BlogLogic $blogLogic){
138 $this->request->validate([ 138 $this->request->validate([
139 - 'id'=>['required'], 139 + 'id'=>['required','array'],
140 ],[ 140 ],[
141 'id.required' => 'ID不能为空', 141 'id.required' => 'ID不能为空',
  142 + 'id.array' => 'ID为数组',
142 ]); 143 ]);
143 $blogLogic->blog_del(); 144 $blogLogic->blog_del();
144 $this->response('success'); 145 $this->response('success');
@@ -78,9 +78,10 @@ class BlogLabelController extends BaseController @@ -78,9 +78,10 @@ class BlogLabelController extends BaseController
78 */ 78 */
79 public function del(BlogLabelLogic $blogLabelLogic){ 79 public function del(BlogLabelLogic $blogLabelLogic){
80 $this->request->validate([ 80 $this->request->validate([
81 - 'id'=>['required'], 81 + 'id'=>['required','array'],
82 ],[ 82 ],[
83 'id.required' => 'ID不能为空', 83 'id.required' => 'ID不能为空',
  84 + 'id.array' => 'ID为数组',
84 ]); 85 ]);
85 $blogLabelLogic->del_blog_label(); 86 $blogLabelLogic->del_blog_label();
86 $this->response('success'); 87 $this->response('success');
@@ -92,9 +92,10 @@ class NewsCategoryController extends BaseController @@ -92,9 +92,10 @@ class NewsCategoryController extends BaseController
92 */ 92 */
93 public function del(NewsCategoryLogic $newsCategoryLogic){ 93 public function del(NewsCategoryLogic $newsCategoryLogic){
94 $this->request->validate([ 94 $this->request->validate([
95 - 'id'=>['required'], 95 + 'id'=>['required','array'],
96 ],[ 96 ],[
97 'id.required' => 'ID不能为空', 97 'id.required' => 'ID不能为空',
  98 + 'id.array' => 'ID为数组',
98 ]); 99 ]);
99 $newsCategoryLogic->del_news_category(); 100 $newsCategoryLogic->del_news_category();
100 $this->response('success'); 101 $this->response('success');
@@ -133,9 +133,10 @@ class NewsController extends BaseController @@ -133,9 +133,10 @@ class NewsController extends BaseController
133 */ 133 */
134 public function del(NewsLogic $newsLogic){ 134 public function del(NewsLogic $newsLogic){
135 $this->request->validate([ 135 $this->request->validate([
136 - 'id'=>['required'], 136 + 'id'=>['required','array'],
137 ],[ 137 ],[
138 'id.required' => 'ID不能为空', 138 'id.required' => 'ID不能为空',
  139 + 'id.array' => 'ID为数组',
139 ]); 140 ]);
140 $newsLogic->news_del(); 141 $newsLogic->news_del();
141 //TODO::清空相关资源/写入日志 142 //TODO::清空相关资源/写入日志
@@ -96,9 +96,10 @@ class ProjectGroupController extends BaseController @@ -96,9 +96,10 @@ class ProjectGroupController extends BaseController
96 */ 96 */
97 public function del(GroupLogic $groupLogic){ 97 public function del(GroupLogic $groupLogic){
98 $this->request->validate([ 98 $this->request->validate([
99 - 'id'=>['required'], 99 + 'id'=>['required','array'],
100 ],[ 100 ],[
101 'id.required' => 'ID不能为空', 101 'id.required' => 'ID不能为空',
  102 + 'id.array' => 'ID为数组',
102 ]); 103 ]);
103 $groupLogic->group_del($this->param); 104 $groupLogic->group_del($this->param);
104 $this->response('success'); 105 $this->response('success');
@@ -116,9 +116,10 @@ class ProjectRoleController extends BaseController @@ -116,9 +116,10 @@ class ProjectRoleController extends BaseController
116 */ 116 */
117 public function del(RoleLogic $roleLogic){ 117 public function del(RoleLogic $roleLogic){
118 $this->request->validate([ 118 $this->request->validate([
119 - 'id'=>['required'] 119 + 'id'=>['required','array'],
120 ],[ 120 ],[
121 - 'id.required' => 'ID不能为空' 121 + 'id.required' => 'ID不能为空',
  122 + 'id.array' => 'ID为数组',
122 ]); 123 ]);
123 $roleLogic->role_del(); 124 $roleLogic->role_del();
124 $this->response('success'); 125 $this->response('success');
@@ -96,9 +96,10 @@ class UserController extends BaseController @@ -96,9 +96,10 @@ class UserController extends BaseController
96 */ 96 */
97 public function del(UserLogic $userLogic){ 97 public function del(UserLogic $userLogic){
98 $this->request->validate([ 98 $this->request->validate([
99 - 'id'=>['required'], 99 + 'id'=>['required','array'],
100 ],[ 100 ],[
101 'id.required' => 'ID不能为空', 101 'id.required' => 'ID不能为空',
  102 + 'id.array' => 'ID为数组',
102 ]); 103 ]);
103 $userLogic->user_del(); 104 $userLogic->user_del();
104 $this->response('success'); 105 $this->response('success');
@@ -191,12 +191,7 @@ class BlogLogic extends BaseLogic @@ -191,12 +191,7 @@ class BlogLogic extends BaseLogic
191 public function blog_del(){ 191 public function blog_del(){
192 $ids = $this->param['id']; 192 $ids = $this->param['id'];
193 $this->param['id'] = ['in',$this->param['id']]; 193 $this->param['id'] = ['in',$this->param['id']];
194 - $rs = $this->model->del($this->param);  
195 - if($rs === false){  
196 - $this->fail('error',Code::USER_ERROR);  
197 - }  
198 - //清除缓存  
199 - Common::del_user_cache($this->model->getTable(),$ids); 194 + $this->del($this->param,$ids);
200 return $this->success(); 195 return $this->success();
201 } 196 }
202 197