|
@@ -5,6 +5,7 @@ import com.microsvc.toolkit.common.response.paging.QueryInfo;
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.ym.mec.biz.dal.entity.DegreeLevelFeeNew;
|
|
|
+import com.ym.mec.biz.dal.vo.DegreeLevelFeeNewVo;
|
|
|
import com.ym.mec.common.controller.BaseController;
|
|
|
import com.ym.mec.common.entity.HttpResponseResult;
|
|
|
import io.swagger.annotations.Api;
|
|
@@ -25,6 +26,8 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import com.ym.mec.biz.service.DegreeLevelFeeService;
|
|
|
import com.ym.mec.biz.dal.wrapper.DegreeLevelFeeWrapper;
|
|
|
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
@Slf4j
|
|
|
@Validated
|
|
|
@RestController
|
|
@@ -36,7 +39,6 @@ public class DegreeLevelFeeController extends BaseController {
|
|
|
private DegreeLevelFeeService degreeLevelFeeService;
|
|
|
|
|
|
@ApiOperation(value = "详情", notes = "考级等级费用配置-根据详情ID查询单条, 传入id")
|
|
|
- //@PreAuthorize("@pcs.hasPermissions('degreeLevelFee/detail')")
|
|
|
@GetMapping("/detail/{id}")
|
|
|
public HttpResponseResult<DegreeLevelFeeNew> detail(@PathVariable("id") Long id) {
|
|
|
|
|
@@ -48,32 +50,24 @@ public class DegreeLevelFeeController extends BaseController {
|
|
|
@ApiOperation(value = "查询分页", notes = "考级等级费用配置- 传入 DegreeLevelFeeWrapper.DegreeLevelFeeQuery")
|
|
|
@PreAuthorize("@pcs.hasPermissions('degreeLevelFee/page')")
|
|
|
@PostMapping("/page")
|
|
|
- public HttpResponseResult<PageInfo<DegreeLevelFeeNew>> page(@RequestBody DegreeLevelFeeWrapper.DegreeLevelFeeQuery query) {
|
|
|
-
|
|
|
- IPage<DegreeLevelFeeNew> pages = degreeLevelFeeService.selectPage(QueryInfo.getPage(query), query);
|
|
|
+ public HttpResponseResult<PageInfo<DegreeLevelFeeNewVo>> page(@RequestBody DegreeLevelFeeWrapper.DegreeLevelFeeQuery query) {
|
|
|
|
|
|
- return succeed(QueryInfo.pageInfo(pages));
|
|
|
+ return succeed(QueryInfo.pageInfo(degreeLevelFeeService.selectPage(QueryInfo.getPage(query), query)));
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "新增", notes = "考级等级费用配置- 传入 DegreeLevelFeeWrapper.DegreeLevelFee")
|
|
|
@PreAuthorize("@pcs.hasPermissions('degreeLevelFee/save')")
|
|
|
@PostMapping("/save")
|
|
|
- public HttpResponseResult<JSONObject> add(@Validated @RequestBody DegreeLevelFeeNew degreeLevelFee) {
|
|
|
-
|
|
|
- // 新增数据
|
|
|
- degreeLevelFeeService.save(degreeLevelFee);
|
|
|
-
|
|
|
+ public HttpResponseResult<JSONObject> add(@RequestBody List<DegreeLevelFeeNew> degreeLevelFees) {
|
|
|
+ degreeLevelFeeService.saveBatch(degreeLevelFees);
|
|
|
return succeed();
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "修改", notes = "考级等级费用配置- 传入 DegreeLevelFeeWrapper.DegreeLevelFee")
|
|
|
@PreAuthorize("@pcs.hasPermissions('degreeLevelFee/update')")
|
|
|
@PostMapping("/update")
|
|
|
- public HttpResponseResult<JSONObject> update(@Validated @RequestBody DegreeLevelFeeNew degreeLevelFee) {
|
|
|
-
|
|
|
- // 更新数据
|
|
|
+ public HttpResponseResult<JSONObject> update(@RequestBody DegreeLevelFeeNew degreeLevelFee) {
|
|
|
degreeLevelFeeService.updateById(degreeLevelFee);
|
|
|
-
|
|
|
return succeed();
|
|
|
}
|
|
|
|
|
@@ -81,7 +75,6 @@ public class DegreeLevelFeeController extends BaseController {
|
|
|
@PreAuthorize("@pcs.hasPermissions('degreeLevelFee/remove')")
|
|
|
@PostMapping("/remove")
|
|
|
public HttpResponseResult<Boolean> remove(@RequestParam Long id) {
|
|
|
-
|
|
|
return succeed(degreeLevelFeeService.removeById(id));
|
|
|
}
|
|
|
}
|