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 5 import jakarta.validation.constraints.NotNull;
6 6 import lombok.Data;
7 7  
8   -import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.REQUIRED;
9   -
10 8 @Schema(description = "管理后台 - IoT OTA 固件创建 Request VO")
11 9 @Data
12 10 public class IotOtaFirmwareCreateReqVO {
13 11  
14   - @Schema(description = "固件名称", requiredMode = REQUIRED, example = "智能开关固件")
  12 + @Schema(description = "固件名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "智能开关固件")
15 13 @NotEmpty(message = "固件名称不能为空")
16 14 private String name;
17 15  
18 16 @Schema(description = "固件描述", example = "某品牌型号固件,测试用")
19 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 20 @NotEmpty(message = "版本号不能为空")
23 21 private String version;
24 22  
25   - @Schema(description = "产品编号", requiredMode = REQUIRED, example = "1024")
  23 + @Schema(description = "产品编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
26 24 @NotNull(message = "产品编号不能为空")
27 25 private String productId;
28 26  
... ... @@ -30,7 +28,7 @@ public class IotOtaFirmwareCreateReqVO {
30 28 // TODO @li:是不是必传哈
31 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 32 @NotEmpty(message = "固件文件 URL 不能为空")
35 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 7 import io.swagger.v3.oas.annotations.media.Schema;
8 8 import lombok.Data;
9 9  
10   -import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.REQUIRED;
11   -
12 10 @Data
13 11 @Schema(description = "管理后台 - IoT OTA 固件 Response VO")
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 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 23 private String name;
26 24 /**
27 25 * 固件描述
... ... @@ -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 33 private String version;
36 34  
37 35 /**
... ... @@ -39,7 +37,7 @@ public class IotOtaFirmwareRespVO implements VO {
39 37 * <p>
40 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 41 @Trans(type = TransType.SIMPLE, target = IotProductDO.class, fields = {"name"}, refs = {"productName"})
44 42 private String productId;
45 43 /**
... ... @@ -47,12 +45,12 @@ public class IotOtaFirmwareRespVO implements VO {
47 45 * <p>
48 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 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 54 private String productName;
57 55 /**
58 56 * 签名方式
... ... @@ -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 71 private Long fileSize;
74 72 /**
75 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 76 private String fileUrl;
79 77 /**
80 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 5 import jakarta.validation.constraints.NotNull;
6 6 import lombok.Data;
7 7  
8   -import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.REQUIRED;
9   -
10 8 @Schema(description = "管理后台 - IoT OTA 固件更新 Request VO")
11 9 @Data
12 10 public class IotOtaFirmwareUpdateReqVO {
13 11  
14   - @Schema(description = "固件编号", requiredMode = REQUIRED, example = "1024")
  12 + @Schema(description = "固件编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
15 13 @NotNull(message = "固件编号不能为空")
16 14 private Long id;
17 15  
18 16 // TODO @li:name 是不是可以飞必传哈
19   - @Schema(description = "固件名称", requiredMode = REQUIRED, example = "智能开关固件")
  17 + @Schema(description = "固件名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "智能开关固件")
20 18 @NotEmpty(message = "固件名称不能为空")
21 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 5 import jakarta.validation.constraints.NotNull;
6 6 import lombok.Data;
7 7  
8   -import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.REQUIRED;
9   -
10 8 @Data
11 9 @Schema(description = "管理后台 - IoT OTA 升级记录分页 Request VO")
12 10 public class IotOtaUpgradeRecordPageReqVO extends PageParam {
... ... @@ -17,7 +15,7 @@ public class IotOtaUpgradeRecordPageReqVO extends PageParam {
17 15 * <p>
18 16 * 该字段用于标识升级任务的唯一编号,不能为空。
19 17 */
20   - @Schema(description = "升级任务编号", requiredMode = REQUIRED, example = "1024")
  18 + @Schema(description = "升级任务编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
21 19 @NotNull(message = "升级任务编号不能为空")
22 20 private Long taskId;
23 21  
... ... @@ -26,7 +24,7 @@ public class IotOtaUpgradeRecordPageReqVO extends PageParam {
26 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 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 10  
11 11 import java.time.LocalDateTime;
12 12  
13   -import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.REQUIRED;
14   -
15 13 @Data
16 14 @Schema(description = "管理后台 - IoT OTA 升级记录 Response VO")
17 15 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 21 private Long id;
24 22 /**
25 23 * 固件编号
26 24 * <p>
27 25 * 关联 {@link IotOtaFirmwareDO#getId()}
28 26 */
29   - @Schema(description = "固件编号", requiredMode = REQUIRED, example = "1024")
  27 + @Schema(description = "固件编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
30 28 @Trans(type = TransType.SIMPLE, target = IotOtaFirmwareDO.class, fields = {"version"}, refs = {"firmwareVersion"})
31 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 34 private String firmwareVersion;
37 35 /**
38 36 * 任务编号
39 37 * <p>
40 38 * 关联 {@link IotOtaUpgradeTaskDO#getId()}
41 39 */
42   - @Schema(description = "任务编号", requiredMode = REQUIRED, example = "1024")
  40 + @Schema(description = "任务编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
43 41 private Long taskId;
44 42 /**
45 43 * 产品标识
46 44 * <p>
47 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 48 private String productKey;
51 49 /**
52 50 * 设备名称
53 51 * <p>
54 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 55 private String deviceName;
58 56 /**
59 57 * 设备编号
60 58 * <p>
61 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 62 private String deviceId;
65 63 /**
66 64 * 来源的固件编号
67 65 * <p>
68 66 * 关联 {@link IotDeviceDO#getFirmwareId()}
69 67 */
70   - @Schema(description = "来源的固件编号", requiredMode = REQUIRED, example = "1024")
  68 + @Schema(description = "来源的固件编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
71 69 @Trans(type = TransType.SIMPLE, target = IotOtaFirmwareDO.class, fields = {"version"}, refs = {"fromFirmwareVersion"})
72 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 75 private String fromFirmwareVersion;
78 76 /**
79 77 * 升级状态
80 78 * <p>
81 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 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 87 private Integer progress;
90 88 /**
91 89 * 升级进度描述
... ... @@ -93,17 +91,17 @@ public class IotOtaUpgradeRecordRespVO {
93 91 * 注意,只记录设备最后一次的升级进度描述
94 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 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 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 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 5 import jakarta.validation.constraints.NotNull;
6 6 import lombok.Data;
7 7  
8   -import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.REQUIRED;
9   -
10 8 @Data
11 9 @Schema(description = "管理后台 - IoT OTA 升级任务分页 Request VO")
12 10 public class IotOtaUpgradeTaskPageReqVO extends PageParam {
... ... @@ -21,7 +19,7 @@ public class IotOtaUpgradeTaskPageReqVO extends PageParam {
21 19 * 固件编号字段,用于唯一标识固件,不能为空
22 20 */
23 21 @NotNull(message = "固件编号不能为空")
24   - @Schema(description = "固件编号", requiredMode = REQUIRED, example = "1024")
  22 + @Schema(description = "固件编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
25 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 9 import java.time.LocalDateTime;
10 10 import java.util.List;
11 11  
12   -import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.REQUIRED;
13   -
14 12 @Data
15 13 @Schema(description = "管理后台 - IoT OTA 升级任务 Response VO")
16 14 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 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 25 private String name;
28 26 /**
29 27 * 任务描述
... ... @@ -35,31 +33,31 @@ public class IotOtaUpgradeTaskRespVO implements VO {
35 33 * <p>
36 34 * 关联 {@link IotOtaFirmwareDO#getId()}
37 35 */
38   - @Schema(description = "固件编号", requiredMode = REQUIRED, example = "1024")
  36 + @Schema(description = "固件编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
39 37 private Long firmwareId;
40 38 /**
41 39 * 任务状态
42 40 * <p>
43 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 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 49 private String statusName;
52 50 /**
53 51 * 升级范围
54 52 * <p>
55 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 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 61 private Long deviceCount;
64 62 /**
65 63 * 选中的设备编号数组
... ... @@ -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 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 11  
12 12 import java.util.List;
13 13  
14   -import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.REQUIRED;
15   -
16 14 @Data
17 15 @Schema(description = "管理后台 - IoT OTA 升级任务创建/修改 Request VO")
18 16 public class IotOtaUpgradeTaskSaveReqVO {
... ... @@ -24,7 +22,7 @@ public class IotOtaUpgradeTaskSaveReqVO {
24 22 * 任务名称
25 23 */
26 24 @NotEmpty(message = "任务名称不能为空")
27   - @Schema(description = "任务名称", requiredMode = REQUIRED, example = "升级任务")
  25 + @Schema(description = "任务名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "升级任务")
28 26 private String name;
29 27  
30 28 /**
... ... @@ -39,7 +37,7 @@ public class IotOtaUpgradeTaskSaveReqVO {
39 37 * 关联 {@link IotOtaFirmwareDO#getId()}
40 38 */
41 39 @NotNull(message = "固件编号不能为空")
42   - @Schema(description = "固件编号", requiredMode = REQUIRED, example = "1024")
  40 + @Schema(description = "固件编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
43 41 private Long firmwareId;
44 42  
45 43 /**
... ... @@ -49,7 +47,7 @@ public class IotOtaUpgradeTaskSaveReqVO {
49 47 */
50 48 @NotNull(message = "升级范围不能为空")
51 49 @InEnum(value = IotOtaUpgradeTaskScopeEnum.class)
52   - @Schema(description = "升级范围", requiredMode = REQUIRED, example = "1")
  50 + @Schema(description = "升级范围", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
53 51 private Integer scope;
54 52  
55 53 /**
... ... @@ -57,7 +55,7 @@ public class IotOtaUpgradeTaskSaveReqVO {
57 55 * <p>
58 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 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 4 import io.swagger.v3.oas.annotations.media.Schema;
5 5 import lombok.Data;
6 6  
7   -import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.REQUIRED;
8   -
9 7 @Schema(description = "管理后台 - 商品浏览记录 Response VO")
10 8 @Data
11 9 @ExcelIgnoreUnannotated
12 10 public class ProductBrowseHistoryRespVO {
13 11  
14   - @Schema(description = "编号", requiredMode = REQUIRED, example = "1")
  12 + @Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
15 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 16 private Long spuId;
19 17  
20 18 // ========== 商品相关字段 ==========
... ... @@ -34,4 +32,4 @@ public class ProductBrowseHistoryRespVO {
34 32 @Schema(description = "库存", example = "100")
35 33 private Integer stock;
36 34  
37   -}
38 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 6 import jakarta.validation.constraints.NotEmpty;
7 7 import java.util.List;
8 8  
9   -import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.REQUIRED;
10   -
11 9 @Schema(description = "用户 APP - 商品收藏的批量 Request VO") // 用于收藏、取消收藏、获取收藏
12 10 @Data
13 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 14 @NotEmpty(message = "商品 SPU 编号数组不能为空")
17 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 5  
6 6 import jakarta.validation.constraints.NotNull;
7 7  
8   -import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.REQUIRED;
9   -
10 8 @Schema(description = "用户 APP - 商品收藏的单个 Request VO") // 用于收藏、取消收藏、获取收藏
11 9 @Data
12 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 13 @NotNull(message = "商品 SPU 编号不能为空")
16 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 2  
3 3 import io.swagger.v3.oas.annotations.media.Schema;
4 4 import lombok.Data;
5   -import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.REQUIRED;
6 5  
7 6 @Schema(description = "用户 App - 商品收藏 Response VO")
8 7 @Data
9 8 public class AppFavoriteRespVO {
10 9  
11   - @Schema(description = "编号", requiredMode = REQUIRED, example = "1")
  10 + @Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
12 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 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 6  
7 7 import java.util.List;
8 8  
9   -import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.REQUIRED;
10   -
11 9 @Schema(description = "用户 APP - 删除商品浏览记录的 Request VO")
12 10 @Data
13 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 14 @NotEmpty(message = "商品 SPU 编号数组不能为空")
17 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 3 import io.swagger.v3.oas.annotations.media.Schema;
4 4 import lombok.Data;
5 5  
6   -import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.REQUIRED;
7   -
8 6 @Schema(description = "用户 App - 商品浏览记录 Response VO")
9 7 @Data
10 8 public class AppProductBrowseHistoryRespVO {
11 9  
12   - @Schema(description = "编号", requiredMode = REQUIRED, example = "1")
  10 + @Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
13 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 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 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 22 private String picUrl;
25 23  
26   - @Schema(description = "商品单价", requiredMode = REQUIRED, example = "50")
  24 + @Schema(description = "商品单价", requiredMode = Schema.RequiredMode.REQUIRED, example = "50")
27 25 private Integer price;
28 26  
29   - @Schema(description = "商品销量", requiredMode = REQUIRED, example = "60")
  27 + @Schema(description = "商品销量", requiredMode = Schema.RequiredMode.REQUIRED, example = "60")
30 28 private Integer salesCount;
31 29  
32   - @Schema(description = "库存", requiredMode = REQUIRED, example = "80")
  30 + @Schema(description = "库存", requiredMode = Schema.RequiredMode.REQUIRED, example = "80")
33 31 private Integer stock;
34 32  
35 33 }
... ...