From 67b17da06f2a7f2c6d506d621ff624d9a69bed91 Mon Sep 17 00:00:00 2001
From: RuoYi <yzz_ivy@163.com>
Date: Tue, 17 Dec 2024 14:28:17 +0800
Subject: [PATCH] 优化特殊字符密码修改失败问题
---
ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/SysDictTypeController.java | 15 +++++++--------
1 files changed, 7 insertions(+), 8 deletions(-)
diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/SysDictTypeController.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/SysDictTypeController.java
index dabd6b2..8c37d86 100644
--- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/SysDictTypeController.java
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/SysDictTypeController.java
@@ -12,7 +12,6 @@
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
-import com.ruoyi.common.core.constant.UserConstants;
import com.ruoyi.common.core.utils.poi.ExcelUtil;
import com.ruoyi.common.core.web.controller.BaseController;
import com.ruoyi.common.core.web.domain.AjaxResult;
@@ -62,7 +61,7 @@
@GetMapping(value = "/{dictId}")
public AjaxResult getInfo(@PathVariable Long dictId)
{
- return AjaxResult.success(dictTypeService.selectDictTypeById(dictId));
+ return success(dictTypeService.selectDictTypeById(dictId));
}
/**
@@ -73,9 +72,9 @@
@PostMapping
public AjaxResult add(@Validated @RequestBody SysDictType dict)
{
- if (UserConstants.NOT_UNIQUE.equals(dictTypeService.checkDictTypeUnique(dict)))
+ if (!dictTypeService.checkDictTypeUnique(dict))
{
- return AjaxResult.error("新增字典'" + dict.getDictName() + "'失败,字典类型已存在");
+ return error("新增字典'" + dict.getDictName() + "'失败,字典类型已存在");
}
dict.setCreateBy(SecurityUtils.getUsername());
return toAjax(dictTypeService.insertDictType(dict));
@@ -89,9 +88,9 @@
@PutMapping
public AjaxResult edit(@Validated @RequestBody SysDictType dict)
{
- if (UserConstants.NOT_UNIQUE.equals(dictTypeService.checkDictTypeUnique(dict)))
+ if (!dictTypeService.checkDictTypeUnique(dict))
{
- return AjaxResult.error("修改字典'" + dict.getDictName() + "'失败,字典类型已存在");
+ return error("修改字典'" + dict.getDictName() + "'失败,字典类型已存在");
}
dict.setUpdateBy(SecurityUtils.getUsername());
return toAjax(dictTypeService.updateDictType(dict));
@@ -118,7 +117,7 @@
public AjaxResult refreshCache()
{
dictTypeService.resetDictCache();
- return AjaxResult.success();
+ return success();
}
/**
@@ -128,6 +127,6 @@
public AjaxResult optionselect()
{
List<SysDictType> dictTypes = dictTypeService.selectDictTypeAll();
- return AjaxResult.success(dictTypes);
+ return success(dictTypes);
}
}
--
Gitblit v1.9.3