Commit 1737714a22345012ed012e7ce0efc41dd2033223
1 parent
5d98ccdf
修复敏感词的 Swagger 注解错误,导致 Knife4j 无法使用
Showing
4 changed files
with
10 additions
and
5 deletions
yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/sensitiveword/vo/SensitiveWordExcelVO.java
| 1 | 1 | package cn.iocoder.yudao.module.system.controller.admin.sensitiveword.vo; |
| 2 | 2 | |
| 3 | +import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat; | |
| 4 | +import cn.iocoder.yudao.framework.excel.core.convert.DictConvert; | |
| 5 | +import cn.iocoder.yudao.module.system.enums.DictTypeConstants; | |
| 3 | 6 | import com.alibaba.excel.annotation.ExcelProperty; |
| 4 | 7 | import lombok.Data; |
| 5 | 8 | |
| ... | ... | @@ -23,7 +26,8 @@ public class SensitiveWordExcelVO { |
| 23 | 26 | @ExcelProperty("标签") |
| 24 | 27 | private List<String> tags; |
| 25 | 28 | |
| 26 | - @ExcelProperty("状态,true-启用,false-禁用") | |
| 29 | + @ExcelProperty(value = "状态", converter = DictConvert.class) | |
| 30 | + @DictFormat(DictTypeConstants.COMMON_STATUS) | |
| 27 | 31 | private Integer status; |
| 28 | 32 | |
| 29 | 33 | @ExcelProperty("描述") | ... | ... |
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 { |
| 19 | 19 | @ApiModelProperty(value = "标签", example = "短信,评论") |
| 20 | 20 | private String tag; |
| 21 | 21 | |
| 22 | - @ApiModelProperty(value = "状态", example = "true-启用,false-禁用") | |
| 22 | + @ApiModelProperty(value = "状态", example = "1", notes = "参见 CommonStatusEnum 枚举类") | |
| 23 | 23 | private Integer status; |
| 24 | 24 | |
| 25 | 25 | @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) | ... | ... |
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 { |
| 24 | 24 | @ApiModelProperty(value = "标签", example = "短信,评论") |
| 25 | 25 | private String tag; |
| 26 | 26 | |
| 27 | - @ApiModelProperty(value = "状态", example = "true-启用,true-禁用") | |
| 27 | + @ApiModelProperty(value = "状态", example = "1", notes = "参见 CommonStatusEnum 枚举类") | |
| 28 | 28 | private Integer status; |
| 29 | 29 | |
| 30 | 30 | @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) | ... | ... |
yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/tenant/vo/tenant/TenantExcelVO.java
| 1 | 1 | package cn.iocoder.yudao.module.system.controller.admin.tenant.vo.tenant; |
| 2 | 2 | |
| 3 | +import cn.iocoder.yudao.module.system.enums.DictTypeConstants; | |
| 3 | 4 | import lombok.*; |
| 4 | 5 | import java.util.*; |
| 5 | 6 | |
| ... | ... | @@ -28,8 +29,8 @@ public class TenantExcelVO { |
| 28 | 29 | @ExcelProperty("联系手机") |
| 29 | 30 | private String contactMobile; |
| 30 | 31 | |
| 31 | - @ExcelProperty(value = "租户状态(0正常 1停用)", converter = DictConvert.class) | |
| 32 | - @DictFormat("sys_common_status") // TODO 代码优化:建议设置到对应的 XXXDictTypeConstants 枚举类中 | |
| 32 | + @ExcelProperty(value = "状态", converter = DictConvert.class) | |
| 33 | + @DictFormat(DictTypeConstants.COMMON_STATUS) | |
| 33 | 34 | private Integer status; |
| 34 | 35 | |
| 35 | 36 | @ExcelProperty("创建时间") | ... | ... |