fuliqi
2024-11-29 363cf83f55c886bacb8ccab451071442a3313e67
business/src/main/java/com/ycl/controller/ProjectInvestmentFundingController.java
@@ -27,55 +27,55 @@
@RequiredArgsConstructor
@Api(value = "项目投资及资金来源情况表", tags = "项目投资及资金来源情况表管理")
@RestController
@RequestMapping("/project-investment-funding")
@RequestMapping("/project/investmentFunding")
public class ProjectInvestmentFundingController {
    private final ProjectInvestmentFundingService projectInvestmentFundingService;
    @PostMapping
    @ApiOperation(value = "添加", notes = "添加")
    @PreAuthorize("hasAuthority('projectInvestmentFunding:add')")
//    @PreAuthorize("hasAuthority('projectInvestmentFunding:add')")
    public Result add(@RequestBody @Validated(Add.class) ProjectInvestmentFundingForm form) {
        return projectInvestmentFundingService.add(form);
    }
    @PutMapping
    @ApiOperation(value = "修改", notes = "修改")
    @PreAuthorize("hasAuthority('projectInvestmentFunding:edit')")
//    @PreAuthorize("hasAuthority('projectInvestmentFunding:edit')")
    public Result update(@RequestBody @Validated(Update.class) ProjectInvestmentFundingForm form) {
        return projectInvestmentFundingService.update(form);
    }
    @DeleteMapping("/{id}")
    @ApiOperation(value = "ID删除", notes = "ID删除")
    @PreAuthorize("hasAuthority('projectInvestmentFunding:del')")
//    @PreAuthorize("hasAuthority('projectInvestmentFunding:del')")
    public Result removeById(@PathVariable("id") String id) {
        return projectInvestmentFundingService.removeById(id);
    }
    @DeleteMapping("/batch")
    @ApiOperation(value = "批量删除", notes = "批量删除")
    @PreAuthorize("hasAuthority('projectInvestmentFunding:del:batch')")
//    @PreAuthorize("hasAuthority('projectInvestmentFunding:del:batch')")
    public Result remove(@RequestBody @NotEmpty(message = "请选择数据") List<String> ids) {
        return projectInvestmentFundingService.remove(ids);
    }
    @GetMapping("/page")
    @ApiOperation(value = "分页", notes = "分页")
    @PreAuthorize("hasAuthority('projectInvestmentFunding:page')")
//    @PreAuthorize("hasAuthority('projectInvestmentFunding:page')")
    public Result page(ProjectInvestmentFundingQuery query) {
        return projectInvestmentFundingService.page(query);
    }
    @GetMapping("/{id}")
    @ApiOperation(value = "详情", notes = "详情")
    @PreAuthorize("hasAuthority('projectInvestmentFunding:detail')")
//    @PreAuthorize("hasAuthority('projectInvestmentFunding:detail')")
    public Result detail(@PathVariable("id") Integer id) {
        return projectInvestmentFundingService.detail(id);
    }
    @GetMapping("/list")
    @PreAuthorize("hasAuthority('projectInvestmentFunding:list')")
//    @PreAuthorize("hasAuthority('projectInvestmentFunding:list')")
    @ApiOperation(value = "列表", notes = "列表")
    public Result list() {
        return projectInvestmentFundingService.all();