修复敏感词的 Swagger 注解错误,导致 Knife4j 无法使用

This commit is contained in:
YunaiV 2022-04-15 20:36:39 +08:00
parent 5d98ccdff1
commit 1737714a22
4 changed files with 10 additions and 5 deletions

View File

@ -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<String> tags;
@ExcelProperty("状态true-启用false-禁用")
@ExcelProperty(value = "状态", converter = DictConvert.class)
@DictFormat(DictTypeConstants.COMMON_STATUS)
private Integer status;
@ExcelProperty("描述")

View File

@ -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)

View File

@ -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)

View File

@ -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("创建时间")