| | |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.validation.Valid; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.UUID; |
| | | |
| | |
| | | @PreAuthorize("@ss.hasPermission('data:channel-http:create')") |
| | | @PostMapping("/create") |
| | | public CommonResult<Boolean> add(@RequestBody HttpTagEntity httpTagEntity){ |
| | | String id = UUID.randomUUID().toString(); |
| | | httpTagEntity.setId(id); |
| | | httpTagEntity.setId(UUID.randomUUID().toString()); |
| | | httpTagEntity.setCreateTime(new Date()); |
| | | tagService.add(httpTagEntity); |
| | | return success(true); |
| | | } |
| | |
| | | @PreAuthorize("@ss.hasPermission('data:channel-http:update')") |
| | | @PutMapping("/update") |
| | | public CommonResult<Boolean> update(@RequestBody HttpTagEntity httpTagEntity) { |
| | | httpTagEntity.setUpdateTime(new Date()); |
| | | tagService.update(httpTagEntity); |
| | | return success(true); |
| | | } |