浏览代码

增加创建者id跟更改者id

侯茂昌 1 年之前
父节点
当前提交
3a6004648e

+ 2 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/dragForm/SysDictDataController.java

@@ -87,6 +87,7 @@ public class SysDictDataController extends BaseController
     public AjaxResult add(@Validated @RequestBody SysDictData dict)
     {
         dict.setCreateBy(getUsername());
+        dict.setCreateById(getUserId());
         return toAjax(dictDataService.insertDictData(dict));
     }
 
@@ -99,6 +100,7 @@ public class SysDictDataController extends BaseController
     public AjaxResult edit(@Validated @RequestBody SysDictData dict)
     {
         dict.setUpdateBy(getUsername());
+        dict.setUpdateById(getUserId());
         return toAjax(dictDataService.updateDictData(dict));
     }
 

+ 2 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/dragForm/SysDictTypeController.java

@@ -70,6 +70,7 @@ public class SysDictTypeController extends BaseController
             return error("新增字典'" + dict.getDictName() + "'失败,字典类型已存在");
         }
         dict.setCreateBy(getUsername());
+        dict.setCreateById(getUserId());
         return toAjax(dictTypeService.insertDictType(dict));
     }
 
@@ -86,6 +87,7 @@ public class SysDictTypeController extends BaseController
             return error("修改字典'" + dict.getDictName() + "'失败,字典类型已存在");
         }
         dict.setUpdateBy(getUsername());
+        dict.setUpdateById(getUserId());
         return toAjax(dictTypeService.updateDictType(dict));
     }
 

+ 4 - 0
ruoyi-system/src/main/resources/mapper/dragmapper/DragTableMapper.xml

@@ -170,4 +170,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         WHERE
             dt.t_id = #{tId}
     </select>
+    <select id="selectDragTableSqlKeyByTableKey" parameterType="String" resultMap="DragTableResult">
+        <include refid="selectDragTableVo"/>
+        where table_key = #{tableKey}
+    </select>
 </mapper>