commit | author | age
|
91dc6c
|
1 |
/* |
I |
2 |
Copyright [2020] [https://www.xiaonuo.vip] |
|
3 |
|
|
4 |
Licensed under the Apache License, Version 2.0 (the "License"); |
|
5 |
you may not use this file except in compliance with the License. |
|
6 |
You may obtain a copy of the License at |
|
7 |
|
|
8 |
http://www.apache.org/licenses/LICENSE-2.0 |
|
9 |
|
|
10 |
Unless required by applicable law or agreed to in writing, software |
|
11 |
distributed under the License is distributed on an "AS IS" BASIS, |
|
12 |
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
13 |
See the License for the specific language governing permissions and |
|
14 |
limitations under the License. |
|
15 |
|
|
16 |
Snowy采用APACHE LICENSE 2.0开源协议,您在使用过程中,需要注意以下几点: |
|
17 |
|
|
18 |
1.请不要删除和修改根目录下的LICENSE文件。 |
|
19 |
2.请不要删除和修改Snowy源码头部的版权声明。 |
|
20 |
3.请保留源码和相关描述文件的项目出处,作者声明等。 |
|
21 |
4.分发源码时候,请注明软件出处 https://gitee.com/xiaonuobase/snowy |
|
22 |
5.在修改包名,模块名称,项目代码等时,请注明软件出处 https://gitee.com/xiaonuobase/snowy |
|
23 |
6.若您的项目无法满足以上几点,可申请商业授权,获取Snowy商业授权许可,请在官网购买授权,地址为 https://www.xiaonuo.vip |
|
24 |
*/ |
|
25 |
package vip.xiaonuo.modular.blogarticletype.controller; |
|
26 |
|
|
27 |
import vip.xiaonuo.core.annotion.BusinessLog; |
|
28 |
import vip.xiaonuo.core.annotion.Permission; |
|
29 |
import vip.xiaonuo.core.enums.LogAnnotionOpTypeEnum; |
|
30 |
import vip.xiaonuo.core.pojo.response.ResponseData; |
|
31 |
import vip.xiaonuo.core.pojo.response.SuccessResponseData; |
|
32 |
import vip.xiaonuo.modular.blogarticletype.param.BlogArticleTypeParam; |
|
33 |
import vip.xiaonuo.modular.blogarticletype.service.BlogArticleTypeService; |
|
34 |
import org.springframework.web.bind.annotation.RestController; |
|
35 |
import org.springframework.validation.annotation.Validated; |
|
36 |
import org.springframework.web.bind.annotation.GetMapping; |
|
37 |
import org.springframework.web.bind.annotation.PostMapping; |
|
38 |
import org.springframework.web.bind.annotation.RequestBody; |
|
39 |
import javax.annotation.Resource; |
|
40 |
import java.util.List; |
|
41 |
|
|
42 |
/** |
|
43 |
* blog文章分类控制器 |
|
44 |
* |
|
45 |
* @author inleft |
|
46 |
* @date 2022-02-15 15:17:15 |
|
47 |
*/ |
|
48 |
@RestController |
|
49 |
public class BlogArticleTypeController { |
|
50 |
|
|
51 |
@Resource |
|
52 |
private BlogArticleTypeService blogArticleTypeService; |
|
53 |
|
|
54 |
/** |
|
55 |
* 查询blog文章分类 |
|
56 |
* |
|
57 |
* @author inleft |
|
58 |
* @date 2022-02-15 15:17:15 |
|
59 |
*/ |
|
60 |
@Permission |
|
61 |
@GetMapping("/blogArticleType/page") |
|
62 |
@BusinessLog(title = "blog文章分类_查询", opType = LogAnnotionOpTypeEnum.QUERY) |
|
63 |
public ResponseData page(BlogArticleTypeParam blogArticleTypeParam) { |
|
64 |
return new SuccessResponseData(blogArticleTypeService.page(blogArticleTypeParam)); |
|
65 |
} |
|
66 |
|
|
67 |
/** |
|
68 |
* 添加blog文章分类 |
|
69 |
* |
|
70 |
* @author inleft |
|
71 |
* @date 2022-02-15 15:17:15 |
|
72 |
*/ |
|
73 |
@Permission |
|
74 |
@PostMapping("/blogArticleType/add") |
|
75 |
@BusinessLog(title = "blog文章分类_增加", opType = LogAnnotionOpTypeEnum.ADD) |
|
76 |
public ResponseData add(@RequestBody @Validated(BlogArticleTypeParam.add.class) BlogArticleTypeParam blogArticleTypeParam) { |
|
77 |
blogArticleTypeService.add(blogArticleTypeParam); |
|
78 |
return new SuccessResponseData(); |
|
79 |
} |
|
80 |
|
|
81 |
/** |
|
82 |
* 删除blog文章分类,可批量删除 |
|
83 |
* |
|
84 |
* @author inleft |
|
85 |
* @date 2022-02-15 15:17:15 |
|
86 |
*/ |
|
87 |
@Permission |
|
88 |
@PostMapping("/blogArticleType/delete") |
|
89 |
@BusinessLog(title = "blog文章分类_删除", opType = LogAnnotionOpTypeEnum.DELETE) |
|
90 |
public ResponseData delete(@RequestBody @Validated(BlogArticleTypeParam.delete.class) List<BlogArticleTypeParam> blogArticleTypeParamList) { |
|
91 |
blogArticleTypeService.delete(blogArticleTypeParamList); |
|
92 |
return new SuccessResponseData(); |
|
93 |
} |
|
94 |
|
|
95 |
/** |
|
96 |
* 编辑blog文章分类 |
|
97 |
* |
|
98 |
* @author inleft |
|
99 |
* @date 2022-02-15 15:17:15 |
|
100 |
*/ |
|
101 |
@Permission |
|
102 |
@PostMapping("/blogArticleType/edit") |
|
103 |
@BusinessLog(title = "blog文章分类_编辑", opType = LogAnnotionOpTypeEnum.EDIT) |
|
104 |
public ResponseData edit(@RequestBody @Validated(BlogArticleTypeParam.edit.class) BlogArticleTypeParam blogArticleTypeParam) { |
|
105 |
blogArticleTypeService.edit(blogArticleTypeParam); |
|
106 |
return new SuccessResponseData(); |
|
107 |
} |
|
108 |
|
|
109 |
/** |
|
110 |
* 查看blog文章分类 |
|
111 |
* |
|
112 |
* @author inleft |
|
113 |
* @date 2022-02-15 15:17:15 |
|
114 |
*/ |
|
115 |
@Permission |
|
116 |
@GetMapping("/blogArticleType/detail") |
|
117 |
@BusinessLog(title = "blog文章分类_查看", opType = LogAnnotionOpTypeEnum.DETAIL) |
|
118 |
public ResponseData detail(@Validated(BlogArticleTypeParam.detail.class) BlogArticleTypeParam blogArticleTypeParam) { |
|
119 |
return new SuccessResponseData(blogArticleTypeService.detail(blogArticleTypeParam)); |
|
120 |
} |
|
121 |
|
|
122 |
/** |
|
123 |
* blog文章分类列表 |
|
124 |
* |
|
125 |
* @author inleft |
|
126 |
* @date 2022-02-15 15:17:15 |
|
127 |
*/ |
|
128 |
@Permission |
|
129 |
@GetMapping("/blogArticleType/list") |
|
130 |
@BusinessLog(title = "blog文章分类_列表", opType = LogAnnotionOpTypeEnum.QUERY) |
|
131 |
public ResponseData list(BlogArticleTypeParam blogArticleTypeParam) { |
|
132 |
return new SuccessResponseData(blogArticleTypeService.list(blogArticleTypeParam)); |
|
133 |
} |
|
134 |
|
|
135 |
/** |
|
136 |
* 导出系统用户 |
|
137 |
* |
|
138 |
* @author inleft |
|
139 |
* @date 2022-02-15 15:17:15 |
|
140 |
*/ |
|
141 |
@Permission |
|
142 |
@GetMapping("/blogArticleType/export") |
|
143 |
@BusinessLog(title = "blog文章分类_导出", opType = LogAnnotionOpTypeEnum.EXPORT) |
|
144 |
public void export(BlogArticleTypeParam blogArticleTypeParam) { |
|
145 |
blogArticleTypeService.export(blogArticleTypeParam); |
|
146 |
} |
|
147 |
|
|
148 |
} |