fix:Dict注解优化

This commit is contained in:
FCL
2025-11-28 09:04:01 +08:00
parent 7a03bc6293
commit 7f1c4dd8c4
2 changed files with 3 additions and 1 deletions

View File

@@ -1,5 +1,6 @@
package com.zt.plat.module.qms.business.config.controller.vo; package com.zt.plat.module.qms.business.config.controller.vo;
import com.zt.plat.module.qms.core.aspect.annotation.Dict;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*; import lombok.*;
@@ -17,6 +18,7 @@ public class ConfigWarehouseLocationRespVO {
@ExcelProperty("ID") @ExcelProperty("ID")
private Long id; private Long id;
// @Dict(dictTable="t_cfg_wrh_loc",dicCode="id",dicText="name")
@Schema(description = "父ID", example = "31498") @Schema(description = "父ID", example = "31498")
@ExcelProperty("父ID") @ExcelProperty("父ID")
private Long parentId; private Long parentId;

View File

@@ -137,7 +137,7 @@ public class DictAspect {
String dictCode = code; String dictCode = code;
if (!StringUtils.isEmpty(table)) { if (!StringUtils.isEmpty(table)) {
//指定table //指定table
dictCode = String.format("%s,%s,%s,%s", table, text, code, keyOrId); dictCode = String.format("%s,%s,%s", table, text, code);
}else{ }else{
dictCode = String.format("%s"+DICT_ANNOTATION_SPLIT+"%s", code, keyOrId); dictCode = String.format("%s"+DICT_ANNOTATION_SPLIT+"%s", code, keyOrId);
} }