| | |
| | | import com.iailab.module.data.channel.kio.vo.KioTagPageReqVO; |
| | | import com.iailab.module.data.channel.kio.vo.KioTagRespVO; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | |
| | | import static com.iailab.framework.common.pojo.CommonResult.success; |
| | | |
| | | /** |
| | | * @author lirm |
| | | * @Description |
| | | * @createTime 2024年08月26日 |
| | | |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/data/channel/kio/tag") |
| | |
| | | /** |
| | | * 分页查询tag |
| | | * */ |
| | | @PreAuthorize("@ss.hasPermission('data:channel-kio:query')") |
| | | @GetMapping("page") |
| | | public CommonResult<PageResult<KioTagRespVO>> page(@Valid KioTagPageReqVO reqVO){ |
| | | PageResult<ChannelKioTagEntity> page = channelKioTagService.queryPage(reqVO); |
| | | return success(BeanUtils.toBean(page, KioTagRespVO.class)); |
| | | } |
| | | |
| | | @PreAuthorize("@ss.hasPermission('data:channel-kio:query')") |
| | | @GetMapping("/info/{id}") |
| | | @Operation(summary = "信息") |
| | | public CommonResult<ChannelKioTagEntity> info(@PathVariable("id") String id) { |
| | |
| | | return success(info); |
| | | } |
| | | |
| | | @PostMapping("/add") |
| | | public CommonResult<Boolean> add(@RequestBody ChannelKioTagEntity channelKioTagEntity) { |
| | | @PreAuthorize("@ss.hasPermission('data:channel-kio:create')") |
| | | @PostMapping("/create") |
| | | public CommonResult<Boolean> create(@RequestBody ChannelKioTagEntity channelKioTagEntity) { |
| | | String id = UUID.randomUUID().toString(); |
| | | channelKioTagEntity.setId(id); |
| | | channelKioTagEntity.setCreateTime(new Date()); |
| | |
| | | return success(true); |
| | | } |
| | | |
| | | @PreAuthorize("@ss.hasPermission('data:channel-kio:update')") |
| | | @PutMapping("/update") |
| | | public CommonResult<Boolean> update(@RequestBody ChannelKioTagEntity channelKioTagEntity) { |
| | | channelKioTagEntity.setUpdateTime(new Date()); |
| | |
| | | return success(true); |
| | | } |
| | | |
| | | @PreAuthorize("@ss.hasPermission('data:channel-kio:delete')") |
| | | @DeleteMapping("/delete") |
| | | public CommonResult<Boolean> delete(@RequestParam("id") String id) { |
| | | channelKioTagService.delete(id); |