From 1737714a22345012ed012e7ce0efc41dd2033223 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Fri, 15 Apr 2022 20:36:39 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=95=8F=E6=84=9F=E8=AF=8D?= =?UTF-8?q?=E7=9A=84=20Swagger=20=E6=B3=A8=E8=A7=A3=E9=94=99=E8=AF=AF?= =?UTF-8?q?=EF=BC=8C=E5=AF=BC=E8=87=B4=20Knife4j=20=E6=97=A0=E6=B3=95?= =?UTF-8?q?=E4=BD=BF=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/sensitiveword/vo/SensitiveWordExcelVO.java | 6 +++++- .../admin/sensitiveword/vo/SensitiveWordExportReqVO.java | 2 +- .../admin/sensitiveword/vo/SensitiveWordPageReqVO.java | 2 +- .../controller/admin/tenant/vo/tenant/TenantExcelVO.java | 5 +++-- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sensitiveword/vo/SensitiveWordExcelVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sensitiveword/vo/SensitiveWordExcelVO.java index f259f1f31..3cb13de98 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sensitiveword/vo/SensitiveWordExcelVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sensitiveword/vo/SensitiveWordExcelVO.java @@ -1,5 +1,8 @@ package cn.iocoder.yudao.module.system.controller.admin.sensitiveword.vo; +import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat; +import cn.iocoder.yudao.framework.excel.core.convert.DictConvert; +import cn.iocoder.yudao.module.system.enums.DictTypeConstants; import com.alibaba.excel.annotation.ExcelProperty; import lombok.Data; @@ -23,7 +26,8 @@ public class SensitiveWordExcelVO { @ExcelProperty("标签") private List tags; - @ExcelProperty("状态,true-启用,false-禁用") + @ExcelProperty(value = "状态", converter = DictConvert.class) + @DictFormat(DictTypeConstants.COMMON_STATUS) private Integer status; @ExcelProperty("描述") diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sensitiveword/vo/SensitiveWordExportReqVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sensitiveword/vo/SensitiveWordExportReqVO.java index 3c9076989..cec4944de 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sensitiveword/vo/SensitiveWordExportReqVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sensitiveword/vo/SensitiveWordExportReqVO.java @@ -19,7 +19,7 @@ public class SensitiveWordExportReqVO { @ApiModelProperty(value = "标签", example = "短信,评论") private String tag; - @ApiModelProperty(value = "状态", example = "true-启用,false-禁用") + @ApiModelProperty(value = "状态", example = "1", notes = "参见 CommonStatusEnum 枚举类") private Integer status; @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sensitiveword/vo/SensitiveWordPageReqVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sensitiveword/vo/SensitiveWordPageReqVO.java index 1a4d7861f..45d9cf161 100644 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sensitiveword/vo/SensitiveWordPageReqVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sensitiveword/vo/SensitiveWordPageReqVO.java @@ -24,7 +24,7 @@ public class SensitiveWordPageReqVO extends PageParam { @ApiModelProperty(value = "标签", example = "短信,评论") private String tag; - @ApiModelProperty(value = "状态", example = "true-启用,true-禁用") + @ApiModelProperty(value = "状态", example = "1", notes = "参见 CommonStatusEnum 枚举类") private Integer status; @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) diff --git a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/tenant/vo/tenant/TenantExcelVO.java b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/tenant/vo/tenant/TenantExcelVO.java index e586ce0dc..531060ace 100755 --- a/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/tenant/vo/tenant/TenantExcelVO.java +++ b/yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/tenant/vo/tenant/TenantExcelVO.java @@ -1,5 +1,6 @@ package cn.iocoder.yudao.module.system.controller.admin.tenant.vo.tenant; +import cn.iocoder.yudao.module.system.enums.DictTypeConstants; import lombok.*; import java.util.*; @@ -28,8 +29,8 @@ public class TenantExcelVO { @ExcelProperty("联系手机") private String contactMobile; - @ExcelProperty(value = "租户状态(0正常 1停用)", converter = DictConvert.class) - @DictFormat("sys_common_status") // TODO 代码优化:建议设置到对应的 XXXDictTypeConstants 枚举类中 + @ExcelProperty(value = "状态", converter = DictConvert.class) + @DictFormat(DictTypeConstants.COMMON_STATUS) private Integer status; @ExcelProperty("创建时间")