|
@@ -1,13 +1,23 @@
|
|
|
package com.ruoyi.system.service.impl;
|
|
|
|
|
|
+import java.util.HashMap;
|
|
|
import java.util.List;
|
|
|
+import java.util.Map;
|
|
|
+
|
|
|
import com.ruoyi.common.utils.DateUtils;
|
|
|
+import com.ruoyi.system.entity.CommonEntity;
|
|
|
import com.ruoyi.system.entity.DragTable;
|
|
|
+import com.ruoyi.system.entity.DragTableCondition;
|
|
|
+import com.ruoyi.system.entity.TableSql;
|
|
|
+import com.ruoyi.system.mapper.DragTableConditionMapper;
|
|
|
+import com.ruoyi.system.mapper.TableSqlMapper;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import com.ruoyi.system.mapper.DragTableMapper;
|
|
|
import com.ruoyi.system.service.IDragTableService;
|
|
|
|
|
|
+import javax.annotation.Resource;
|
|
|
+
|
|
|
/**
|
|
|
* 动态格Service业务层处理
|
|
|
*
|
|
@@ -20,6 +30,12 @@ public class DragTableServiceImpl implements IDragTableService
|
|
|
@Autowired
|
|
|
private DragTableMapper dragTableMapper;
|
|
|
|
|
|
+ @Resource
|
|
|
+ private DragTableConditionMapper dragTableConditionMapper;
|
|
|
+
|
|
|
+ @Resource
|
|
|
+ private TableSqlMapper tableSqlMapper;
|
|
|
+
|
|
|
/**
|
|
|
* 查询动态格
|
|
|
*
|
|
@@ -93,4 +109,16 @@ public class DragTableServiceImpl implements IDragTableService
|
|
|
{
|
|
|
return dragTableMapper.deleteDragTableByTId(tId);
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public CommonEntity dragTableInfo(String sqlKey) {
|
|
|
+ DragTable dragTable = dragTableMapper.selectDragTableBySqlKey(sqlKey);
|
|
|
+ Map<String,Object> resultMap = new HashMap<>();
|
|
|
+ resultMap.put("template",dragTable);
|
|
|
+ resultMap.put("where",dragTableConditionMapper.selectDragTableConditionByTid(dragTable.gettId()));
|
|
|
+ resultMap.put("querySql",tableSqlMapper.selectTableSqlByTSqlKey(sqlKey));
|
|
|
+ CommonEntity commonEntity = new CommonEntity();
|
|
|
+ commonEntity.setResultMap(resultMap);
|
|
|
+ return commonEntity;
|
|
|
+ }
|
|
|
}
|