Commit 5a906a7b205ea8d9832b383625e06b4c70f706ed

Authored by xingyu4j
1 parent aa48a6f5

fix: requiredMode 调成为 Schema.RequiredMode.REQUIRED 的方式,解决提示 REQUIRED 找不到的问题

Showing 14 changed files with 58 additions and 85 deletions
yudao-module-iot/yudao-module-iot-biz/src/main/java/cn/iocoder/yudao/module/iot/controller/admin/ota/vo/firmware/IotOtaFirmwareCreateReqVO.java
@@ -5,24 +5,22 @@ import jakarta.validation.constraints.NotEmpty; @@ -5,24 +5,22 @@ import jakarta.validation.constraints.NotEmpty;
5 import jakarta.validation.constraints.NotNull; 5 import jakarta.validation.constraints.NotNull;
6 import lombok.Data; 6 import lombok.Data;
7 7
8 -import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.REQUIRED;  
9 -  
10 @Schema(description = "管理后台 - IoT OTA 固件创建 Request VO") 8 @Schema(description = "管理后台 - IoT OTA 固件创建 Request VO")
11 @Data 9 @Data
12 public class IotOtaFirmwareCreateReqVO { 10 public class IotOtaFirmwareCreateReqVO {
13 11
14 - @Schema(description = "固件名称", requiredMode = REQUIRED, example = "智能开关固件") 12 + @Schema(description = "固件名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "智能开关固件")
15 @NotEmpty(message = "固件名称不能为空") 13 @NotEmpty(message = "固件名称不能为空")
16 private String name; 14 private String name;
17 15
18 @Schema(description = "固件描述", example = "某品牌型号固件,测试用") 16 @Schema(description = "固件描述", example = "某品牌型号固件,测试用")
19 private String description; 17 private String description;
20 18
21 - @Schema(description = "版本号", requiredMode = REQUIRED, example = "1.0.0") 19 + @Schema(description = "版本号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1.0.0")
22 @NotEmpty(message = "版本号不能为空") 20 @NotEmpty(message = "版本号不能为空")
23 private String version; 21 private String version;
24 22
25 - @Schema(description = "产品编号", requiredMode = REQUIRED, example = "1024") 23 + @Schema(description = "产品编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
26 @NotNull(message = "产品编号不能为空") 24 @NotNull(message = "产品编号不能为空")
27 private String productId; 25 private String productId;
28 26
@@ -30,7 +28,7 @@ public class IotOtaFirmwareCreateReqVO { @@ -30,7 +28,7 @@ public class IotOtaFirmwareCreateReqVO {
30 // TODO @li:是不是必传哈 28 // TODO @li:是不是必传哈
31 private String signMethod; 29 private String signMethod;
32 30
33 - @Schema(description = "固件文件 URL", requiredMode = REQUIRED, example = "https://www.iocoder.cn/yudao-firmware.zip") 31 + @Schema(description = "固件文件 URL", requiredMode = Schema.RequiredMode.REQUIRED, example = "https://www.iocoder.cn/yudao-firmware.zip")
34 @NotEmpty(message = "固件文件 URL 不能为空") 32 @NotEmpty(message = "固件文件 URL 不能为空")
35 private String fileUrl; 33 private String fileUrl;
36 34
yudao-module-iot/yudao-module-iot-biz/src/main/java/cn/iocoder/yudao/module/iot/controller/admin/ota/vo/firmware/IotOtaFirmwareRespVO.java
@@ -7,8 +7,6 @@ import com.fhs.core.trans.vo.VO; @@ -7,8 +7,6 @@ import com.fhs.core.trans.vo.VO;
7 import io.swagger.v3.oas.annotations.media.Schema; 7 import io.swagger.v3.oas.annotations.media.Schema;
8 import lombok.Data; 8 import lombok.Data;
9 9
10 -import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.REQUIRED;  
11 -  
12 @Data 10 @Data
13 @Schema(description = "管理后台 - IoT OTA 固件 Response VO") 11 @Schema(description = "管理后台 - IoT OTA 固件 Response VO")
14 public class IotOtaFirmwareRespVO implements VO { 12 public class IotOtaFirmwareRespVO implements VO {
@@ -16,12 +14,12 @@ public class IotOtaFirmwareRespVO implements VO { @@ -16,12 +14,12 @@ public class IotOtaFirmwareRespVO implements VO {
16 /** 14 /**
17 * 固件编号 15 * 固件编号
18 */ 16 */
19 - @Schema(description = "固件编号", requiredMode = REQUIRED, example = "1024") 17 + @Schema(description = "固件编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
20 private Long id; 18 private Long id;
21 /** 19 /**
22 * 固件名称 20 * 固件名称
23 */ 21 */
24 - @Schema(description = "固件名称", requiredMode = REQUIRED, example = "OTA固件") 22 + @Schema(description = "固件名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "OTA固件")
25 private String name; 23 private String name;
26 /** 24 /**
27 * 固件描述 25 * 固件描述
@@ -31,7 +29,7 @@ public class IotOtaFirmwareRespVO implements VO { @@ -31,7 +29,7 @@ public class IotOtaFirmwareRespVO implements VO {
31 /** 29 /**
32 * 版本号 30 * 版本号
33 */ 31 */
34 - @Schema(description = "版本号", requiredMode = REQUIRED, example = "1.0.0") 32 + @Schema(description = "版本号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1.0.0")
35 private String version; 33 private String version;
36 34
37 /** 35 /**
@@ -39,7 +37,7 @@ public class IotOtaFirmwareRespVO implements VO { @@ -39,7 +37,7 @@ public class IotOtaFirmwareRespVO implements VO {
39 * <p> 37 * <p>
40 * 关联 {@link cn.iocoder.yudao.module.iot.dal.dataobject.product.IotProductDO#getId()} 38 * 关联 {@link cn.iocoder.yudao.module.iot.dal.dataobject.product.IotProductDO#getId()}
41 */ 39 */
42 - @Schema(description = "产品编号", requiredMode = REQUIRED, example = "1024") 40 + @Schema(description = "产品编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
43 @Trans(type = TransType.SIMPLE, target = IotProductDO.class, fields = {"name"}, refs = {"productName"}) 41 @Trans(type = TransType.SIMPLE, target = IotProductDO.class, fields = {"name"}, refs = {"productName"})
44 private String productId; 42 private String productId;
45 /** 43 /**
@@ -47,12 +45,12 @@ public class IotOtaFirmwareRespVO implements VO { @@ -47,12 +45,12 @@ public class IotOtaFirmwareRespVO implements VO {
47 * <p> 45 * <p>
48 * 冗余 {@link cn.iocoder.yudao.module.iot.dal.dataobject.product.IotProductDO#getProductKey()} 46 * 冗余 {@link cn.iocoder.yudao.module.iot.dal.dataobject.product.IotProductDO#getProductKey()}
49 */ 47 */
50 - @Schema(description = "产品标识", requiredMode = REQUIRED, example = "iot-product-key") 48 + @Schema(description = "产品标识", requiredMode = Schema.RequiredMode.REQUIRED, example = "iot-product-key")
51 private String productKey; 49 private String productKey;
52 /** 50 /**
53 * 产品名称 51 * 产品名称
54 */ 52 */
55 - @Schema(description = "产品名称", requiredMode = REQUIRED, example = "OTA产品") 53 + @Schema(description = "产品名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "OTA产品")
56 private String productName; 54 private String productName;
57 /** 55 /**
58 * 签名方式 56 * 签名方式
@@ -69,12 +67,12 @@ public class IotOtaFirmwareRespVO implements VO { @@ -69,12 +67,12 @@ public class IotOtaFirmwareRespVO implements VO {
69 /** 67 /**
70 * 固件文件大小 68 * 固件文件大小
71 */ 69 */
72 - @Schema(description = "固件文件大小", requiredMode = REQUIRED, example = "1024") 70 + @Schema(description = "固件文件大小", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
73 private Long fileSize; 71 private Long fileSize;
74 /** 72 /**
75 * 固件文件 URL 73 * 固件文件 URL
76 */ 74 */
77 - @Schema(description = "固件文件 URL", requiredMode = REQUIRED, example = "https://www.iocoder.cn") 75 + @Schema(description = "固件文件 URL", requiredMode = Schema.RequiredMode.REQUIRED, example = "https://www.iocoder.cn")
78 private String fileUrl; 76 private String fileUrl;
79 /** 77 /**
80 * 自定义信息,建议使用 JSON 格式 78 * 自定义信息,建议使用 JSON 格式
yudao-module-iot/yudao-module-iot-biz/src/main/java/cn/iocoder/yudao/module/iot/controller/admin/ota/vo/firmware/IotOtaFirmwareUpdateReqVO.java
@@ -5,18 +5,16 @@ import jakarta.validation.constraints.NotEmpty; @@ -5,18 +5,16 @@ import jakarta.validation.constraints.NotEmpty;
5 import jakarta.validation.constraints.NotNull; 5 import jakarta.validation.constraints.NotNull;
6 import lombok.Data; 6 import lombok.Data;
7 7
8 -import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.REQUIRED;  
9 -  
10 @Schema(description = "管理后台 - IoT OTA 固件更新 Request VO") 8 @Schema(description = "管理后台 - IoT OTA 固件更新 Request VO")
11 @Data 9 @Data
12 public class IotOtaFirmwareUpdateReqVO { 10 public class IotOtaFirmwareUpdateReqVO {
13 11
14 - @Schema(description = "固件编号", requiredMode = REQUIRED, example = "1024") 12 + @Schema(description = "固件编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
15 @NotNull(message = "固件编号不能为空") 13 @NotNull(message = "固件编号不能为空")
16 private Long id; 14 private Long id;
17 15
18 // TODO @li:name 是不是可以飞必传哈 16 // TODO @li:name 是不是可以飞必传哈
19 - @Schema(description = "固件名称", requiredMode = REQUIRED, example = "智能开关固件") 17 + @Schema(description = "固件名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "智能开关固件")
20 @NotEmpty(message = "固件名称不能为空") 18 @NotEmpty(message = "固件名称不能为空")
21 private String name; 19 private String name;
22 20
yudao-module-iot/yudao-module-iot-biz/src/main/java/cn/iocoder/yudao/module/iot/controller/admin/ota/vo/upgrade/record/IotOtaUpgradeRecordPageReqVO.java
@@ -5,8 +5,6 @@ import io.swagger.v3.oas.annotations.media.Schema; @@ -5,8 +5,6 @@ import io.swagger.v3.oas.annotations.media.Schema;
5 import jakarta.validation.constraints.NotNull; 5 import jakarta.validation.constraints.NotNull;
6 import lombok.Data; 6 import lombok.Data;
7 7
8 -import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.REQUIRED;  
9 -  
10 @Data 8 @Data
11 @Schema(description = "管理后台 - IoT OTA 升级记录分页 Request VO") 9 @Schema(description = "管理后台 - IoT OTA 升级记录分页 Request VO")
12 public class IotOtaUpgradeRecordPageReqVO extends PageParam { 10 public class IotOtaUpgradeRecordPageReqVO extends PageParam {
@@ -17,7 +15,7 @@ public class IotOtaUpgradeRecordPageReqVO extends PageParam { @@ -17,7 +15,7 @@ public class IotOtaUpgradeRecordPageReqVO extends PageParam {
17 * <p> 15 * <p>
18 * 该字段用于标识升级任务的唯一编号,不能为空。 16 * 该字段用于标识升级任务的唯一编号,不能为空。
19 */ 17 */
20 - @Schema(description = "升级任务编号", requiredMode = REQUIRED, example = "1024") 18 + @Schema(description = "升级任务编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
21 @NotNull(message = "升级任务编号不能为空") 19 @NotNull(message = "升级任务编号不能为空")
22 private Long taskId; 20 private Long taskId;
23 21
@@ -26,7 +24,7 @@ public class IotOtaUpgradeRecordPageReqVO extends PageParam { @@ -26,7 +24,7 @@ public class IotOtaUpgradeRecordPageReqVO extends PageParam {
26 * <p> 24 * <p>
27 * 该字段用于标识设备的名称,通常用于区分不同的设备。 25 * 该字段用于标识设备的名称,通常用于区分不同的设备。
28 */ 26 */
29 - @Schema(description = "设备标识", requiredMode = REQUIRED, example = "摄像头A1-1") 27 + @Schema(description = "设备标识", requiredMode = Schema.RequiredMode.REQUIRED, example = "摄像头A1-1")
30 private String deviceName; 28 private String deviceName;
31 29
32 } 30 }
yudao-module-iot/yudao-module-iot-biz/src/main/java/cn/iocoder/yudao/module/iot/controller/admin/ota/vo/upgrade/record/IotOtaUpgradeRecordRespVO.java
@@ -10,8 +10,6 @@ import lombok.Data; @@ -10,8 +10,6 @@ import lombok.Data;
10 10
11 import java.time.LocalDateTime; 11 import java.time.LocalDateTime;
12 12
13 -import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.REQUIRED;  
14 -  
15 @Data 13 @Data
16 @Schema(description = "管理后台 - IoT OTA 升级记录 Response VO") 14 @Schema(description = "管理后台 - IoT OTA 升级记录 Response VO")
17 public class IotOtaUpgradeRecordRespVO { 15 public class IotOtaUpgradeRecordRespVO {
@@ -19,73 +17,73 @@ public class IotOtaUpgradeRecordRespVO { @@ -19,73 +17,73 @@ public class IotOtaUpgradeRecordRespVO {
19 /** 17 /**
20 * 升级记录编号 18 * 升级记录编号
21 */ 19 */
22 - @Schema(description = "升级记录编号", requiredMode = REQUIRED, example = "1024") 20 + @Schema(description = "升级记录编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
23 private Long id; 21 private Long id;
24 /** 22 /**
25 * 固件编号 23 * 固件编号
26 * <p> 24 * <p>
27 * 关联 {@link IotOtaFirmwareDO#getId()} 25 * 关联 {@link IotOtaFirmwareDO#getId()}
28 */ 26 */
29 - @Schema(description = "固件编号", requiredMode = REQUIRED, example = "1024") 27 + @Schema(description = "固件编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
30 @Trans(type = TransType.SIMPLE, target = IotOtaFirmwareDO.class, fields = {"version"}, refs = {"firmwareVersion"}) 28 @Trans(type = TransType.SIMPLE, target = IotOtaFirmwareDO.class, fields = {"version"}, refs = {"firmwareVersion"})
31 private Long firmwareId; 29 private Long firmwareId;
32 /** 30 /**
33 * 固件版本 31 * 固件版本
34 */ 32 */
35 - @Schema(description = "固件版本", requiredMode = REQUIRED, example = "v1.0.0") 33 + @Schema(description = "固件版本", requiredMode = Schema.RequiredMode.REQUIRED, example = "v1.0.0")
36 private String firmwareVersion; 34 private String firmwareVersion;
37 /** 35 /**
38 * 任务编号 36 * 任务编号
39 * <p> 37 * <p>
40 * 关联 {@link IotOtaUpgradeTaskDO#getId()} 38 * 关联 {@link IotOtaUpgradeTaskDO#getId()}
41 */ 39 */
42 - @Schema(description = "任务编号", requiredMode = REQUIRED, example = "1024") 40 + @Schema(description = "任务编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
43 private Long taskId; 41 private Long taskId;
44 /** 42 /**
45 * 产品标识 43 * 产品标识
46 * <p> 44 * <p>
47 * 关联 {@link cn.iocoder.yudao.module.iot.dal.dataobject.product.IotProductDO#getId()} 45 * 关联 {@link cn.iocoder.yudao.module.iot.dal.dataobject.product.IotProductDO#getId()}
48 */ 46 */
49 - @Schema(description = "产品标识", requiredMode = REQUIRED, example = "iot") 47 + @Schema(description = "产品标识", requiredMode = Schema.RequiredMode.REQUIRED, example = "iot")
50 private String productKey; 48 private String productKey;
51 /** 49 /**
52 * 设备名称 50 * 设备名称
53 * <p> 51 * <p>
54 * 关联 {@link cn.iocoder.yudao.module.iot.dal.dataobject.device.IotDeviceDO#getId()} 52 * 关联 {@link cn.iocoder.yudao.module.iot.dal.dataobject.device.IotDeviceDO#getId()}
55 */ 53 */
56 - @Schema(description = "设备名称", requiredMode = REQUIRED, example = "iot") 54 + @Schema(description = "设备名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "iot")
57 private String deviceName; 55 private String deviceName;
58 /** 56 /**
59 * 设备编号 57 * 设备编号
60 * <p> 58 * <p>
61 * 关联 {@link cn.iocoder.yudao.module.iot.dal.dataobject.device.IotDeviceDO#getId()} 59 * 关联 {@link cn.iocoder.yudao.module.iot.dal.dataobject.device.IotDeviceDO#getId()}
62 */ 60 */
63 - @Schema(description = "设备编号", requiredMode = REQUIRED, example = "1024") 61 + @Schema(description = "设备编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
64 private String deviceId; 62 private String deviceId;
65 /** 63 /**
66 * 来源的固件编号 64 * 来源的固件编号
67 * <p> 65 * <p>
68 * 关联 {@link IotDeviceDO#getFirmwareId()} 66 * 关联 {@link IotDeviceDO#getFirmwareId()}
69 */ 67 */
70 - @Schema(description = "来源的固件编号", requiredMode = REQUIRED, example = "1024") 68 + @Schema(description = "来源的固件编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
71 @Trans(type = TransType.SIMPLE, target = IotOtaFirmwareDO.class, fields = {"version"}, refs = {"fromFirmwareVersion"}) 69 @Trans(type = TransType.SIMPLE, target = IotOtaFirmwareDO.class, fields = {"version"}, refs = {"fromFirmwareVersion"})
72 private Long fromFirmwareId; 70 private Long fromFirmwareId;
73 /** 71 /**
74 * 来源的固件版本 72 * 来源的固件版本
75 */ 73 */
76 - @Schema(description = "来源的固件版本", requiredMode = REQUIRED, example = "v1.0.0") 74 + @Schema(description = "来源的固件版本", requiredMode = Schema.RequiredMode.REQUIRED, example = "v1.0.0")
77 private String fromFirmwareVersion; 75 private String fromFirmwareVersion;
78 /** 76 /**
79 * 升级状态 77 * 升级状态
80 * <p> 78 * <p>
81 * 关联 {@link cn.iocoder.yudao.module.iot.enums.ota.IotOtaUpgradeRecordStatusEnum} 79 * 关联 {@link cn.iocoder.yudao.module.iot.enums.ota.IotOtaUpgradeRecordStatusEnum}
82 */ 80 */
83 - @Schema(description = "升级状态", requiredMode = REQUIRED, allowableValues = {"0", "10", "20", "30", "40", "50"}) 81 + @Schema(description = "升级状态", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = {"0", "10", "20", "30", "40", "50"})
84 private Integer status; 82 private Integer status;
85 /** 83 /**
86 * 升级进度,百分比 84 * 升级进度,百分比
87 */ 85 */
88 - @Schema(description = "升级进度,百分比", requiredMode = REQUIRED, example = "10") 86 + @Schema(description = "升级进度,百分比", requiredMode = Schema.RequiredMode.REQUIRED, example = "10")
89 private Integer progress; 87 private Integer progress;
90 /** 88 /**
91 * 升级进度描述 89 * 升级进度描述
@@ -93,17 +91,17 @@ public class IotOtaUpgradeRecordRespVO { @@ -93,17 +91,17 @@ public class IotOtaUpgradeRecordRespVO {
93 * 注意,只记录设备最后一次的升级进度描述 91 * 注意,只记录设备最后一次的升级进度描述
94 * 如果想看历史记录,可以查看 {@link cn.iocoder.yudao.module.iot.dal.dataobject.device.IotDeviceLogDO} 设备日志 92 * 如果想看历史记录,可以查看 {@link cn.iocoder.yudao.module.iot.dal.dataobject.device.IotDeviceLogDO} 设备日志
95 */ 93 */
96 - @Schema(description = "升级进度描述", requiredMode = REQUIRED, example = "10") 94 + @Schema(description = "升级进度描述", requiredMode = Schema.RequiredMode.REQUIRED, example = "10")
97 private String description; 95 private String description;
98 /** 96 /**
99 * 升级开始时间 97 * 升级开始时间
100 */ 98 */
101 - @Schema(description = "升级开始时间", requiredMode = REQUIRED, example = "2022-07-08 07:30:00") 99 + @Schema(description = "升级开始时间", requiredMode = Schema.RequiredMode.REQUIRED, example = "2022-07-08 07:30:00")
102 private LocalDateTime startTime; 100 private LocalDateTime startTime;
103 /** 101 /**
104 * 升级结束时间 102 * 升级结束时间
105 */ 103 */
106 - @Schema(description = "升级结束时间", requiredMode = REQUIRED, example = "2022-07-08 07:30:00") 104 + @Schema(description = "升级结束时间", requiredMode = Schema.RequiredMode.REQUIRED, example = "2022-07-08 07:30:00")
107 private LocalDateTime endTime; 105 private LocalDateTime endTime;
108 106
109 } 107 }
yudao-module-iot/yudao-module-iot-biz/src/main/java/cn/iocoder/yudao/module/iot/controller/admin/ota/vo/upgrade/task/IotOtaUpgradeTaskPageReqVO.java
@@ -5,8 +5,6 @@ import io.swagger.v3.oas.annotations.media.Schema; @@ -5,8 +5,6 @@ import io.swagger.v3.oas.annotations.media.Schema;
5 import jakarta.validation.constraints.NotNull; 5 import jakarta.validation.constraints.NotNull;
6 import lombok.Data; 6 import lombok.Data;
7 7
8 -import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.REQUIRED;  
9 -  
10 @Data 8 @Data
11 @Schema(description = "管理后台 - IoT OTA 升级任务分页 Request VO") 9 @Schema(description = "管理后台 - IoT OTA 升级任务分页 Request VO")
12 public class IotOtaUpgradeTaskPageReqVO extends PageParam { 10 public class IotOtaUpgradeTaskPageReqVO extends PageParam {
@@ -21,7 +19,7 @@ public class IotOtaUpgradeTaskPageReqVO extends PageParam { @@ -21,7 +19,7 @@ public class IotOtaUpgradeTaskPageReqVO extends PageParam {
21 * 固件编号字段,用于唯一标识固件,不能为空 19 * 固件编号字段,用于唯一标识固件,不能为空
22 */ 20 */
23 @NotNull(message = "固件编号不能为空") 21 @NotNull(message = "固件编号不能为空")
24 - @Schema(description = "固件编号", requiredMode = REQUIRED, example = "1024") 22 + @Schema(description = "固件编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
25 private Long firmwareId; 23 private Long firmwareId;
26 24
27 } 25 }
yudao-module-iot/yudao-module-iot-biz/src/main/java/cn/iocoder/yudao/module/iot/controller/admin/ota/vo/upgrade/task/IotOtaUpgradeTaskRespVO.java
@@ -9,8 +9,6 @@ import lombok.Data; @@ -9,8 +9,6 @@ import lombok.Data;
9 import java.time.LocalDateTime; 9 import java.time.LocalDateTime;
10 import java.util.List; 10 import java.util.List;
11 11
12 -import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.REQUIRED;  
13 -  
14 @Data 12 @Data
15 @Schema(description = "管理后台 - IoT OTA 升级任务 Response VO") 13 @Schema(description = "管理后台 - IoT OTA 升级任务 Response VO")
16 public class IotOtaUpgradeTaskRespVO implements VO { 14 public class IotOtaUpgradeTaskRespVO implements VO {
@@ -18,12 +16,12 @@ public class IotOtaUpgradeTaskRespVO implements VO { @@ -18,12 +16,12 @@ public class IotOtaUpgradeTaskRespVO implements VO {
18 /** 16 /**
19 * 任务编号 17 * 任务编号
20 */ 18 */
21 - @Schema(description = "任务编号", requiredMode = REQUIRED, example = "1024") 19 + @Schema(description = "任务编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
22 private Long id; 20 private Long id;
23 /** 21 /**
24 * 任务名称 22 * 任务名称
25 */ 23 */
26 - @Schema(description = "任务名称", requiredMode = REQUIRED, example = "升级任务") 24 + @Schema(description = "任务名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "升级任务")
27 private String name; 25 private String name;
28 /** 26 /**
29 * 任务描述 27 * 任务描述
@@ -35,31 +33,31 @@ public class IotOtaUpgradeTaskRespVO implements VO { @@ -35,31 +33,31 @@ public class IotOtaUpgradeTaskRespVO implements VO {
35 * <p> 33 * <p>
36 * 关联 {@link IotOtaFirmwareDO#getId()} 34 * 关联 {@link IotOtaFirmwareDO#getId()}
37 */ 35 */
38 - @Schema(description = "固件编号", requiredMode = REQUIRED, example = "1024") 36 + @Schema(description = "固件编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
39 private Long firmwareId; 37 private Long firmwareId;
40 /** 38 /**
41 * 任务状态 39 * 任务状态
42 * <p> 40 * <p>
43 * 关联 {@link cn.iocoder.yudao.module.iot.enums.ota.IotOtaUpgradeTaskStatusEnum} 41 * 关联 {@link cn.iocoder.yudao.module.iot.enums.ota.IotOtaUpgradeTaskStatusEnum}
44 */ 42 */
45 - @Schema(description = "任务状态", requiredMode = REQUIRED, allowableValues = {"10", "20", "21", "30"}) 43 + @Schema(description = "任务状态", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = {"10", "20", "21", "30"})
46 private Integer status; 44 private Integer status;
47 /** 45 /**
48 * 任务状态名称 46 * 任务状态名称
49 */ 47 */
50 - @Schema(description = "任务状态名称", requiredMode = REQUIRED, example = "进行中") 48 + @Schema(description = "任务状态名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "进行中")
51 private String statusName; 49 private String statusName;
52 /** 50 /**
53 * 升级范围 51 * 升级范围
54 * <p> 52 * <p>
55 * 关联 {@link cn.iocoder.yudao.module.iot.enums.ota.IotOtaUpgradeTaskScopeEnum} 53 * 关联 {@link cn.iocoder.yudao.module.iot.enums.ota.IotOtaUpgradeTaskScopeEnum}
56 */ 54 */
57 - @Schema(description = "升级范围", requiredMode = REQUIRED, allowableValues = {"1", "2"}) 55 + @Schema(description = "升级范围", requiredMode = Schema.RequiredMode.REQUIRED, allowableValues = {"1", "2"})
58 private Integer scope; 56 private Integer scope;
59 /** 57 /**
60 * 设备数量 58 * 设备数量
61 */ 59 */
62 - @Schema(description = "设备数量", requiredMode = REQUIRED, example = "1024") 60 + @Schema(description = "设备数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
63 private Long deviceCount; 61 private Long deviceCount;
64 /** 62 /**
65 * 选中的设备编号数组 63 * 选中的设备编号数组
@@ -78,7 +76,7 @@ public class IotOtaUpgradeTaskRespVO implements VO { @@ -78,7 +76,7 @@ public class IotOtaUpgradeTaskRespVO implements VO {
78 /** 76 /**
79 * 创建时间 77 * 创建时间
80 */ 78 */
81 - @Schema(description = "创建时间", requiredMode = REQUIRED, example = "2022-07-08 07:30:00") 79 + @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED, example = "2022-07-08 07:30:00")
82 private LocalDateTime createTime; 80 private LocalDateTime createTime;
83 81
84 } 82 }
yudao-module-iot/yudao-module-iot-biz/src/main/java/cn/iocoder/yudao/module/iot/controller/admin/ota/vo/upgrade/task/IotOtaUpgradeTaskSaveReqVO.java
@@ -11,8 +11,6 @@ import lombok.Data; @@ -11,8 +11,6 @@ import lombok.Data;
11 11
12 import java.util.List; 12 import java.util.List;
13 13
14 -import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.REQUIRED;  
15 -  
16 @Data 14 @Data
17 @Schema(description = "管理后台 - IoT OTA 升级任务创建/修改 Request VO") 15 @Schema(description = "管理后台 - IoT OTA 升级任务创建/修改 Request VO")
18 public class IotOtaUpgradeTaskSaveReqVO { 16 public class IotOtaUpgradeTaskSaveReqVO {
@@ -24,7 +22,7 @@ public class IotOtaUpgradeTaskSaveReqVO { @@ -24,7 +22,7 @@ public class IotOtaUpgradeTaskSaveReqVO {
24 * 任务名称 22 * 任务名称
25 */ 23 */
26 @NotEmpty(message = "任务名称不能为空") 24 @NotEmpty(message = "任务名称不能为空")
27 - @Schema(description = "任务名称", requiredMode = REQUIRED, example = "升级任务") 25 + @Schema(description = "任务名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "升级任务")
28 private String name; 26 private String name;
29 27
30 /** 28 /**
@@ -39,7 +37,7 @@ public class IotOtaUpgradeTaskSaveReqVO { @@ -39,7 +37,7 @@ public class IotOtaUpgradeTaskSaveReqVO {
39 * 关联 {@link IotOtaFirmwareDO#getId()} 37 * 关联 {@link IotOtaFirmwareDO#getId()}
40 */ 38 */
41 @NotNull(message = "固件编号不能为空") 39 @NotNull(message = "固件编号不能为空")
42 - @Schema(description = "固件编号", requiredMode = REQUIRED, example = "1024") 40 + @Schema(description = "固件编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
43 private Long firmwareId; 41 private Long firmwareId;
44 42
45 /** 43 /**
@@ -49,7 +47,7 @@ public class IotOtaUpgradeTaskSaveReqVO { @@ -49,7 +47,7 @@ public class IotOtaUpgradeTaskSaveReqVO {
49 */ 47 */
50 @NotNull(message = "升级范围不能为空") 48 @NotNull(message = "升级范围不能为空")
51 @InEnum(value = IotOtaUpgradeTaskScopeEnum.class) 49 @InEnum(value = IotOtaUpgradeTaskScopeEnum.class)
52 - @Schema(description = "升级范围", requiredMode = REQUIRED, example = "1") 50 + @Schema(description = "升级范围", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
53 private Integer scope; 51 private Integer scope;
54 52
55 /** 53 /**
@@ -57,7 +55,7 @@ public class IotOtaUpgradeTaskSaveReqVO { @@ -57,7 +55,7 @@ public class IotOtaUpgradeTaskSaveReqVO {
57 * <p> 55 * <p>
58 * 关联 {@link IotDeviceDO#getId()} 56 * 关联 {@link IotDeviceDO#getId()}
59 */ 57 */
60 - @Schema(description = "选中的设备编号数组", requiredMode = REQUIRED, example = "[1,2,3,4]") 58 + @Schema(description = "选中的设备编号数组", requiredMode = Schema.RequiredMode.REQUIRED, example = "[1,2,3,4]")
61 private List<Long> deviceIds; 59 private List<Long> deviceIds;
62 60
63 } 61 }
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/history/vo/ProductBrowseHistoryRespVO.java
@@ -4,17 +4,15 @@ import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; @@ -4,17 +4,15 @@ import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
4 import io.swagger.v3.oas.annotations.media.Schema; 4 import io.swagger.v3.oas.annotations.media.Schema;
5 import lombok.Data; 5 import lombok.Data;
6 6
7 -import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.REQUIRED;  
8 -  
9 @Schema(description = "管理后台 - 商品浏览记录 Response VO") 7 @Schema(description = "管理后台 - 商品浏览记录 Response VO")
10 @Data 8 @Data
11 @ExcelIgnoreUnannotated 9 @ExcelIgnoreUnannotated
12 public class ProductBrowseHistoryRespVO { 10 public class ProductBrowseHistoryRespVO {
13 11
14 - @Schema(description = "编号", requiredMode = REQUIRED, example = "1") 12 + @Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
15 private Long id; 13 private Long id;
16 14
17 - @Schema(description = "商品 SPU 编号", requiredMode = REQUIRED, example = "29502") 15 + @Schema(description = "商品 SPU 编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "29502")
18 private Long spuId; 16 private Long spuId;
19 17
20 // ========== 商品相关字段 ========== 18 // ========== 商品相关字段 ==========
@@ -34,4 +32,4 @@ public class ProductBrowseHistoryRespVO { @@ -34,4 +32,4 @@ public class ProductBrowseHistoryRespVO {
34 @Schema(description = "库存", example = "100") 32 @Schema(description = "库存", example = "100")
35 private Integer stock; 33 private Integer stock;
36 34
37 -}  
38 \ No newline at end of file 35 \ No newline at end of file
  36 +}
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/app/favorite/vo/AppFavoriteBatchReqVO.java
@@ -6,13 +6,11 @@ import lombok.Data; @@ -6,13 +6,11 @@ import lombok.Data;
6 import jakarta.validation.constraints.NotEmpty; 6 import jakarta.validation.constraints.NotEmpty;
7 import java.util.List; 7 import java.util.List;
8 8
9 -import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.REQUIRED;  
10 -  
11 @Schema(description = "用户 APP - 商品收藏的批量 Request VO") // 用于收藏、取消收藏、获取收藏 9 @Schema(description = "用户 APP - 商品收藏的批量 Request VO") // 用于收藏、取消收藏、获取收藏
12 @Data 10 @Data
13 public class AppFavoriteBatchReqVO { 11 public class AppFavoriteBatchReqVO {
14 12
15 - @Schema(description = "商品 SPU 编号数组", requiredMode = REQUIRED, example = "29502") 13 + @Schema(description = "商品 SPU 编号数组", requiredMode = Schema.RequiredMode.REQUIRED, example = "29502")
16 @NotEmpty(message = "商品 SPU 编号数组不能为空") 14 @NotEmpty(message = "商品 SPU 编号数组不能为空")
17 private List<Long> spuIds; 15 private List<Long> spuIds;
18 16
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/app/favorite/vo/AppFavoriteReqVO.java
@@ -5,13 +5,11 @@ import lombok.Data; @@ -5,13 +5,11 @@ import lombok.Data;
5 5
6 import jakarta.validation.constraints.NotNull; 6 import jakarta.validation.constraints.NotNull;
7 7
8 -import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.REQUIRED;  
9 -  
10 @Schema(description = "用户 APP - 商品收藏的单个 Request VO") // 用于收藏、取消收藏、获取收藏 8 @Schema(description = "用户 APP - 商品收藏的单个 Request VO") // 用于收藏、取消收藏、获取收藏
11 @Data 9 @Data
12 public class AppFavoriteReqVO { 10 public class AppFavoriteReqVO {
13 11
14 - @Schema(description = "商品 SPU 编号", requiredMode = REQUIRED, example = "29502") 12 + @Schema(description = "商品 SPU 编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "29502")
15 @NotNull(message = "商品 SPU 编号不能为空") 13 @NotNull(message = "商品 SPU 编号不能为空")
16 private Long spuId; 14 private Long spuId;
17 15
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/app/favorite/vo/AppFavoriteRespVO.java
@@ -2,16 +2,15 @@ package cn.iocoder.yudao.module.product.controller.app.favorite.vo; @@ -2,16 +2,15 @@ package cn.iocoder.yudao.module.product.controller.app.favorite.vo;
2 2
3 import io.swagger.v3.oas.annotations.media.Schema; 3 import io.swagger.v3.oas.annotations.media.Schema;
4 import lombok.Data; 4 import lombok.Data;
5 -import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.REQUIRED;  
6 5
7 @Schema(description = "用户 App - 商品收藏 Response VO") 6 @Schema(description = "用户 App - 商品收藏 Response VO")
8 @Data 7 @Data
9 public class AppFavoriteRespVO { 8 public class AppFavoriteRespVO {
10 9
11 - @Schema(description = "编号", requiredMode = REQUIRED, example = "1") 10 + @Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
12 private Long id; 11 private Long id;
13 12
14 - @Schema(description = "商品 SPU 编号", requiredMode = REQUIRED, example = "29502") 13 + @Schema(description = "商品 SPU 编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "29502")
15 private Long spuId; 14 private Long spuId;
16 15
17 // ========== 商品相关字段 ========== 16 // ========== 商品相关字段 ==========
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/app/history/vo/AppProductBrowseHistoryDeleteReqVO.java
@@ -6,13 +6,11 @@ import lombok.Data; @@ -6,13 +6,11 @@ import lombok.Data;
6 6
7 import java.util.List; 7 import java.util.List;
8 8
9 -import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.REQUIRED;  
10 -  
11 @Schema(description = "用户 APP - 删除商品浏览记录的 Request VO") 9 @Schema(description = "用户 APP - 删除商品浏览记录的 Request VO")
12 @Data 10 @Data
13 public class AppProductBrowseHistoryDeleteReqVO { 11 public class AppProductBrowseHistoryDeleteReqVO {
14 12
15 - @Schema(description = "商品 SPU 编号数组", requiredMode = REQUIRED, example = "29502") 13 + @Schema(description = "商品 SPU 编号数组", requiredMode = Schema.RequiredMode.REQUIRED, example = "29502")
16 @NotEmpty(message = "商品 SPU 编号数组不能为空") 14 @NotEmpty(message = "商品 SPU 编号数组不能为空")
17 private List<Long> spuIds; 15 private List<Long> spuIds;
18 16
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/app/history/vo/AppProductBrowseHistoryRespVO.java
@@ -3,33 +3,31 @@ package cn.iocoder.yudao.module.product.controller.app.history.vo; @@ -3,33 +3,31 @@ package cn.iocoder.yudao.module.product.controller.app.history.vo;
3 import io.swagger.v3.oas.annotations.media.Schema; 3 import io.swagger.v3.oas.annotations.media.Schema;
4 import lombok.Data; 4 import lombok.Data;
5 5
6 -import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.REQUIRED;  
7 -  
8 @Schema(description = "用户 App - 商品浏览记录 Response VO") 6 @Schema(description = "用户 App - 商品浏览记录 Response VO")
9 @Data 7 @Data
10 public class AppProductBrowseHistoryRespVO { 8 public class AppProductBrowseHistoryRespVO {
11 9
12 - @Schema(description = "编号", requiredMode = REQUIRED, example = "1") 10 + @Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
13 private Long id; 11 private Long id;
14 12
15 - @Schema(description = "商品 SPU 编号", requiredMode = REQUIRED, example = "29502") 13 + @Schema(description = "商品 SPU 编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "29502")
16 private Long spuId; 14 private Long spuId;
17 15
18 // ========== 商品相关字段 ========== 16 // ========== 商品相关字段 ==========
19 17
20 - @Schema(description = "商品 SPU 名称", requiredMode = REQUIRED, example = "赵六") 18 + @Schema(description = "商品 SPU 名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六")
21 private String spuName; 19 private String spuName;
22 20
23 - @Schema(description = "商品封面图", requiredMode = REQUIRED, example = "https://www.iocoder.cn/pic.png") 21 + @Schema(description = "商品封面图", requiredMode = Schema.RequiredMode.REQUIRED, example = "https://www.iocoder.cn/pic.png")
24 private String picUrl; 22 private String picUrl;
25 23
26 - @Schema(description = "商品单价", requiredMode = REQUIRED, example = "50") 24 + @Schema(description = "商品单价", requiredMode = Schema.RequiredMode.REQUIRED, example = "50")
27 private Integer price; 25 private Integer price;
28 26
29 - @Schema(description = "商品销量", requiredMode = REQUIRED, example = "60") 27 + @Schema(description = "商品销量", requiredMode = Schema.RequiredMode.REQUIRED, example = "60")
30 private Integer salesCount; 28 private Integer salesCount;
31 29
32 - @Schema(description = "库存", requiredMode = REQUIRED, example = "80") 30 + @Schema(description = "库存", requiredMode = Schema.RequiredMode.REQUIRED, example = "80")
33 private Integer stock; 31 private Integer stock;
34 32
35 } 33 }