Commit fd48795b8afc391db5466d7c2723f088fbf1fd34
Committed by
Gitee
!1392 refactor(yudao-common):调整 CommonResult 和 PageResult 类的属性顺序(基于master-jdk17)
Merge pull request !1392 from 长草颜团子/result-order-jdk17
Showing
2 changed files
with
7 additions
and
7 deletions
yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/pojo/CommonResult.java
| @@ -26,15 +26,15 @@ public class CommonResult<T> implements Serializable { | @@ -26,15 +26,15 @@ public class CommonResult<T> implements Serializable { | ||
| 26 | */ | 26 | */ |
| 27 | private Integer code; | 27 | private Integer code; |
| 28 | /** | 28 | /** |
| 29 | - * 返回数据 | ||
| 30 | - */ | ||
| 31 | - private T data; | ||
| 32 | - /** | ||
| 33 | * 错误提示,用户可阅读 | 29 | * 错误提示,用户可阅读 |
| 34 | * | 30 | * |
| 35 | * @see ErrorCode#getMsg() () | 31 | * @see ErrorCode#getMsg() () |
| 36 | */ | 32 | */ |
| 37 | private String msg; | 33 | private String msg; |
| 34 | + /** | ||
| 35 | + * 返回数据 | ||
| 36 | + */ | ||
| 37 | + private T data; | ||
| 38 | 38 | ||
| 39 | /** | 39 | /** |
| 40 | * 将传入的 result 对象,转换成另外一个泛型结果的对象 | 40 | * 将传入的 result 对象,转换成另外一个泛型结果的对象 |
yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/pojo/PageResult.java
| @@ -11,12 +11,12 @@ import java.util.List; | @@ -11,12 +11,12 @@ import java.util.List; | ||
| 11 | @Data | 11 | @Data |
| 12 | public final class PageResult<T> implements Serializable { | 12 | public final class PageResult<T> implements Serializable { |
| 13 | 13 | ||
| 14 | - @Schema(description = "数据", requiredMode = Schema.RequiredMode.REQUIRED) | ||
| 15 | - private List<T> list; | ||
| 16 | - | ||
| 17 | @Schema(description = "总量", requiredMode = Schema.RequiredMode.REQUIRED) | 14 | @Schema(description = "总量", requiredMode = Schema.RequiredMode.REQUIRED) |
| 18 | private Long total; | 15 | private Long total; |
| 19 | 16 | ||
| 17 | + @Schema(description = "数据", requiredMode = Schema.RequiredMode.REQUIRED) | ||
| 18 | + private List<T> list; | ||
| 19 | + | ||
| 20 | public PageResult() { | 20 | public PageResult() { |
| 21 | } | 21 | } |
| 22 | 22 |