|
@@ -5,8 +5,10 @@ import io.swagger.annotations.ApiModelProperty;
|
|
|
import lombok.Data;
|
|
|
import lombok.experimental.Accessors;
|
|
|
|
|
|
+import javax.validation.constraints.NotEmpty;
|
|
|
import javax.validation.constraints.NotNull;
|
|
|
import java.time.LocalDateTime;
|
|
|
+import java.util.List;
|
|
|
|
|
|
/**
|
|
|
* <p>
|
|
@@ -20,13 +22,41 @@ public class DeviceConfigDto {
|
|
|
|
|
|
@Data
|
|
|
@Accessors(chain = true)
|
|
|
- public static class Update extends Vo {
|
|
|
+ public static class Update {
|
|
|
|
|
|
@NotNull(message = "deviceId不能为空")
|
|
|
@ApiModelProperty(value = "设备id")
|
|
|
private Long deviceId;
|
|
|
+
|
|
|
+ @NotNull(message = "最大温度告警值不能为空")
|
|
|
+ @ApiModelProperty(value = "最大温度告警值")
|
|
|
+ private Integer tempMax;
|
|
|
+
|
|
|
+ @NotNull(message = "最小温度告警值不能为空")
|
|
|
+ @ApiModelProperty(value = "最小温度告警值")
|
|
|
+ private Integer tempMin;
|
|
|
+
|
|
|
}
|
|
|
|
|
|
+ @Data
|
|
|
+ @Accessors(chain = true)
|
|
|
+ public static class BatchUpdate {
|
|
|
+
|
|
|
+ @NotEmpty(message = "deviceId不能为空")
|
|
|
+ @ApiModelProperty(value = "设备id")
|
|
|
+ private List<Long> deviceIds;
|
|
|
+
|
|
|
+ @NotNull(message = "最大温度告警值不能为空")
|
|
|
+ @ApiModelProperty(value = "最大温度告警值")
|
|
|
+ private Integer tempMax;
|
|
|
+
|
|
|
+ @NotNull(message = "最小温度告警值不能为空")
|
|
|
+ @ApiModelProperty(value = "最小温度告警值")
|
|
|
+ private Integer tempMin;
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
@Data
|
|
|
@Accessors(chain = true)
|
|
|
public static class Vo {
|