| | |
| | | |
| | | 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> create(@RequestBody HttpApiEntity httpApiEntity){ |
| | | String id = UUID.randomUUID().toString(); |
| | | httpApiEntity.setId(id); |
| | | httpApiEntity.setId(UUID.randomUUID().toString()); |
| | | httpApiEntity.setCreateTime(new Date()); |
| | | httpApiService.add(httpApiEntity); |
| | | return success(true); |
| | | } |
| | |
| | | @PutMapping("/update") |
| | | public CommonResult<Boolean> update(@RequestBody HttpApiEntity httpApiEntity) { |
| | | httpApiService.update(httpApiEntity); |
| | | httpApiEntity.setUpdateTime(new Date()); |
| | | return success(true); |
| | | } |
| | | |