|
@@ -1,13 +1,12 @@
|
|
package com.ym.mec.web.controller.degree;
|
|
package com.ym.mec.web.controller.degree;
|
|
|
|
|
|
-import com.alibaba.fastjson.JSONObject;
|
|
|
|
-import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
|
import com.microsvc.toolkit.common.response.paging.PageInfo;
|
|
import com.microsvc.toolkit.common.response.paging.PageInfo;
|
|
import com.microsvc.toolkit.common.response.paging.QueryInfo;
|
|
import com.microsvc.toolkit.common.response.paging.QueryInfo;
|
|
-import com.microsvc.toolkit.common.response.template.R;
|
|
|
|
|
|
+
|
|
|
|
+import com.alibaba.fastjson.JSONObject;
|
|
import com.ym.mec.biz.dal.entity.DegreeLevelFeeNew;
|
|
import com.ym.mec.biz.dal.entity.DegreeLevelFeeNew;
|
|
-import com.ym.mec.biz.dal.wrapper.DegreeLevelFeeWrapper;
|
|
|
|
-import com.ym.mec.biz.service.DegreeLevelFeeService;
|
|
|
|
|
|
+import com.ym.mec.common.controller.BaseController;
|
|
|
|
+import com.ym.mec.common.entity.HttpResponseResult;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
@@ -21,13 +20,17 @@ import org.springframework.web.bind.annotation.RequestBody;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
+import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
|
+
|
|
|
|
+import com.ym.mec.biz.service.DegreeLevelFeeService;
|
|
|
|
+import com.ym.mec.biz.dal.wrapper.DegreeLevelFeeWrapper;
|
|
|
|
|
|
@Slf4j
|
|
@Slf4j
|
|
@Validated
|
|
@Validated
|
|
@RestController
|
|
@RestController
|
|
@RequestMapping("/degreeLevelFee")
|
|
@RequestMapping("/degreeLevelFee")
|
|
@Api(tags = "考级等级费用配置")
|
|
@Api(tags = "考级等级费用配置")
|
|
-public class DegreeLevelFeeController {
|
|
|
|
|
|
+public class DegreeLevelFeeController extends BaseController {
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
private DegreeLevelFeeService degreeLevelFeeService;
|
|
private DegreeLevelFeeService degreeLevelFeeService;
|
|
@@ -35,50 +38,50 @@ public class DegreeLevelFeeController {
|
|
@ApiOperation(value = "详情", notes = "考级等级费用配置-根据详情ID查询单条, 传入id")
|
|
@ApiOperation(value = "详情", notes = "考级等级费用配置-根据详情ID查询单条, 传入id")
|
|
@PreAuthorize("@pcs.hasPermissions('degreeLevelFee/detail')")
|
|
@PreAuthorize("@pcs.hasPermissions('degreeLevelFee/detail')")
|
|
@GetMapping("/detail/{id}")
|
|
@GetMapping("/detail/{id}")
|
|
- public R<DegreeLevelFeeNew> detail(@PathVariable("id") Long id) {
|
|
|
|
-
|
|
|
|
- DegreeLevelFeeNew wrapper = degreeLevelFeeService.detail(id);
|
|
|
|
|
|
+ public HttpResponseResult<DegreeLevelFeeNew> detail(@PathVariable("id") Long id) {
|
|
|
|
+
|
|
|
|
+ DegreeLevelFeeNew wrapper = degreeLevelFeeService.detail(id);
|
|
|
|
|
|
- return R.from(wrapper);
|
|
|
|
|
|
+ return succeed(wrapper);
|
|
}
|
|
}
|
|
|
|
|
|
- @ApiOperation(value = "查询分页", notes = "考级等级费用配置- 传入 DegreeLevelFeeWrapper.DegreeLevelFeeQuery")
|
|
|
|
|
|
+ @ApiOperation(value = "查询分页", notes = "考级等级费用配置- 传入 DegreeLevelFeeWrapper.DegreeLevelFeeQuery")
|
|
@PreAuthorize("@pcs.hasPermissions('degreeLevelFee/page')")
|
|
@PreAuthorize("@pcs.hasPermissions('degreeLevelFee/page')")
|
|
@PostMapping("/page")
|
|
@PostMapping("/page")
|
|
- public R<PageInfo<DegreeLevelFeeNew>> page(@RequestBody DegreeLevelFeeWrapper.DegreeLevelFeeQuery query) {
|
|
|
|
|
|
+ public HttpResponseResult<PageInfo<DegreeLevelFeeNew>> page(@RequestBody DegreeLevelFeeWrapper.DegreeLevelFeeQuery query) {
|
|
|
|
|
|
IPage<DegreeLevelFeeNew> pages = degreeLevelFeeService.selectPage(QueryInfo.getPage(query), query);
|
|
IPage<DegreeLevelFeeNew> pages = degreeLevelFeeService.selectPage(QueryInfo.getPage(query), query);
|
|
|
|
|
|
- return R.from(QueryInfo.pageInfo(pages));
|
|
|
|
|
|
+ return succeed(QueryInfo.pageInfo(pages));
|
|
}
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "新增", notes = "考级等级费用配置- 传入 DegreeLevelFeeWrapper.DegreeLevelFee")
|
|
@ApiOperation(value = "新增", notes = "考级等级费用配置- 传入 DegreeLevelFeeWrapper.DegreeLevelFee")
|
|
@PreAuthorize("@pcs.hasPermissions('degreeLevelFee/save')")
|
|
@PreAuthorize("@pcs.hasPermissions('degreeLevelFee/save')")
|
|
@PostMapping("/save")
|
|
@PostMapping("/save")
|
|
- public R<JSONObject> add(@Validated @RequestBody DegreeLevelFeeNew degreeLevelFee) {
|
|
|
|
|
|
+ public HttpResponseResult<JSONObject> add(@Validated @RequestBody DegreeLevelFeeNew degreeLevelFee) {
|
|
|
|
|
|
// 新增数据
|
|
// 新增数据
|
|
degreeLevelFeeService.save(degreeLevelFee);
|
|
degreeLevelFeeService.save(degreeLevelFee);
|
|
|
|
|
|
- return R.defaultR();
|
|
|
|
|
|
+ return succeed();
|
|
}
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "修改", notes = "考级等级费用配置- 传入 DegreeLevelFeeWrapper.DegreeLevelFee")
|
|
@ApiOperation(value = "修改", notes = "考级等级费用配置- 传入 DegreeLevelFeeWrapper.DegreeLevelFee")
|
|
@PreAuthorize("@pcs.hasPermissions('degreeLevelFee/update')")
|
|
@PreAuthorize("@pcs.hasPermissions('degreeLevelFee/update')")
|
|
@PostMapping("/update")
|
|
@PostMapping("/update")
|
|
- public R<JSONObject> update(@Validated @RequestBody DegreeLevelFeeNew degreeLevelFee) {
|
|
|
|
|
|
+ public HttpResponseResult<JSONObject> update(@Validated @RequestBody DegreeLevelFeeNew degreeLevelFee) {
|
|
|
|
|
|
// 更新数据
|
|
// 更新数据
|
|
degreeLevelFeeService.updateById(degreeLevelFee);
|
|
degreeLevelFeeService.updateById(degreeLevelFee);
|
|
|
|
|
|
- return R.defaultR();
|
|
|
|
|
|
+ return succeed();
|
|
}
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "删除", notes = "考级等级费用配置- 传入id")
|
|
@ApiOperation(value = "删除", notes = "考级等级费用配置- 传入id")
|
|
@PreAuthorize("@pcs.hasPermissions('degreeLevelFee/remove')")
|
|
@PreAuthorize("@pcs.hasPermissions('degreeLevelFee/remove')")
|
|
@PostMapping("/remove")
|
|
@PostMapping("/remove")
|
|
- public R<Boolean> remove(@RequestParam Long id) {
|
|
|
|
|
|
+ public HttpResponseResult<Boolean> remove(@RequestParam Long id) {
|
|
|
|
|
|
- return R.from(degreeLevelFeeService.removeById(id));
|
|
|
|
|
|
+ return succeed(degreeLevelFeeService.removeById(id));
|
|
}
|
|
}
|
|
}
|
|
}
|