@@ -75,7 +75,7 @@ public abstract class BaseController<S extends BaseService<V, D, Q, C>, V, D, Q,
75
75
@ Operation (summary = "分页查询列表" )
76
76
@ ResponseBody
77
77
@ GetMapping
78
- protected R <PageDataVO <V >> page (@ Validated Q query , @ Validated PageQuery pageQuery ) {
78
+ public R <PageDataVO <V >> page (@ Validated Q query , @ Validated PageQuery pageQuery ) {
79
79
this .checkPermission ("list" );
80
80
PageDataVO <V > pageDataVO = baseService .page (query , pageQuery );
81
81
return R .ok (pageDataVO );
@@ -93,7 +93,7 @@ protected R<PageDataVO<V>> page(@Validated Q query, @Validated PageQuery pageQue
93
93
@ Operation (summary = "查询树列表" )
94
94
@ ResponseBody
95
95
@ GetMapping ("/tree" )
96
- protected R <List <Tree <Long >>> tree (@ Validated Q query , @ Validated SortQuery sortQuery ) {
96
+ public R <List <Tree <Long >>> tree (@ Validated Q query , @ Validated SortQuery sortQuery ) {
97
97
this .checkPermission ("list" );
98
98
List <Tree <Long >> list = baseService .tree (query , sortQuery , false );
99
99
return R .ok (list );
@@ -111,7 +111,7 @@ protected R<List<Tree<Long>>> tree(@Validated Q query, @Validated SortQuery sort
111
111
@ Operation (summary = "查询列表" )
112
112
@ ResponseBody
113
113
@ GetMapping ("/list" )
114
- protected R <List <V >> list (@ Validated Q query , @ Validated SortQuery sortQuery ) {
114
+ public R <List <V >> list (@ Validated Q query , @ Validated SortQuery sortQuery ) {
115
115
this .checkPermission ("list" );
116
116
List <V > list = baseService .list (query , sortQuery );
117
117
return R .ok (list );
@@ -128,7 +128,7 @@ protected R<List<V>> list(@Validated Q query, @Validated SortQuery sortQuery) {
128
128
@ Parameter (name = "id" , description = "ID" , in = ParameterIn .PATH )
129
129
@ ResponseBody
130
130
@ GetMapping ("/{id}" )
131
- protected R <D > get (@ PathVariable Long id ) {
131
+ public R <D > get (@ PathVariable Long id ) {
132
132
this .checkPermission ("list" );
133
133
D detail = baseService .get (id );
134
134
return R .ok (detail );
@@ -144,7 +144,7 @@ protected R<D> get(@PathVariable Long id) {
144
144
@ Operation (summary = "新增数据" )
145
145
@ ResponseBody
146
146
@ PostMapping
147
- protected R <Long > add (@ Validated (BaseRequest .Add .class ) @ RequestBody C request ) {
147
+ public R <Long > add (@ Validated (BaseRequest .Add .class ) @ RequestBody C request ) {
148
148
this .checkPermission ("add" );
149
149
Long id = baseService .add (request );
150
150
return R .ok ("新增成功" , id );
@@ -162,7 +162,7 @@ protected R<Long> add(@Validated(BaseRequest.Add.class) @RequestBody C request)
162
162
@ Operation (summary = "修改数据" )
163
163
@ ResponseBody
164
164
@ PutMapping ("/{id}" )
165
- protected R update (@ Validated (BaseRequest .Update .class ) @ RequestBody C request , @ PathVariable Long id ) {
165
+ public R update (@ Validated (BaseRequest .Update .class ) @ RequestBody C request , @ PathVariable Long id ) {
166
166
this .checkPermission ("update" );
167
167
baseService .update (request , id );
168
168
return R .ok ("修改成功" );
@@ -179,7 +179,7 @@ protected R update(@Validated(BaseRequest.Update.class) @RequestBody C request,
179
179
@ Parameter (name = "ids" , description = "ID 列表" , in = ParameterIn .PATH )
180
180
@ ResponseBody
181
181
@ DeleteMapping ("/{ids}" )
182
- protected R delete (@ PathVariable List <Long > ids ) {
182
+ public R delete (@ PathVariable List <Long > ids ) {
183
183
this .checkPermission ("delete" );
184
184
baseService .delete (ids );
185
185
return R .ok ("删除成功" );
@@ -197,7 +197,7 @@ protected R delete(@PathVariable List<Long> ids) {
197
197
*/
198
198
@ Operation (summary = "导出数据" )
199
199
@ GetMapping ("/export" )
200
- protected void export (@ Validated Q query , @ Validated SortQuery sortQuery , HttpServletResponse response ) {
200
+ public void export (@ Validated Q query , @ Validated SortQuery sortQuery , HttpServletResponse response ) {
201
201
this .checkPermission ("export" );
202
202
baseService .export (query , sortQuery , response );
203
203
}
0 commit comments