|
|
@@ -1,6 +1,5 @@
|
|
|
package com.dao;
|
|
|
|
|
|
-import com.model.po.ColumnData;
|
|
|
import com.model.po.DataConnector;
|
|
|
import com.model.po.DataConnectorList;
|
|
|
import com.model.po.Databases;
|
|
|
@@ -13,29 +12,29 @@ import java.util.List;
|
|
|
@Repository
|
|
|
public interface DataConnectorMapper {
|
|
|
|
|
|
- @Select("select d.column_name as columnName, d.DATA_TYPE as columnType, b.comments as remarks from " +
|
|
|
- "(select column_name,DATA_TYPE from user_tab_cols where Table_Name = #{tableName}) d," +
|
|
|
- "(select * from user_col_comments where Table_Name = #{tableName}) b" +
|
|
|
- " where d.column_name = b.column_name order by columnName")
|
|
|
- List<ColumnData> getColumn(@Param("tableName") String tableName);
|
|
|
-
|
|
|
- @Select("<script>" +
|
|
|
- "select * from bi_data_connectors where" + "1=1" +
|
|
|
- "<if test=\"id != null\"> and id = #{id} </if>" +
|
|
|
- "<if test=\"dataName != null\"> and data_name = #{dataName} </if>" +
|
|
|
- "<if test=\"dataTag != null\"> and data_tag = #{dataTag} </if>" +
|
|
|
- "<if test=\"configuration != null\"> and configuration = #{configuration} </if>" +
|
|
|
- "<if test=\"columnConfig != null\"> and columns_config = #{columnConfig} </if>" +
|
|
|
- "<if test=\"usedNumber != null\"> and used_number = #{usedNumber} </if>" +
|
|
|
- "<if test=\"createBy != null\">and create_by = #{createBy}</if>" +
|
|
|
- "</script>")
|
|
|
- List<DataConnector> getAllData(DataConnector dataConnector);
|
|
|
+// @Select("select d.column_name as columnName, d.DATA_TYPE as columnType, b.comments as remarks from " +
|
|
|
+// "(select column_name,DATA_TYPE from user_tab_cols where Table_Name = #{tableName}) d," +
|
|
|
+// "(select * from user_col_comments where Table_Name = #{tableName}) b" +
|
|
|
+// " where d.column_name = b.column_name order by columnName")
|
|
|
+// List<ColumnData> getColumn(@Param("tableName") String tableName);
|
|
|
+
|
|
|
+// @Select("<script>" +
|
|
|
+// "select * from bi_data_connectors where" + "1=1" +
|
|
|
+// "<if test=\"id != null\"> and id = #{id} </if>" +
|
|
|
+// "<if test=\"dataName != null\"> and data_name = #{dataName} </if>" +
|
|
|
+// "<if test=\"dataTag != null\"> and data_tag = #{dataTag} </if>" +
|
|
|
+// "<if test=\"configuration != null\"> and configuration = #{configuration} </if>" +
|
|
|
+// "<if test=\"columnConfig != null\"> and columns_config = #{columnConfig} </if>" +
|
|
|
+// "<if test=\"usedNumber != null\"> and used_number = #{usedNumber} </if>" +
|
|
|
+// "<if test=\"createBy != null\">and create_by = #{createBy}</if>" +
|
|
|
+// "</script>")
|
|
|
+// List<DataConnector> getAllData(DataConnector dataConnector);
|
|
|
|
|
|
/*
|
|
|
查询单个数据源
|
|
|
*/
|
|
|
@Select("select ID as dataId, DATA_NAME as dataName, DATA_NOTE as note, DATA_TAG as dataTag, COLUMNS_CONFIG as columnConfig, LOAD_OBJECT as loadObject," +
|
|
|
- "CREATE_BY as createBy, USED_NUMBER as userNumber, CREATE_DATE as createDate,DB_CONFIG as dbConfig, " +
|
|
|
+ "CREATE_BY as createBy, USED_NUMBER as userNumber, CREATE_DATE as createDate,DB_CONFIG as dbConfig, BD_group as ConnectorGroup," +
|
|
|
"CON_TYPE as type from bi_data_connectors where id = #{id}")
|
|
|
DataConnector getOneData(int id);
|
|
|
|
|
|
@@ -43,14 +42,14 @@ public interface DataConnectorMapper {
|
|
|
查询数据源列表
|
|
|
*/
|
|
|
@Select("select id as dataId, con_type as type, data_name as dataName, data_tag as dataTag, data_note as note, create_by as createBy, create_date as createDate," +
|
|
|
- " used_number as usedNumber, db_config as dbConfig from bi_data_connectors")
|
|
|
+ " used_number as usedNumber, db_config as dbConfig ,BD_group as ConnectorGroup from bi_data_connectors")
|
|
|
List<DataConnectorList> getDataConnectorList();
|
|
|
|
|
|
/*
|
|
|
插入数据源配置
|
|
|
*/
|
|
|
- @Insert("INSERT INTO bi_data_connectors(id,data_name,data_note,data_tag,con_type,LOAD_OBJECT,DB_CONFIG,columns_config,used_number,create_by,create_date, table_name) " +
|
|
|
- "VALUES (#{dataId},#{dataName}, #{note}, #{dataTag}, #{type}, #{loadObject}, #{dbConfig},#{columnConfig}, #{usedNumber},#{createBy}, to_date(#{createDate},'YYYY-MM-DD hh24:mi:ss'), #{tableName})")
|
|
|
+ @Insert("INSERT INTO bi_data_connectors(id,data_name,data_note,data_tag,con_type,LOAD_OBJECT,DB_CONFIG,columns_config,used_number,create_by,create_date, table_name, BD_GROUP) " +
|
|
|
+ "VALUES (#{dataId},#{dataName}, #{note}, #{dataTag}, #{type}, #{loadObject}, #{dbConfig},#{columnConfig}, #{usedNumber},#{createBy}, to_date(#{createDate},'YYYY-MM-DD hh24:mi:ss'), #{tableName}, #{ConnectorGroup})")
|
|
|
@SelectKey(before=true,keyProperty="dataId",resultType=int.class,statement="SELECT BI_DASHBOARDS_squence.nextval from dual",keyColumn = "id")
|
|
|
void insertDataConnector(DataConnector dataConnector);
|
|
|
|
|
|
@@ -69,6 +68,7 @@ public interface DataConnectorMapper {
|
|
|
"<if test=\"type != null\"> , con_TYPE = #{type} </if>" +
|
|
|
"<if test=\"note != null\"> , DATA_NOTE = #{note} </if>" +
|
|
|
"<if test=\"tableName != null\"> , table_name = #{tableName} </if>" +
|
|
|
+ "<if test=\"ConnectorGroup != null\"> , BD_GROUP = #{ConnectorGroup} </if>"+
|
|
|
"where id = #{dataId}" +
|
|
|
"</script>")
|
|
|
void updateData(DataConnector dataConnector);
|