|
@@ -130,9 +130,11 @@ public class SysDictTypeController extends BaseController {
|
|
|
@PutMapping
|
|
|
public AjaxResult edit(@Validated @RequestBody SysDictType dict)
|
|
|
{
|
|
|
- if (UserConstants.NOT_UNIQUE.equals(dictTypeService.checkDictTypeUnique(dict)))
|
|
|
- {
|
|
|
- return error("修改字典'" + dict.getDictName() + "'失败,字典类型已存在");
|
|
|
+ if (UserConstants.NOT_UNIQUE.equals(dictTypeService.checkDictTypeUnique(dict))) {
|
|
|
+ return error("修改字典'" + dict.getDictType() + "'失败,字典类型已存在");
|
|
|
+ }
|
|
|
+ if (UserConstants.NOT_UNIQUE.equals(dictTypeService.checkDictNameUnique(dict))) {
|
|
|
+ return error("修改字典'" + dict.getDictName() + "'失败,字典名称已存在");
|
|
|
}
|
|
|
dict.setUpdateBy(getUsername());
|
|
|
return toAjax(dictTypeService.updateDictType(dict));
|