fix: 1.字典自动装配类错误 2.修改字典type无效

This commit is contained in:
林海毓 2021-05-13 17:25:40 +08:00
parent d0a7c0593f
commit 6beecb7c88
3 changed files with 10 additions and 1 deletions

View File

@ -23,6 +23,11 @@ public class SysDictTypeBaseVO {
@NotNull(message = "状态不能为空")
private Integer status;
@ApiModelProperty(value = "字典类型", required = true)
@NotNull(message = "字典类型不能为空")
@Size(max = 100, message = "字典类型长度不能超过100个字符")
private String type;
@ApiModelProperty(value = "备注", example = "快乐的备注")
private String remark;

View File

@ -115,6 +115,10 @@ public class SysDictTypeServiceImpl implements SysDictTypeService {
@VisibleForTesting
public void checkDictTypeUnique(Long id, String type) {
// 判断type是否为空减少一次查询数据库的操作
if (type == null) {
return;
}
SysDictTypeDO dictType = dictTypeMapper.selectByType(type);
if (dictType == null) {
return;

View File

@ -1,2 +1,2 @@
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
cn.iocoder.yudao.framework.operatelog.config.YudaoOperateLogAutoConfiguration
cn.iocoder.yudao.framework.dict.config.YudaoDictAutoConfiguration