fuliqi
2024-07-31 f284c5ef6a1aa6e9ba5d4e94e4b2abe83b6ea18c
ycl-server/src/main/java/com/ycl/platform/controller/YwPointController.java
@@ -36,55 +36,63 @@
    @PostMapping
    @ApiOperation(value = "添加", notes = "添加")
    @PreAuthorize("@ss.hasPermi('point:add')")
    public Result add(@RequestBody @Validated(Add.class) YwPointForm form) {
        return ywPointService.add(form);
    }
    @PostMapping("/batch")
    @ApiOperation(value = "批量添加", notes = "批量添加")
    @PreAuthorize("@ss.hasPermi('point:add')")
    public Result batchAdd(@RequestBody @NotEmpty(message = "数据不能为空") List<YwPointForm> form) {
        return ywPointService.batchAdd(form);
    }
    @PutMapping
    @ApiOperation(value = "修改", notes = "修改")
    @PreAuthorize("@ss.hasPermi('point:edit')")
    public Result update(@RequestBody @Validated(Update.class) YwPointForm form) {
        return ywPointService.update(form);
    }
    @PutMapping("/batch")
    @ApiOperation(value = "批量修改运维单位", notes = "批量修改运维单位")
    @PreAuthorize("@ss.hasPermi('point:edit')")
    public Result batchEdit(@RequestBody @Validated BatchEditPointForm form) {
        return ywPointService.batchEdit(form);
    }
    @DeleteMapping("/{id}")
    @ApiOperation(value = "ID删除", notes = "ID删除")
    @PreAuthorize("@ss.hasPermi('point:remove')")
    public Result removeById(@PathVariable("id") String id) {
        return ywPointService.removeById(id);
    }
    @DeleteMapping("/batch")
    @ApiOperation(value = "批量删除", notes = "批量删除")
    @PreAuthorize("@ss.hasPermi('point:remove')")
    public Result remove(@RequestBody @NotEmpty(message = "请选择数据") List<String> ids) {
        return ywPointService.remove(ids);
    }
//    @PreAuthorize("@ss.hasPermi('point:page')")
    @GetMapping("/page")
    @ApiOperation(value = "分页", notes = "分页")
    @PreAuthorize("@ss.hasPermi('point:page')")
    public Result page(YwPointQuery query) {
        return ywPointService.page(query);
    }
    @GetMapping("/{id}")
    @ApiOperation(value = "详情", notes = "详情")
    @PreAuthorize("@ss.hasPermi('point:query')")
    public Result detail(@PathVariable("id") String id) {
        return ywPointService.detail(id);
    }
    @GetMapping("/list")
    @ApiOperation(value = "列表", notes = "列表")
    @PreAuthorize("@ss.hasPermi('point:list')")
    public Result list() {
        return ywPointService.all();
    }