修改字典同步修改数据

master
RuoYi 6 years ago committed by Limy
parent c1ff27a13c
commit 8c0de4aa22

@ -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);
}

@ -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);
}

@ -73,8 +73,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
update_time = sysdate()
</set>
where 1=1
<if test="jobId != null">and job_id = #{jobId}</if>
where job_id = #{jobId}
</update>
<insert id="insertJob" parameterType="Post" useGeneratedKeys="true" keyProperty="jobId">

@ -103,8 +103,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
update_time = sysdate()
</set>
where 1=1
<if test="deptId != null and deptId != ''">and dept_id = #{deptId}</if>
where dept_id = #{deptId}
</update>
<delete id="deleteDeptById" parameterType="Long">

@ -84,8 +84,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
update_time = sysdate()
</set>
where 1=1
<if test="dictCode != null and dictCode != ''">and dict_code = #{dictCode}</if>
where dict_code = #{dictCode}
</update>
<update id="updateDictDataType" parameterType="String">
update sys_dict_data set dict_type = #{newDictType} where dict_type = #{oldDictType}
</update>
<insert id="insertDictData" parameterType="DictData">

@ -75,8 +75,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
update_time = sysdate()
</set>
where 1=1
<if test="dictId != null and dictId != ''">and dict_id = #{dictId}</if>
where dict_id = #{dictId}
</update>
<insert id="insertDictType" parameterType="DictType">

@ -102,8 +102,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
update_time = sysdate()
</set>
where 1=1
<if test="menuId != null and menuId != ''">and menu_id = #{menuId}</if>
where menu_id = #{menuId}
</update>
<insert id="insertMenu" parameterType="Menu">

@ -71,8 +71,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
update_time = sysdate()
</set>
where 1=1
<if test="postId != null">and post_id = #{postId}</if>
where post_id = #{postId}
</update>
<insert id="insertPost" parameterType="Post" useGeneratedKeys="true" keyProperty="postId">

@ -86,8 +86,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
update_time = sysdate()
</set>
where 1=1
<if test="roleId != null">and role_id = #{roleId}</if>
where role_id = #{roleId}
</update>
<insert id="insertRole" parameterType="Role" useGeneratedKeys="true" keyProperty="roleId">

@ -129,8 +129,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="remark != null and remark != ''">remark = #{remark},</if>
update_time = sysdate()
</set>
where 1=1
<if test="userId != null and userId != ''">and user_id = #{userId}</if>
where user_id = #{userId}
</update>
<insert id="insertUser" parameterType="User" useGeneratedKeys="true" keyProperty="userId">

@ -125,4 +125,3 @@ a.upload-img:hover{
}
.tc{text-align:center;}
/*www.jq22.com*/

@ -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*/

Loading…
Cancel
Save