提交 | 用户 | 时间
|
0636b9
|
1 |
package com.iailab.module.data.arc.controller.admin; |
潘 |
2 |
|
|
3 |
import com.iailab.framework.common.pojo.CommonResult; |
|
4 |
import com.iailab.framework.common.pojo.PageResult; |
|
5 |
import com.iailab.module.data.arc.entity.ArcDataEntity; |
|
6 |
import com.iailab.module.data.arc.service.ArcDataService; |
|
7 |
import com.iailab.module.data.arc.vo.ArcDataPageReqVO; |
|
8 |
import io.swagger.v3.oas.annotations.tags.Tag; |
|
9 |
import org.springframework.beans.factory.annotation.Autowired; |
|
10 |
import org.springframework.validation.annotation.Validated; |
|
11 |
import org.springframework.web.bind.annotation.*; |
|
12 |
|
|
13 |
import javax.validation.Valid; |
|
14 |
|
|
15 |
import static com.iailab.framework.common.pojo.CommonResult.success; |
|
16 |
|
|
17 |
/** |
|
18 |
* @author PanZhibao |
|
19 |
* @Description |
|
20 |
* @createTime 2025年02月26日 |
|
21 |
*/ |
|
22 |
@Tag(name = "数据归档数据") |
|
23 |
@RestController |
|
24 |
@RequestMapping("/data/arc/data") |
|
25 |
@Validated |
|
26 |
public class ArcDataController { |
|
27 |
|
|
28 |
@Autowired |
|
29 |
private ArcDataService arcDataService; |
|
30 |
|
|
31 |
@PostMapping("archiving") |
|
32 |
public CommonResult<Boolean> archiving(@RequestBody String type) { |
|
33 |
arcDataService.archiving(type); |
|
34 |
return success(true); |
|
35 |
} |
|
36 |
|
|
37 |
@GetMapping("page") |
|
38 |
public CommonResult<PageResult<ArcDataEntity>> dataPage(@Valid ArcDataPageReqVO reqVO) { |
|
39 |
PageResult<ArcDataEntity> page = arcDataService.queryPage(reqVO); |
|
40 |
return success(page); |
|
41 |
} |
|
42 |
} |