From 6a67849aafec8f68640300a50a6f5e014f5aedc9 Mon Sep 17 00:00:00 2001 From: lisai Date: Fri, 22 Jul 2022 17:04:43 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=84=E7=90=86bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/whdc/zhdbaqapi/model/dto/IntegerIdDto.java | 6 +++--- src/main/resources/mapper/DeviceInfoMapper.xml | 10 +++++++++- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/whdc/zhdbaqapi/model/dto/IntegerIdDto.java b/src/main/java/com/whdc/zhdbaqapi/model/dto/IntegerIdDto.java index 0b4a69a..79f0f91 100644 --- a/src/main/java/com/whdc/zhdbaqapi/model/dto/IntegerIdDto.java +++ b/src/main/java/com/whdc/zhdbaqapi/model/dto/IntegerIdDto.java @@ -4,7 +4,7 @@ import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiParam; import lombok.Data; -import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; import java.io.Serializable; /** @@ -16,7 +16,7 @@ public class IntegerIdDto implements Serializable { private static final long serialVersionUID = 1L; @ApiParam(value = "主键ID", example = "") - @ApiModelProperty(value = "主键ID", dataType = "java.lang.String") - @NotBlank(message = "主键ID") + @ApiModelProperty(value = "主键ID", dataType = "java.lang.Integer") + @NotNull(message = "主键ID") private Integer id; } diff --git a/src/main/resources/mapper/DeviceInfoMapper.xml b/src/main/resources/mapper/DeviceInfoMapper.xml index 5669b1b..b1df251 100644 --- a/src/main/resources/mapper/DeviceInfoMapper.xml +++ b/src/main/resources/mapper/DeviceInfoMapper.xml @@ -22,7 +22,15 @@