侯茂昌 před 1 rokem
rodič
revize
62c0a0924e

+ 1 - 4
ruoyi-admin/src/main/java/com/ruoyi/web/controller/dragForm/CommonController.java

@@ -78,7 +78,7 @@ public class CommonController extends BaseController {
         TableSql tableSql = iTableSqlService.selectTableSqlByTSqlKey(commonEntity.getQueryMap().get("sqlkey").toString());
         System.err.println(tableSql);
         startPage();  // 校验是否sqlserver 否执行 是执行另一种方式的分页
-        return getDataTable(commonService.queryTableList2(commonEntity, tableSql));
+        return getDataTable(commonService.queryGroupTableList(commonEntity, tableSql));
     }
 
     /**
@@ -136,10 +136,7 @@ public class CommonController extends BaseController {
         } else if (btnType == ButtonTypeConstants.DELETE) {
             return toAjax(commonService.batchDelete(commonEntity));
         } else if(btnType == ButtonTypeConstants.SCRIPT) {
-
         }
         return warn("暂不支持该操作!");
     }
-
-
 }

+ 15 - 0
ruoyi-system/src/main/java/com/ruoyi/system/entity/DragTableGroup.java

@@ -26,6 +26,11 @@ public class DragTableGroup extends BaseEntity {
     @Excel(name = "表格组key")
     private String groupKey;
 
+
+    /** 表格组类型 */
+    @Excel(name = "表格组key")
+    private String groupType;
+
     /** 表格组描述 */
     @Excel(name = "表格组描述")
     private String groupDescription;
@@ -82,6 +87,16 @@ public class DragTableGroup extends BaseEntity {
         this.groupKey = groupKey;
     }
 
+
+    public String getGroupType() {
+        return groupType;
+    }
+
+    public void setGroupType(String groupType) {
+        this.groupType = groupType;
+    }
+
+
     public String getDelFlag() {
         return delFlag;
     }

+ 9 - 3
ruoyi-system/src/main/java/com/ruoyi/system/service/ICommonService.java

@@ -2,11 +2,11 @@ package com.ruoyi.system.service;
 
 import com.ruoyi.system.entity.CommonEntity;
 import com.ruoyi.system.entity.TableSql;
-import org.apache.ibatis.annotations.Param;
+
 
 import javax.servlet.http.HttpServletResponse;
 import java.util.List;
-import java.util.Map;
+
 
 public interface ICommonService {
 
@@ -36,7 +36,13 @@ public interface ICommonService {
      */
     List<CommonEntity> queryTableList(CommonEntity commonEntity, TableSql tableSql);
 
-     List<CommonEntity> queryTableList2(CommonEntity commonEntity, TableSql tableSql);
+    /**
+     * 表格组查询表格信息
+     * @param commonEntity
+     * @param tableSql
+     * @return
+     */
+    List<CommonEntity> queryGroupTableList(CommonEntity commonEntity, TableSql tableSql);
 
     /**
      * 导出列表

+ 5 - 12
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/CommonServiceImpl.java

@@ -98,10 +98,6 @@ public class CommonServiceImpl implements ICommonService {
         fields.keySet().forEach(item -> {
             endfields.put(toUnderScoreCase(item), fields.get(item));
         });
-        endfields.put("update_by", SecurityUtils.getUsername());
-        endfields.put("update_by_id", SecurityUtils.getUserId());
-        endfields.put("update_time", DateUtils.getTime());
-
         return commonMapper.edit(endfields, tableName, conditions);
     }
 
@@ -113,7 +109,7 @@ public class CommonServiceImpl implements ICommonService {
     }
 
 
-    public List<CommonEntity> queryTableList2(CommonEntity commonEntity, TableSql tableSql) {
+    public List<CommonEntity> queryGroupTableList(CommonEntity commonEntity, TableSql tableSql) {
            //前端传递过来的参数
            Map<String, Object> queryMap = commonEntity.getQueryMap();
            //是否存在
@@ -121,7 +117,7 @@ public class CommonServiceImpl implements ICommonService {
            //循环前端传过来的参数 跳过 sqlkey
            AtomicReference<String> replaceSql= new AtomicReference<>(tableSql.getTableCondition());
            queryMap.forEach((k,v)->{
-               if(!k.equals("sqlkey")){
+               if(!k.equals("sqlkey")){ //查询第一个表的数据是不会进行任何替换的
                    int isExistIndex = tableSql.getTableCondition().indexOf(k);
                    replaceSql.set(tableSql.getTableCondition().replace(k, v.toString()));
                    if(isExistIndex<0){
@@ -140,6 +136,8 @@ public class CommonServiceImpl implements ICommonService {
                return  commonEntityList;
            }
            Map<String, Object> conditions = JSONObject.parseObject(JSON.toJSONString(commonEntity.getQueryMap()));
+
+           //正常的查询
            String queryCriteriaValue =
                         conditions.containsKey("queryCriteriaValue") == true
                                 ? conditions.get("queryCriteriaValue").toString() : "";
@@ -148,14 +146,9 @@ public class CommonServiceImpl implements ICommonService {
            return commonMapper.queryTableList(sqlString);
     }
 
-    //以前的逻辑传递sqlKey、查询到一条TableSql数据
-    //commonEntity没改动的情况下只有sqlKey
-    //queryCriteriaValue,这参数是前端传过来的的,存的是标准超级查询的数据
-    //直接是后台的tableSql进行的拼接
-    //把前端传过来的值给替换掉#{val}
+
     @Override
     public List<CommonEntity> queryTableList(CommonEntity commonEntity, TableSql tableSql) {
-
         // 根据sqlkey查询得到当前表单对应的sql
         Map<String, Object> conditions = JSONObject.parseObject(JSON.toJSONString(commonEntity.getQueryMap()));
         // 得到查询条件的值

+ 2 - 5
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/DragFormServiceImpl.java

@@ -87,15 +87,12 @@ public class DragFormServiceImpl implements IDragFormService {
         createForm(fileName, dragForm.getDfHtmlTemplate());
         // 使用租户名 加uuid 定义表单文件名称
         dragForm.setDfFliePath(fileName);
-        dragForm.setCreateTime(DateUtils.getNowDate());
-        dragForm.setCreateById(SecurityUtils.getUserId());
         //校验dtId是否唯一
         if (dragTableFormMapper.selectDtIdCount(dragForm.getDtId()) > 0) {
             return AjaxResult.warn("该表格已绑定表单!");
         }
         //新增表单
         dragFormMapper.insertDragForm(dragForm);
-
         //新增关联表
         DragTableForm dragTableForm = new DragTableForm();
         dragTableForm.setDfId(dragForm.getfId());
@@ -114,8 +111,8 @@ public class DragFormServiceImpl implements IDragFormService {
     public int updateDragForm(DragForm dragForm) {
         // 修改的时候删除表单源文件后重新创建
         delFileForm(dragForm.getfId());
-        dragForm.setUpdateTime(DateUtils.getNowDate());
-        dragForm.setUpdateById(SecurityUtils.getUserId());
+        //dragForm.setUpdateTime(DateUtils.getNowDate());
+        //dragForm.setUpdateById(SecurityUtils.getUserId());
         return dragFormMapper.updateDragForm(dragForm);
     }
 

+ 89 - 11
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/DragTableGroupServiceImpl.java

@@ -3,8 +3,11 @@ package com.ruoyi.system.service.impl;
 import com.alibaba.fastjson2.JSON;
 import com.alibaba.fastjson2.JSONArray;
 import com.alibaba.fastjson2.JSONObject;
+import com.ruoyi.common.utils.SecurityUtils;
+import com.ruoyi.system.entity.DragTable;
 import com.ruoyi.system.entity.DragTableCondition;
 import com.ruoyi.system.entity.DragTableGroup;
+import com.ruoyi.system.entity.TableSql;
 import com.ruoyi.system.entity.vo.DragTableGroupVo;
 import com.ruoyi.system.entity.vo.DragTableVo;
 import com.ruoyi.system.mapper.DragTableConditionMapper;
@@ -69,6 +72,7 @@ public class DragTableGroupServiceImpl implements IDragTableGroupService {
         return dragTableGroupMapper.selectDragTableGroupList(dragTableGroup);
     }
 
+
     /**
      * 新增拖拽格组
      *
@@ -86,6 +90,19 @@ public class DragTableGroupServiceImpl implements IDragTableGroupService {
         dragTableService.addDragTable(dragTableGroupVo);
         return dragTableGroupMapper.insertDragTableGroup(dragTableGroup);
     }
+
+    // SQL 条件的开始
+    public static final String SQL_START = "CONCAT(";
+
+    // SQL 超级查询常量
+    public static final String SQL_MIDDLE = "IFNULL( #{VAL}, '' )";
+
+    // sqlserver || DM 数据类型的超级查询常量
+    public static final String SQL_DM_SERVER_MIDDLE = "COALESCE( #{VAL}, '' )";
+
+    // SQL 条件的结束
+    public static final String SQL_END = "LIKE '%#{val}%'";
+
     /**
      * 修改拖拽格组
      *
@@ -93,8 +110,8 @@ public class DragTableGroupServiceImpl implements IDragTableGroupService {
      * @return 结果
      */
     @Override
-    public int updateDragTableGroup(DragTableGroupVo dragTableGroupVo)
-    {
+    @Transactional(rollbackFor = Exception.class)
+    public int updateDragTableGroup(DragTableGroupVo dragTableGroupVo) {
         //根据id查询表格组信息
         DragTableGroup dragTableGroupOne = dragTableGroupMapper.selectDragTableGroupById(dragTableGroupVo.getId());
         //得到group_table_info
@@ -104,22 +121,81 @@ public class DragTableGroupServiceImpl implements IDragTableGroupService {
         //收集tableKey
         List<String> tableKeys = jsonArray.stream().map(item -> JSONObject.parseObject(item.toString()).get("tableKey").toString()
         ).collect(Collectors.toList());
-        //删除表格数据
-        dragTableMapper.deleteDragTableByTableKeys(tableKeys);
         //删除条件数据
         List<Long> dragTableIds = dragTableMapper.selectDragTableTableKeys(tableKeys)
                 .stream().map(item -> item.gettId()).collect(Collectors.toList());
         dragTableConditionMapper.deleteDragTableConditionBytIds(dragTableIds);
         //删除sql数据
-        Long[] dragTableIds1 = dragTableIds.toArray(new Long[0]);
-        tableSqlMapper.deleteTableSqlByTIds(dragTableIds1);
+        //Long[] dragTableIds1 = dragTableIds.toArray(new Long[0]);
+        //tableSqlMapper.deleteTableSqlByTIds(dragTableIds1);
+        //删除表格数据
+        //dragTableMapper.deleteDragTableByTableKeys(tableKeys);
+
+        //优化逻辑 1、表格组信息 2、表格信息、条件信息、sql信息
+        List<DragTableVo> dragTables = dragTableGroupVo.getDragTables();
+        if (dragTables.size()>0) {
+            dragTables.stream().forEach(dragTableVo->{
+                String SQL="";
+                //add drag_table
+                DragTable dragTable = new DragTable();
+                BeanUtils.copyProperties(dragTableVo, dragTable);
+                dragTable.setDtColumnName(JSON.toJSONString(dragTableVo.getDtColumnName()));
+                dragTable.setPrimaryKey(dragTableVo.getPrimaryKey());
+                dragTable.setMenuId(dragTableVo.getMenuId());
+                dragTable.setDtType("1");
+                //add table_sql
+                TableSql tableSql = new TableSql();
+                tableSql.settId(dragTable.gettId());
+                tableSql.setTableSql(dragTableVo.getTableSql());
+                dragTableMapper.updateDragTable(dragTable);
+                //拼接sql查询条件
+                switch (SecurityUtils.getDatabaseType().toUpperCase()) {
+                    case "MYSQL":
+                        for (int i = 0; dragTableVo.getSearchFieldList().size() > i; i++) {
+                            SQL += " AND "+dragTableVo.getSearchFieldList().get(i)+"="+dragTableVo.getConditionDefaultValueMap().get(dragTableVo.getSearchFieldList().get(i));
+                        }
+                        break;
+                    case "DM":
+                    case "SQLSERVER":
+                        SQL += SQL_START;
+                        for (int i = 0; dragTableVo.getSearchFieldList().size() > i; i++) {
+                            SQL += SQL_DM_SERVER_MIDDLE.replace("#{VAL}", dragTableVo.getSearchFieldList().get(i));
+                            SQL += dragTableVo.getSearchFieldList().size() - 1 == i ? ",'')" : ",\n";
+                        }
+                        break;
+                    case "ORACLE":
+                        //SQL_START = "";
+                        for (int i = 0; dragTableVo.getSearchFieldList().size() > i; i++) {
+                            SQL += dragTableVo.getSearchFieldList().get(i);
+                            SQL += (dragTableVo.getSearchFieldList().size() - 1 == i ? " " : "||");
+                        }
+                        break;
+                }
+                String where = dragTableVo.getDtTableName() + ".del_flag = '0'";
+                tableSql.setTableCondition(where + SQL);
+                tableSql.setTableAlias(dragTableVo.getDtTableName());
+                tableSql.setTableExportField(JSON.toJSONString(dragTableVo.getTableExportField()));
+                tableSql.setSqlKey(dragTableVo.getSqlKey());
+                tableSql.setOrderByColumn(dragTableVo.getOrderByColumn());
+                tableSql.setSortOrder(dragTableVo.getSortOrder());
+                tableSqlMapper.updateTableSql(tableSql);
+                //add drag_table_condition
+                if (dragTableVo.getSearchFieldList().size() > 0) {
+                    List<DragTableCondition> dragTableConditionList = new ArrayList<>();
+                    dragTableVo.getSearchFieldList().forEach(item -> {
+                        dragTableConditionList.add(new DragTableCondition(dragTable.gettId(), item,dragTableVo.getConditionDefaultValueMap().get(item).toString()));
+                    });
+                    dragTableConditionMapper.insertDragTableConditionByList(dragTableConditionList);
+                }
+            });
+        }
         //修改表格组列表信息
-        DragTableGroup dragTableGroup=new DragTableGroup();
-        BeanUtils.copyProperties(dragTableGroupVo,dragTableGroup );
-        dragTableGroupMapper.updateDragTableGroup(dragTableGroup);
+        DragTableGroup dragTableGroup = new DragTableGroup();
+        BeanUtils.copyProperties(dragTableGroupVo, dragTableGroup);
+        int i = dragTableGroupMapper.updateDragTableGroup(dragTableGroup);
         //从新插入数据
-        int insertRow = this.insertDragTableGroup(dragTableGroupVo);
-        return insertRow;
+        //dragTableService.addDragTable(dragTableGroupVo);
+        return i;
     }
 
     /**
@@ -233,4 +309,6 @@ public class DragTableGroupServiceImpl implements IDragTableGroupService {
         }
         return true;
     }
+
+
 }

+ 5 - 25
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/DragTableServiceImpl.java

@@ -93,8 +93,8 @@ public class DragTableServiceImpl implements IDragTableService {
      */
     @Override
     public int insertDragTable(DragTable dragTable) {
-        dragTable.setCreateTime(DateUtils.getNowDate());
-        dragTable.setCreateById(SecurityUtils.getUserId());
+        //dragTable.setCreateTime(DateUtils.getNowDate());
+        //dragTable.setCreateById(SecurityUtils.getUserId());
         return dragTableMapper.insertDragTable(dragTable);
     }
 
@@ -217,14 +217,10 @@ public class DragTableServiceImpl implements IDragTableService {
         dragTable.setDtColumnName(JSON.toJSONString(dragTableVo.getDtColumnName()));
         dragTable.setPrimaryKey(dragTableVo.getPrimaryKey());
         dragTable.setMenuId(dragTableVo.getMenuId());
-        dragTable.setCreateTime(DateUtils.getNowDate());
-        dragTable.setCreateById(SecurityUtils.getUserId());
-        dragTable.setDtType("1");//表格类型
+        dragTable.setDtType("0");//表格类型
         //add table_sql
         TableSql tableSql = new TableSql();
         tableSql.setTableSql(dragTableVo.getTableSql());
-        tableSql.setCreateTime(DateUtils.getNowDate());
-        tableSql.setCreateById(SecurityUtils.getUserId());
         dragTableMapper.insertDragTable(dragTable);
         // 拼接sql查询条件
         switch (SecurityUtils.getDatabaseType().toUpperCase()) {
@@ -263,7 +259,6 @@ public class DragTableServiceImpl implements IDragTableService {
         if (dragTableVo.getSearchFieldList().size() > 0) {
             List<DragTableCondition> dragTableConditionList = new ArrayList<>();
             dragTableVo.getSearchFieldList().forEach(item -> {
-                //dragTableConditionList.add(new DragTableCondition(dragTable.gettId(), item,dragTableVo.getConditionDefaultValueMap().get(item).toString()));
                 dragTableConditionList.add(new DragTableCondition(dragTable.gettId(),item));
             });
             dragTableConditionList.forEach(e->{
@@ -276,7 +271,6 @@ public class DragTableServiceImpl implements IDragTableService {
     @Transactional
     @Override
     public void addDragTable(DragTableGroupVo dragTableGroupVo) {
-
         for (DragTableVo dragTableVo : dragTableGroupVo.getDragTables()) {
             String SQL="";
             //add drag_table
@@ -285,19 +279,16 @@ public class DragTableServiceImpl implements IDragTableService {
             dragTable.setDtColumnName(JSON.toJSONString(dragTableVo.getDtColumnName()));
             dragTable.setPrimaryKey(dragTableVo.getPrimaryKey());
             dragTable.setMenuId(dragTableVo.getMenuId());
-            dragTable.setCreateTime(DateUtils.getNowDate());
-            dragTable.setCreateById(SecurityUtils.getUserId());
+            dragTable.setDtType("1");
             //add table_sql
             TableSql tableSql = new TableSql();
             tableSql.setTableSql(dragTableVo.getTableSql());
-            tableSql.setCreateTime(DateUtils.getNowDate());
-            tableSql.setCreateById(SecurityUtils.getUserId());
             dragTableMapper.insertDragTable(dragTable);
             //拼接sql查询条件
             switch (SecurityUtils.getDatabaseType().toUpperCase()) {
                 case "MYSQL":
                     for (int i = 0; dragTableVo.getSearchFieldList().size() > i; i++) {
-                        SQL += " AND "+dragTableVo.getSearchFieldList().get(i)+"="+dragTableVo.getConditionDefaultValueMap().get(dragTableVo.getSearchFieldList().get(i));
+                            SQL += " AND "+dragTableVo.getSearchFieldList().get(i)+"="+dragTableVo.getConditionDefaultValueMap().get(dragTableVo.getSearchFieldList().get(i));
                     }
                     break;
                 case "DM":
@@ -330,10 +321,6 @@ public class DragTableServiceImpl implements IDragTableService {
                     dragTableVo.getSearchFieldList().forEach(item -> {
                         dragTableConditionList.add(new DragTableCondition(dragTable.gettId(), item,dragTableVo.getConditionDefaultValueMap().get(item).toString()));
                     });
-                    //赋值创建人
-                    dragTableConditionList.forEach(e->{
-                        e.setCreateById(SecurityUtils.getUserId());
-                    });
                     dragTableConditionMapper.insertDragTableConditionByList(dragTableConditionList);
             }
         }
@@ -367,14 +354,10 @@ public class DragTableServiceImpl implements IDragTableService {
         DragTable dragTable = new DragTable();
         BeanUtils.copyProperties(dragTableVo, dragTable);
         dragTable.setDtColumnName(JSON.toJSONString(dragTableVo.getDtColumnName()));
-        dragTable.setUpdateById(SecurityUtils.getUserId());
         dragTableMapper.updateDragTable(dragTable);
-
         //update table_sql
         TableSql tableSql = new TableSql();
         tableSql.setTableSql(dragTableVo.getTableSql());
-        //tableSql.setUpdateBy(dragTableVo.getTableSql());
-        tableSql.setUpdateById(SecurityUtils.getUserId());
         // 拼接sql查询条件
         switch (SecurityUtils.getDatabaseType().toUpperCase()) {
             case "MYSQL":
@@ -417,9 +400,6 @@ public class DragTableServiceImpl implements IDragTableService {
             dragTableVo.getSearchFieldList().forEach(item -> {
                 dragTableConditionList.add(new DragTableCondition(dragTable.gettId(),item));
             });
-            dragTableConditionList.forEach(e->{
-                e.setUpdateById(SecurityUtils.getUserId());
-            });
             dragTableConditionMapper.insertDragTableConditionByList(dragTableConditionList);
         }
     }

+ 13 - 11
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/DragTableStatisticServiceImpl.java

@@ -141,17 +141,19 @@ public class DragTableStatisticServiceImpl implements IDragTableStatisticService
         LinkedList<DragTableStatistic> editList = new LinkedList<>();
         List<Long> numList = new ArrayList<>();
         vo.getDragTableStatisticList().stream().forEach(s -> {
-            if(s.getId() == null){
-                s.setCreateBy(SecurityUtils.getUserId().toString());
-                s.setCreateTime(DateUtils.getNowDate());
-                addList.add(s);
-            }else {
-                s.setUpdateBy(SecurityUtils.getUserId().toString());
-                s.setUpdateTime(DateUtils.getNowDate());
-                editList.add(s);
-            }
-            numList.add(s.getId());
-        });
+               if(s.getId() == null){
+                   s.setCreateById(SecurityUtils.getUserId());
+                   s.setCreateBy(SecurityUtils.getUsername());
+                   s.setCreateTime(DateUtils.getNowDate());
+                   addList.add(s);
+               }else {
+                   s.setUpdateById(SecurityUtils.getUserId());
+                   s.setUpdateBy(SecurityUtils.getUsername());
+                   s.setUpdateTime(DateUtils.getNowDate());
+                   editList.add(s);
+               }
+               numList.add(s.getId());
+           });
         //select Statistic ids
         List<Long> allIds = dragTableStatisticMapper.selectIdsByTableKey(vo.getTableKey());
         allIds.removeAll(numList);

+ 1 - 6
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/DragTableStyleServiceImpl.java

@@ -57,12 +57,7 @@ public class DragTableStyleServiceImpl implements IDragTableStyleService
     @Override
     public int batchInsertDragTableStyle(DragTableVo vo)
     {
-        vo.getDragTableStyleList().forEach(v -> {
-            v.setTableKey(vo.getTableKey());
-            v.setCreateById(SecurityUtils.getUserId());
-            v.setCreateBy(SecurityUtils.getUsername());
-            v.setCreateTime(DateUtils.getNowDate());
-        });
+        vo.getDragTableStyleList().forEach(v -> {v.setTableKey(vo.getTableKey());});
         return dragTableStyleMapper.batchInsertDragTableStyle(vo.getDragTableStyleList());
     }
 

+ 1 - 0
ruoyi-system/src/main/resources/mapper/common/TableSqlMapper.xml

@@ -144,6 +144,7 @@
             <if test="tableAlias != null">table_alias = #{tableAlias},</if>
             <if test="tableExportField != null">table_export_field = #{tableExportField},</if>
             <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="createById != null">create_by_id = #{createById},</if>
             <if test="createTime != null">create_time = #{createTime},</if>
             <if test="updateById != null">update_by_id = #{updateById},</if>
             <if test="updateBy != null">update_by = #{updateBy},</if>

+ 0 - 6
ruoyi-system/src/main/resources/mapper/dragmapper/DragFormMapper.xml

@@ -98,8 +98,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="createTime != null">create_time,</if>
             <if test="createById != null">create_by_id,</if>
             <if test="createBy != null">create_by,</if>
-            <if test="updateBy != null">update_by,</if>
-            <if test="updateTime != null">update_time,</if>
             <if test="spare != null">spare,</if>
             <if test="spare1 != null">spare1,</if>
          </trim>
@@ -119,8 +117,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="createTime != null">#{createTime},</if>
             <if test="createById != null">#{createById},</if>
             <if test="createBy != null">#{createBy},</if>
-            <if test="updateBy != null">#{updateBy},</if>
-            <if test="updateTime != null">#{updateTime},</if>
             <if test="spare != null">#{spare},</if>
             <if test="spare1 != null">#{spare1},</if>
          </trim>
@@ -141,8 +137,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="dfFliePath != null">df_flie_path = #{dfFliePath},</if>
             <if test="dfNotes != null">df_notes = #{dfNotes},</if>
             <if test="delFlag != null">del_flag = #{delFlag},</if>
-            <if test="createTime != null">create_time = #{createTime},</if>
-            <if test="createBy != null">create_by = #{createBy},</if>
             <if test="updateById != null">update_by_id = #{updateById},</if>
             <if test="updateBy != null">update_by = #{updateBy},</if>
             <if test="updateTime != null">update_time = #{updateTime},</if>

+ 2 - 2
ruoyi-system/src/main/resources/mapper/dragmapper/DragTableConditionMapper.xml

@@ -64,10 +64,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
     <insert id="insertDragTableConditionByList"  parameterType="java.util.List">
         insert into drag_table_condition
-        (t_id,condition_field,create_by_id,condition_default_value)
+        (t_id,condition_field,create_by,create_by_id,create_time,condition_default_value)
         values
         <foreach collection="list" item="item" index="index" separator=",">
-            (#{item.tId},#{item.conditionField},#{item.createById},#{item.conditionDefaultValue})
+            (#{item.tId},#{item.conditionField},#{item.createBy},#{item.createById},#{item.createTime},#{item.conditionDefaultValue})
         </foreach>
     </insert>
 

+ 2 - 0
ruoyi-system/src/main/resources/mapper/dragmapper/DragTableGroupMapper.xml

@@ -60,6 +60,7 @@
             <if test="id != null">id,</if>
             <if test="groupName != null">group_name,</if>
             <if test="groupKey!=null">group_key,</if>
+            <if test="groupType!=null">group_type,</if>
             <if test="groupDescription != null">group_description,</if>
             <if test="groupTableInfo != null">group_table_info,</if>
             <if test="createById != null">create_by_id,</if>
@@ -73,6 +74,7 @@
             <if test="id != null">#{id},</if>
             <if test="groupName != null">#{groupName},</if>
             <if test="groupKey != null">#{groupKey},</if>
+            <if test="groupType != null">#{groupType},</if>
             <if test="groupDescription != null">#{groupDescription},</if>
             <if test="groupTableInfo != null">#{groupTableInfo},</if>
             <if test="createById != null">#{createById},</if>

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

@@ -66,6 +66,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             </if>
             <if test="spare != null  and spare != ''">and spare = #{spare}</if>
             <if test="spare1 != null  and spare1 != ''">and spare1 = #{spare1}</if>
+            <if test="dtType !=null and  dtType!=''">and dt_type=#{dtType}</if>
         </where>
         ORDER BY t_id DESC
     </select>
@@ -126,6 +127,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="dtNickname != null">dt_nickname = #{dtNickname},</if>
             <if test="tableKey != null">table_key = #{tableKey},</if>
             <if test="sqlKey != null">sql_key = #{sqlKey},</if>
+            <if test="dtType != null">dt_type = #{dtType},</if>
             <if test="dtTableName != null">dt_table_name = #{dtTableName},</if>
             <if test="dtNotes != null">dt_notes = #{dtNotes},</if>
             <if test="dtColumnName != null">dt_column_name = #{dtColumnName},</if>
@@ -137,6 +139,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="createTime != null">create_time = #{createTime},</if>
             <if test="createById != null">create_by_id = #{createById},</if>
             <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="updateById != null">update_by_id = #{updateById},</if>
             <if test="updateTime != null">update_time = #{updateTime},</if>
             <if test="isSelection != null">is_selection = #{isSelection},</if>
             <if test="echoData != null">echo_data = #{echoData},</if>

+ 2 - 2
ruoyi-system/src/main/resources/mapper/dragmapper/DragTableStatisticMapper.xml

@@ -42,11 +42,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         
     <insert id="batchInsertDragTableStatistic" useGeneratedKeys="true" keyProperty="id">
         insert into drag_table_statistic
-            (statistic_title,table_key,statistic_description,statistic_type,statistic_field,statistic_object,sql_key,create_by,create_time,del_flag)
+            (statistic_title,table_key,statistic_description,statistic_type,statistic_field,statistic_object,sql_key,create_by_id,create_by,create_time,del_flag)
             values
         <foreach collection="list" item="item" index="index" separator=",">
             (#{item.statisticTitle},#{item.tableKey},#{item.statisticDescription},#{item.statisticType},#{item.statisticField},#{item.statisticObject},
-             #{item.sqlKey},#{item.createBy},#{item.createTime},'0')
+             #{item.sqlKey},#{item.createById},#{item.createBy},#{item.createTime},'0')
         </foreach>
     </insert>