文件名从 iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/arc/controller/ArcController.java 修改 |
| | |
| | | package com.iailab.module.data.arc.controller; |
| | | package com.iailab.module.data.arc.controller.admin; |
| | | |
| | | import com.iailab.framework.common.pojo.CommonResult; |
| | | import com.iailab.framework.common.pojo.PageResult; |
| | | import com.iailab.module.data.arc.entity.ArcDataEntity; |
| | | import com.iailab.module.data.arc.entity.ArcSettingEntity; |
| | | import com.iailab.module.data.arc.service.ArcDataService; |
| | | import com.iailab.module.data.arc.service.ArcSettingService; |
| | | import com.iailab.module.data.arc.vo.ArcDataPageReqVO; |
| | | import com.iailab.module.data.arc.vo.ArcSettingPageReqVO; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | |
| | | import static com.iailab.framework.common.pojo.CommonResult.success; |
| | | |
| | | @Tag(name = "数据归档,测点") |
| | | @Tag(name = "数据归档设置") |
| | | @RestController |
| | | @RequestMapping("/data/arc") |
| | | @RequestMapping("/data/arc/setting") |
| | | @Validated |
| | | public class ArcController { |
| | | public class ArcSettingController { |
| | | |
| | | @Autowired |
| | | private ArcSettingService arcSettingService; |
| | | |
| | | @Autowired |
| | | private ArcDataService arcDataService; |
| | | |
| | | |
| | | @PostMapping("archiving") |
| | | public CommonResult<Boolean> archiving(@RequestBody String type) { |
| | | arcDataService.archiving(type); |
| | | return success(true); |
| | | } |
| | | |
| | | @GetMapping("page") |
| | | public CommonResult<PageResult<ArcSettingEntity>> page(@Valid ArcSettingPageReqVO reqVO) { |
| | | PageResult<ArcSettingEntity> page = arcSettingService.queryPage(reqVO); |
| | | return success(page); |
| | | } |
| | | |
| | | @GetMapping("dataPage") |
| | | public CommonResult<PageResult<ArcDataEntity>> dataPage(@Valid ArcDataPageReqVO reqVO) { |
| | | PageResult<ArcDataEntity> page = arcDataService.queryPage(reqVO); |
| | | return success(page); |
| | | } |
| | | |
| | |
| | | return success(info); |
| | | } |
| | | |
| | | @PreAuthorize("@ss.hasPermission('data:arc:create')") |
| | | @PostMapping("create") |
| | | public CommonResult<Boolean> create(@RequestBody ArcSettingEntity arcSettingEntity) { |
| | | String id = UUID.randomUUID().toString(); |
| | |
| | | return success(true); |
| | | } |
| | | |
| | | @PreAuthorize("@ss.hasPermission('data:arc:update')") |
| | | @PutMapping("/update") |
| | | public CommonResult<Boolean> update(@RequestBody ArcSettingEntity arcSettingEntity) { |
| | | arcSettingService.update(arcSettingEntity); |
| | | return success(true); |
| | | } |
| | | |
| | | |
| | | @PreAuthorize("@ss.hasPermission('data:arc:delete')") |
| | | @DeleteMapping("/delete") |
| | | public CommonResult<Boolean> delete(String id) { |
| | | arcSettingService.delete(id); |