瀏覽代碼

优化代码

RuoYi 2 年之前
父節點
當前提交
70205922fc

+ 1 - 5
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysProfileController.java

@@ -63,11 +63,7 @@ public class SysProfileController extends BaseController
     public boolean checkPassword(String password)
     {
         SysUser user = getSysUser();
-        if (passwordService.matches(user, password))
-        {
-            return true;
-        }
-        return false;
+        return passwordService.matches(user, password);
     }
 
     @GetMapping("/resetPwd")

+ 1 - 1
ruoyi-admin/src/main/resources/templates/demo/form/wizard.html

@@ -181,7 +181,7 @@ $('#smartwizard').smartWizard({
   enableURLhash: true, // Enable selection of the step based on url hash
   transition: {
       animation: 'none', // Effect on navigation, none/fade/slide-horizontal/slide-vertical/slide-swing
-      speed: '400', // Transion animation speed
+      speed: '400', // Transition animation speed
       easing:'' // Transition animation easing. Not supported without a jQuery easing plugin
   },
   toolbarSettings: {

+ 1 - 1
ruoyi-common/src/main/java/com/ruoyi/common/core/text/Convert.java

@@ -713,7 +713,7 @@ public class Convert
         }
         if (value instanceof Double)
         {
-            return new BigDecimal((Double) value);
+            return BigDecimal.valueOf((Double) value);
         }
         if (value instanceof Integer)
         {

+ 8 - 0
ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysConfigMapper.java

@@ -19,6 +19,14 @@ public interface SysConfigMapper
     public SysConfig selectConfig(SysConfig config);
 
     /**
+     * 通过ID查询配置
+     * 
+     * @param configId 参数ID
+     * @return 参数配置信息
+     */
+    public SysConfig selectConfigById(Long configId);
+
+    /**
      * 查询参数配置列表
      * 
      * @param config 参数配置信息

+ 5 - 0
ruoyi-system/src/main/resources/mapper/system/SysConfigMapper.xml

@@ -59,6 +59,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 		</where>
     </select>
     
+    <select id="selectConfigById" parameterType="Long" resultMap="SysConfigResult">
+		<include refid="selectConfigVo"/>
+		where config_id = #{configId}
+	</select>
+    
     <select id="checkConfigKeyUnique" parameterType="String" resultMap="SysConfigResult">
         <include refid="selectConfigVo"/>
         where config_key = #{configKey} limit 1