提交 b47fc457 authored 作者: 李秋林's avatar 李秋林

sys_dict字典类表添加创建人修改人id

上级 b9b2607c
......@@ -85,6 +85,7 @@ public class SysDictDataController extends BaseController
public AjaxResult add(@Validated @RequestBody SysDictData dict)
{
dict.setCreateBy(SecurityUtils.getUsername());
dict.setCreateUserId(SecurityUtils.getUserId());
return toAjax(dictDataDao.insertDictData(dict));
}
......@@ -97,6 +98,7 @@ public class SysDictDataController extends BaseController
public AjaxResult edit(@Validated @RequestBody SysDictData dict)
{
dict.setUpdateBy(SecurityUtils.getUsername());
dict.setUpdateUserId(SecurityUtils.getUserId());
return toAjax(dictDataDao.updateDictData(dict));
}
......
......@@ -84,6 +84,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="status != null">status = #{status},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
<if test="updateUserId != null">update_user_id = #{updateUserId},</if>
update_time = sysdate()
</set>
where dict_code = #{dictCode}
......@@ -105,6 +106,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="status != null">status,</if>
<if test="remark != null and remark != ''">remark,</if>
<if test="createBy != null and createBy != ''">create_by,</if>
<if test="createUserId != null">create_user_id,</if>
create_time
)values(
<if test="dictSort != null">#{dictSort},</if>
......@@ -117,6 +119,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="status != null">#{status},</if>
<if test="remark != null and remark != ''">#{remark},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if>
<if test="createUserId != null">#{createUserId},</if>
sysdate()
)
</insert>
......
......@@ -73,6 +73,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="status != null">status = #{status},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
<if test="updateUserId != null ">update_user_id = #{updateUserId},</if>
update_time = sysdate()
</set>
where dict_id = #{dictId}
......@@ -85,6 +86,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="status != null">status,</if>
<if test="remark != null and remark != ''">remark,</if>
<if test="createBy != null and createBy != ''">create_by,</if>
<if test="createUserId != null">create_user_id,</if>
create_time
)values(
<if test="dictName != null and dictName != ''">#{dictName},</if>
......@@ -92,6 +94,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="status != null">#{status},</if>
<if test="remark != null and remark != ''">#{remark},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if>
<if test="createUserId != null">#{createUserId},</if>
sysdate()
)
</insert>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论