| | |
| | | package com.ycl.platform.controller; |
| | | |
| | | import com.ycl.platform.domain.form.BatchEditPointForm; |
| | | import com.ycl.system.domain.group.Update; |
| | | import com.ycl.system.domain.group.Add; |
| | | import jakarta.validation.constraints.NotBlank; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import lombok.RequiredArgsConstructor; |
| | |
| | | return ywPointService.add(form); |
| | | } |
| | | |
| | | @PostMapping("/batch") |
| | | @ApiOperation(value = "批量添加", notes = "批量添加") |
| | | public Result batchAdd(@RequestBody @NotEmpty(message = "数据不能为空") List<YwPointForm> form) { |
| | | return ywPointService.batchAdd(form); |
| | | } |
| | | |
| | | @PutMapping |
| | | @ApiOperation(value = "修改", notes = "修改") |
| | | public Result update(@RequestBody @Validated(Update.class) YwPointForm form) { |
| | | return ywPointService.update(form); |
| | | } |
| | | |
| | | @PutMapping("/batch") |
| | | @ApiOperation(value = "批量修改运维单位", notes = "批量修改运维单位") |
| | | public Result batchEdit(@RequestBody @Validated BatchEditPointForm form) { |
| | | return ywPointService.batchEdit(form); |
| | | } |
| | | |
| | | @DeleteMapping("/{id}") |
| | |
| | | return ywPointService.remove(ids); |
| | | } |
| | | |
| | | @PreAuthorize("@ss.hasPermi('point:page')") |
| | | // @PreAuthorize("@ss.hasPermi('point:page')") |
| | | @GetMapping("/page") |
| | | @ApiOperation(value = "分页", notes = "分页") |
| | | public Result page(YwPointQuery query) { |
| | |
| | | public Result list() { |
| | | return ywPointService.all(); |
| | | } |
| | | |
| | | @GetMapping("/select") |
| | | @ApiOperation(value = "点位下拉", notes = "点位下拉") |
| | | public Result select(@NotBlank(message = "请输入点位") String keyword) { |
| | | return ywPointService.select(keyword); |
| | | } |
| | | } |