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

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

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