fix: 1.字典自动装配类错误 2.修改字典type无效
This commit is contained in:
parent
d0a7c0593f
commit
6beecb7c88
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
|
||||
cn.iocoder.yudao.framework.operatelog.config.YudaoOperateLogAutoConfiguration
|
||||
cn.iocoder.yudao.framework.dict.config.YudaoDictAutoConfiguration
|
||||
|
|
Loading…
Reference in New Issue