|
|
|
@ -27,7 +27,7 @@ import java.util.Map; |
|
|
|
public class CbamCarbonPriceToolController { |
|
|
|
|
|
|
|
@Resource |
|
|
|
private CbamCarbonPriceToolService cbamCarbonPriceToolServicevice; |
|
|
|
private CbamCarbonPriceToolService cbamCarbonPriceToolService; |
|
|
|
|
|
|
|
@GetMapping("page") |
|
|
|
@Operation(summary = "分页") |
|
|
|
@ -38,13 +38,13 @@ public class CbamCarbonPriceToolController { |
|
|
|
@Parameter(name = Constant.ORDER, description = "排序方式,可选值(asc、desc)") |
|
|
|
}) |
|
|
|
public Result<PageData<CbamCarbonPriceToolDTO>> page(@Parameter(hidden = true) @RequestParam Map<String, Object> param) { |
|
|
|
PageData<CbamCarbonPriceToolDTO> pageList = cbamCarbonPriceToolServicevice.getPageData(param, CbamCarbonPriceToolDTO.class); |
|
|
|
PageData<CbamCarbonPriceToolDTO> pageList = cbamCarbonPriceToolService.getPageData(param, CbamCarbonPriceToolDTO.class); |
|
|
|
return new Result<PageData<CbamCarbonPriceToolDTO>>().ok(pageList); |
|
|
|
} |
|
|
|
@GetMapping("{id}") |
|
|
|
@Operation(summary = "信息") |
|
|
|
public Result<CbamCarbonPriceToolDTO> info(@PathVariable("id") String id) { |
|
|
|
CbamCarbonPriceToolDTO dto = cbamCarbonPriceToolServicevice.getByIdAs(id, CbamCarbonPriceToolDTO.class); |
|
|
|
CbamCarbonPriceToolDTO dto = cbamCarbonPriceToolService.getByIdAs(id, CbamCarbonPriceToolDTO.class); |
|
|
|
return new Result<CbamCarbonPriceToolDTO>().ok(dto); |
|
|
|
} |
|
|
|
@PostMapping |
|
|
|
@ -52,7 +52,7 @@ public class CbamCarbonPriceToolController { |
|
|
|
@LogOperation("保存") |
|
|
|
public Result<Void> save(@RequestBody CbamCarbonPriceToolDTO dto) { |
|
|
|
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
|
|
|
cbamCarbonPriceToolServicevice.saveDto(dto); |
|
|
|
cbamCarbonPriceToolService.saveDto(dto); |
|
|
|
return new Result<>(); |
|
|
|
} |
|
|
|
@PutMapping |
|
|
|
@ -61,7 +61,7 @@ public class CbamCarbonPriceToolController { |
|
|
|
public Result<Void> update(@RequestBody CbamCarbonPriceToolDTO dto) { |
|
|
|
//实验数据 |
|
|
|
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
|
|
|
cbamCarbonPriceToolServicevice.updateDto(dto); |
|
|
|
cbamCarbonPriceToolService.updateDto(dto); |
|
|
|
return new Result<>(); |
|
|
|
} |
|
|
|
@DeleteMapping |
|
|
|
@ -69,7 +69,7 @@ public class CbamCarbonPriceToolController { |
|
|
|
@LogOperation("删除") |
|
|
|
public Result<Void> delete(@RequestBody Long[] ids) { |
|
|
|
AssertUtils.isArrayEmpty(ids,"id"); |
|
|
|
cbamCarbonPriceToolServicevice.batchDelete(ids); |
|
|
|
cbamCarbonPriceToolService.batchDelete(ids); |
|
|
|
return new Result<>(); |
|
|
|
} |
|
|
|
|
|
|
|
|