From 8c0de4aa220e873463847d5328902ddb0d107572 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Mon, 23 Jul 2018 20:34:01 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=AD=97=E5=85=B8=E5=90=8C?= =?UTF-8?q?=E6=AD=A5=E4=BF=AE=E6=94=B9=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ruoyi/project/system/dict/mapper/DictDataMapper.java | 9 +++++++++ .../project/system/dict/service/DictTypeServiceImpl.java | 2 ++ src/main/resources/mybatis/monitor/JobMapper.xml | 3 +-- src/main/resources/mybatis/system/DeptMapper.xml | 3 +-- src/main/resources/mybatis/system/DictDataMapper.xml | 7 +++++-- src/main/resources/mybatis/system/DictTypeMapper.xml | 3 +-- src/main/resources/mybatis/system/MenuMapper.xml | 3 +-- src/main/resources/mybatis/system/PostMapper.xml | 3 +-- src/main/resources/mybatis/system/RoleMapper.xml | 3 +-- src/main/resources/mybatis/system/UserMapper.xml | 3 +-- src/main/resources/static/ajax/libs/cropbox/cropbox.css | 1 - src/main/resources/static/ajax/libs/cropbox/cropbox.js | 6 ------ 12 files changed, 23 insertions(+), 23 deletions(-) diff --git a/src/main/java/com/ruoyi/project/system/dict/mapper/DictDataMapper.java b/src/main/java/com/ruoyi/project/system/dict/mapper/DictDataMapper.java index 79fd2b78..2e89d369 100644 --- a/src/main/java/com/ruoyi/project/system/dict/mapper/DictDataMapper.java +++ b/src/main/java/com/ruoyi/project/system/dict/mapper/DictDataMapper.java @@ -87,4 +87,13 @@ public interface DictDataMapper */ public int updateDictData(DictData dictData); + /** + * 同步修改字典类型 + * + * @param oldDictType 旧字典类型 + * @param newDictType 新旧字典类型 + * @return 结果 + */ + public int updateDictDataType(@Param("oldDictType") String oldDictType, @Param("newDictType") String newDictType); + } diff --git a/src/main/java/com/ruoyi/project/system/dict/service/DictTypeServiceImpl.java b/src/main/java/com/ruoyi/project/system/dict/service/DictTypeServiceImpl.java index 51583e32..dc00edb0 100644 --- a/src/main/java/com/ruoyi/project/system/dict/service/DictTypeServiceImpl.java +++ b/src/main/java/com/ruoyi/project/system/dict/service/DictTypeServiceImpl.java @@ -117,6 +117,8 @@ public class DictTypeServiceImpl implements IDictTypeService public int updateDictType(DictType dictType) { dictType.setUpdateBy(ShiroUtils.getLoginName()); + DictType oldDict = dictTypeMapper.selectDictTypeById(dictType.getDictId()); + dictDataMapper.updateDictDataType(oldDict.getDictType(), dictType.getDictType()); return dictTypeMapper.updateDictType(dictType); } diff --git a/src/main/resources/mybatis/monitor/JobMapper.xml b/src/main/resources/mybatis/monitor/JobMapper.xml index ea57f0fe..02c27573 100644 --- a/src/main/resources/mybatis/monitor/JobMapper.xml +++ b/src/main/resources/mybatis/monitor/JobMapper.xml @@ -73,8 +73,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" update_by = #{updateBy}, update_time = sysdate() - where 1=1 - and job_id = #{jobId} + where job_id = #{jobId} diff --git a/src/main/resources/mybatis/system/DeptMapper.xml b/src/main/resources/mybatis/system/DeptMapper.xml index e015f61a..193ef2cb 100644 --- a/src/main/resources/mybatis/system/DeptMapper.xml +++ b/src/main/resources/mybatis/system/DeptMapper.xml @@ -103,8 +103,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" update_by = #{updateBy}, update_time = sysdate() - where 1=1 - and dept_id = #{deptId} + where dept_id = #{deptId} diff --git a/src/main/resources/mybatis/system/DictDataMapper.xml b/src/main/resources/mybatis/system/DictDataMapper.xml index d55e3795..e3eee41a 100644 --- a/src/main/resources/mybatis/system/DictDataMapper.xml +++ b/src/main/resources/mybatis/system/DictDataMapper.xml @@ -84,8 +84,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" update_by = #{updateBy}, update_time = sysdate() - where 1=1 - and dict_code = #{dictCode} + where dict_code = #{dictCode} + + + + update sys_dict_data set dict_type = #{newDictType} where dict_type = #{oldDictType} diff --git a/src/main/resources/mybatis/system/DictTypeMapper.xml b/src/main/resources/mybatis/system/DictTypeMapper.xml index 30bcb2d8..15862135 100644 --- a/src/main/resources/mybatis/system/DictTypeMapper.xml +++ b/src/main/resources/mybatis/system/DictTypeMapper.xml @@ -75,8 +75,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" update_by = #{updateBy}, update_time = sysdate() - where 1=1 - and dict_id = #{dictId} + where dict_id = #{dictId} diff --git a/src/main/resources/mybatis/system/MenuMapper.xml b/src/main/resources/mybatis/system/MenuMapper.xml index 0f70aa7b..db114124 100644 --- a/src/main/resources/mybatis/system/MenuMapper.xml +++ b/src/main/resources/mybatis/system/MenuMapper.xml @@ -102,8 +102,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" update_by = #{updateBy}, update_time = sysdate() - where 1=1 - and menu_id = #{menuId} + where menu_id = #{menuId} diff --git a/src/main/resources/mybatis/system/PostMapper.xml b/src/main/resources/mybatis/system/PostMapper.xml index 49ada311..b5d44ff8 100644 --- a/src/main/resources/mybatis/system/PostMapper.xml +++ b/src/main/resources/mybatis/system/PostMapper.xml @@ -71,8 +71,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" update_by = #{updateBy}, update_time = sysdate() - where 1=1 - and post_id = #{postId} + where post_id = #{postId} diff --git a/src/main/resources/mybatis/system/RoleMapper.xml b/src/main/resources/mybatis/system/RoleMapper.xml index 42f08c5f..04ab82ae 100644 --- a/src/main/resources/mybatis/system/RoleMapper.xml +++ b/src/main/resources/mybatis/system/RoleMapper.xml @@ -86,8 +86,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" update_by = #{updateBy}, update_time = sysdate() - where 1=1 - and role_id = #{roleId} + where role_id = #{roleId} diff --git a/src/main/resources/mybatis/system/UserMapper.xml b/src/main/resources/mybatis/system/UserMapper.xml index f5618bf4..cff58670 100644 --- a/src/main/resources/mybatis/system/UserMapper.xml +++ b/src/main/resources/mybatis/system/UserMapper.xml @@ -129,8 +129,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" remark = #{remark}, update_time = sysdate() - where 1=1 - and user_id = #{userId} + where user_id = #{userId} diff --git a/src/main/resources/static/ajax/libs/cropbox/cropbox.css b/src/main/resources/static/ajax/libs/cropbox/cropbox.css index 8263179d..b57f49d7 100644 --- a/src/main/resources/static/ajax/libs/cropbox/cropbox.css +++ b/src/main/resources/static/ajax/libs/cropbox/cropbox.css @@ -125,4 +125,3 @@ a.upload-img:hover{ } .tc{text-align:center;} -/*www.jq22.com*/ \ No newline at end of file diff --git a/src/main/resources/static/ajax/libs/cropbox/cropbox.js b/src/main/resources/static/ajax/libs/cropbox/cropbox.js index 919270a5..b25091e9 100644 --- a/src/main/resources/static/ajax/libs/cropbox/cropbox.js +++ b/src/main/resources/static/ajax/libs/cropbox/cropbox.js @@ -1,7 +1,3 @@ -/** - * Created by ezgoing on 14/9/2014. - */ - "use strict"; (function (factory) { if (typeof define === 'function' && define.amd) { @@ -137,5 +133,3 @@ return new cropbox(options, this); }; })); - -/*www.jq22.com*/