Commit 8cc01016a09e886263cad8c615f4ebd3022e3f26
1 parent
1393e5e8
chore:修改swagger model类的value值
Showing
4 changed files
with
17 additions
and
6 deletions
src/main/java/com/irrigation/icl/entity/PageList.java
| @@ -9,10 +9,14 @@ import lombok.NoArgsConstructor; | @@ -9,10 +9,14 @@ import lombok.NoArgsConstructor; | ||
| 9 | 9 | ||
| 10 | import java.util.List; | 10 | import java.util.List; |
| 11 | 11 | ||
| 12 | +/** | ||
| 13 | + * 分页返回类 | ||
| 14 | + * @param <E> | ||
| 15 | + */ | ||
| 12 | @Data | 16 | @Data |
| 13 | @NoArgsConstructor | 17 | @NoArgsConstructor |
| 14 | @AllArgsConstructor | 18 | @AllArgsConstructor |
| 15 | -@ApiModel(value = "分页返回类") | 19 | +@ApiModel(value = "PageList") |
| 16 | public class PageList<E> { | 20 | public class PageList<E> { |
| 17 | 21 | ||
| 18 | @ApiModelProperty(value = "总页数") | 22 | @ApiModelProperty(value = "总页数") |
src/main/java/com/irrigation/icl/entity/PageParam.java
| @@ -6,10 +6,13 @@ import lombok.AllArgsConstructor; | @@ -6,10 +6,13 @@ import lombok.AllArgsConstructor; | ||
| 6 | import lombok.Data; | 6 | import lombok.Data; |
| 7 | import lombok.NoArgsConstructor; | 7 | import lombok.NoArgsConstructor; |
| 8 | 8 | ||
| 9 | +/** | ||
| 10 | + * 分页参数类 | ||
| 11 | + */ | ||
| 9 | @Data | 12 | @Data |
| 10 | @NoArgsConstructor | 13 | @NoArgsConstructor |
| 11 | @AllArgsConstructor | 14 | @AllArgsConstructor |
| 12 | -@ApiModel(value = "分页参数类") | 15 | +@ApiModel(value = "PageParam") |
| 13 | public class PageParam { | 16 | public class PageParam { |
| 14 | 17 | ||
| 15 | @ApiModelProperty(value = "当前页") | 18 | @ApiModelProperty(value = "当前页") |
src/main/java/com/irrigation/icl/entity/RestResult.java
| @@ -10,14 +10,18 @@ import lombok.AllArgsConstructor; | @@ -10,14 +10,18 @@ import lombok.AllArgsConstructor; | ||
| 10 | import lombok.Data; | 10 | import lombok.Data; |
| 11 | import lombok.NoArgsConstructor; | 11 | import lombok.NoArgsConstructor; |
| 12 | 12 | ||
| 13 | +/** | ||
| 14 | + * 公共返回类 | ||
| 15 | + * @param <T> | ||
| 16 | + */ | ||
| 13 | @Data | 17 | @Data |
| 14 | @AllArgsConstructor | 18 | @AllArgsConstructor |
| 15 | @NoArgsConstructor | 19 | @NoArgsConstructor |
| 16 | -@ApiModel(value = "公共返回类") | 20 | +@ApiModel(value = "RestResult") |
| 17 | public class RestResult<T> { | 21 | public class RestResult<T> { |
| 18 | - @ApiModelProperty(value = "返回编码类型") | 22 | + @ApiModelProperty(value = "返回编码类型",example = "200",allowableValues = "200,400") |
| 19 | private int code; | 23 | private int code; |
| 20 | - @ApiModelProperty(value = "返回提示消息") | 24 | + @ApiModelProperty(value = "返回提示消息",example = "成功") |
| 21 | private String message; | 25 | private String message; |
| 22 | @ApiModelProperty(value = "返回请求数据对象") | 26 | @ApiModelProperty(value = "返回请求数据对象") |
| 23 | private T data; | 27 | private T data; |
src/main/java/com/irrigation/icl/enums/ResultEnum.java
| @@ -26,7 +26,7 @@ public enum ResultEnum { | @@ -26,7 +26,7 @@ public enum ResultEnum { | ||
| 26 | private final int code; | 26 | private final int code; |
| 27 | private final String message; | 27 | private final String message; |
| 28 | 28 | ||
| 29 | - private ResultEnum(int code, String message) { | 29 | + ResultEnum(int code, String message) { |
| 30 | this.code = code; | 30 | this.code = code; |
| 31 | this.message = message; | 31 | this.message = message; |
| 32 | } | 32 | } |