提交 | 用户 | 时间
|
b8ecc0
|
1 |
package com.iailab.module.model.mcs.sche.controller.admin; |
潘 |
2 |
|
|
3 |
import com.iailab.framework.common.pojo.CommonResult; |
|
4 |
import com.iailab.framework.common.pojo.PageResult; |
|
5 |
import com.iailab.framework.common.util.object.BeanUtils; |
|
6 |
import com.iailab.module.model.mcs.sche.entity.StScheduleRecordEntity; |
|
7 |
import com.iailab.module.model.mcs.sche.vo.StScheduleRecordPageReqVO; |
|
8 |
import com.iailab.module.model.mcs.sche.vo.StScheduleRecordRespVO; |
|
9 |
import com.iailab.module.model.mcs.sche.service.StScheduleRecordService; |
|
10 |
import io.swagger.v3.oas.annotations.Operation; |
|
11 |
import io.swagger.v3.oas.annotations.Parameter; |
|
12 |
import io.swagger.v3.oas.annotations.tags.Tag; |
|
13 |
import org.springframework.beans.factory.annotation.Autowired; |
|
14 |
import org.springframework.security.access.prepost.PreAuthorize; |
|
15 |
import org.springframework.web.bind.annotation.GetMapping; |
|
16 |
import org.springframework.web.bind.annotation.RequestMapping; |
|
17 |
import org.springframework.web.bind.annotation.RequestParam; |
|
18 |
import org.springframework.web.bind.annotation.RestController; |
|
19 |
|
|
20 |
import javax.validation.Valid; |
|
21 |
|
|
22 |
import static com.iailab.framework.common.pojo.CommonResult.success; |
|
23 |
|
|
24 |
/** |
|
25 |
* @author PanZhibao |
|
26 |
* @Description |
|
27 |
* @createTime 2024年12月25日 |
|
28 |
*/ |
|
29 |
@Tag(name = "模型服务 - 调度记录") |
|
30 |
@RestController |
|
31 |
@RequestMapping("/model/sche/record") |
|
32 |
public class StScheduleRecordController { |
|
33 |
|
|
34 |
@Autowired |
|
35 |
private StScheduleRecordService stScheduleRecordService; |
|
36 |
|
|
37 |
@GetMapping("/get") |
|
38 |
@Operation(summary = "获得调度记录") |
|
39 |
@Parameter(name = "id", description = "编号", required = true, example = "1024") |
|
40 |
@PreAuthorize("@ss.hasPermission('sche:record:query')") |
|
41 |
public CommonResult<StScheduleRecordRespVO> getInfo(@RequestParam("id") String id) { |
|
42 |
StScheduleRecordRespVO respVO = stScheduleRecordService.getInfo(id); |
|
43 |
return success(respVO); |
|
44 |
} |
|
45 |
|
|
46 |
@GetMapping("/page") |
|
47 |
@Operation(summary = "获得调度记录分页") |
|
48 |
@PreAuthorize("@ss.hasPermission('sche:record:query')") |
898006
|
49 |
public CommonResult<PageResult<StScheduleRecordRespVO>> getPage(@Valid StScheduleRecordPageReqVO pageVO) { |
b8ecc0
|
50 |
PageResult<StScheduleRecordEntity> pageResult = stScheduleRecordService.page(pageVO); |
潘 |
51 |
return success(BeanUtils.toBean(pageResult, StScheduleRecordRespVO.class)); |
|
52 |
} |
|
53 |
} |