|
|
@@ -15,14 +15,12 @@ import java.util.Map;
|
|
|
|
|
|
@Mapper
|
|
|
@Repository
|
|
|
-@CacheNamespace(flushInterval = 300000L)
|
|
|
public interface ChartsConfigMapper {
|
|
|
|
|
|
@Insert("insert into bi_charts(id,CHART_NAME,CHART_TYPE,BD_DATA_ID,CHART_CONFIG,GROUP_BY,ACCESS_AUTHORITY,UPDATE_AUTHORITY,BC_CHARTS_GROUP,CHART_DESCRIBES,BC_CHART_STYLE," +
|
|
|
- "create_by,create_date, bc_charts_option, create_id, BC_FETCHCONFIG, from_id, from_data_id) " +
|
|
|
+ "create_by,create_date, bc_charts_option, create_id, BC_FETCHCONFIG, from_id, from_data_id,thumbnail) " +
|
|
|
"VALUES (#{chartId,jdbcType=INTEGER},#{chartName,jdbcType=VARCHAR},#{chartType,jdbcType=VARCHAR}, #{dataId,jdbcType=INTEGER}, #{chartConfig,jdbcType=VARCHAR}, #{groupBy,jdbcType=VARCHAR}, #{accessAuthority,jdbcType=VARCHAR}, #{updateAuthority,jdbcType=VARCHAR}, #{chartsGroup,jdbcType=INTEGER}," +
|
|
|
- "#{describes,jdbcType=VARCHAR},#{style,jdbcType=VARCHAR}, #{createBy,jdbcType=VARCHAR},to_date(to_char(sysdate,'yyyy-mm-dd hh24:mi:ss'),'YYYY-MM-DD hh24:mi:ss'), #{chartOption,jdbcType=VARCHAR}, #{createId,jdbcType=INTEGER}, #{fetchConfig,jdbcType=VARCHAR},#{from_id,jdbcType=INTEGER},#{from_data_id,jdbcType=INTEGER})" )
|
|
|
-// @Options(useGeneratedKeys=false, keyProperty = "chartId",keyColumn = "id")
|
|
|
+ "#{describes,jdbcType=VARCHAR},#{style,jdbcType=VARCHAR}, #{createBy,jdbcType=VARCHAR},to_date(to_char(sysdate,'yyyy-mm-dd hh24:mi:ss'),'YYYY-MM-DD hh24:mi:ss'), #{chartOption,jdbcType=VARCHAR}, #{createId,jdbcType=INTEGER}, #{fetchConfig,jdbcType=VARCHAR},#{from_id,jdbcType=INTEGER},#{from_data_id,jdbcType=INTEGER},#{thumbnail,jdbcType=CLOB})" )
|
|
|
@SelectKey(before=true,keyProperty="chartId",resultType=Integer.class,statement="SELECT bi_charts_sequence.nextval from dual",keyColumn = "id")
|
|
|
void insertCharts(ChartConfig chartConfig);
|
|
|
|
|
|
@@ -49,7 +47,7 @@ public interface ChartsConfigMapper {
|
|
|
查看图表列表
|
|
|
*/
|
|
|
@Select("select '1' as authority,case when bc.BD_DATA_ID not in(select id from bi_data_connectors) then '1' else '0' end dbStatus, bc.id as chartId, bc.chart_name as chartName, bc.chart_type as chartType, bc.create_by as createBy, bc.create_date as createDate"
|
|
|
- + ",bc.bc_filters as filters, bc.CHART_DESCRIBES as describes, bc.bc_charts_group as chartsGroup, bc.bc_charts_option as chartOption ,bc.bd_data_id as dataId,bd.data_name as dataName, bc.create_id as createId, bc.demo, bds.BASES_NAME as dataConnectionName, bds.id as dataConnectionId "
|
|
|
+ + ",bc.bc_filters as filters, bc.CHART_DESCRIBES as describes, bc.bc_charts_group as chartsGroup, bc.bc_charts_option as chartOption ,bc.bd_data_id as dataId,bd.data_name as dataName, bc.create_id as createId, bc.demo, bds.BASES_NAME as dataConnectionName, bds.id as dataConnectionId, bc.thumbnail as thumbnail "
|
|
|
+ "from bi_charts bc left join bi_data_connectors bd on bc.bd_data_id=bd.id left join BI_DATABASES bds on bds.id = BD.DB_CONFIG")
|
|
|
List<ChartConfigList> getListCharts();
|
|
|
|
|
|
@@ -97,7 +95,7 @@ public interface ChartsConfigMapper {
|
|
|
" ) and bs2.BS_DB_ID = bc.BD_DATA_ID" +
|
|
|
" ) = 0 then '0'" +
|
|
|
" else null end authority, case when bc.BD_DATA_ID not in(select id from bi_data_connectors) then '1' else '0' end dbStatus, bc.id as chartId, bc.chart_name as chartName, bc.chart_type as chartType, bc.create_by as createBy, bc.create_date as createDate" +
|
|
|
- " ,bc.bc_filters as filters, bc.CHART_DESCRIBES as describes, bc.bc_charts_group as chartsGroup, bc.bc_charts_option as chartOption ,bc.bd_data_id as dataId,bd.data_name as dataName, bc.create_id as createId, bc.demo, bds.BASES_NAME as dataConnectionName, bds.id as dataConnectionId " +
|
|
|
+ " ,bc.bc_filters as filters, bc.CHART_DESCRIBES as describes, bc.bc_charts_group as chartsGroup, bc.bc_charts_option as chartOption ,bc.bd_data_id as dataId,bd.data_name as dataName, bc.create_id as createId, bc.demo, bds.BASES_NAME as dataConnectionName, bds.id as dataConnectionId,bc.thumbnail as thumbnail " +
|
|
|
" from bi_charts bc left join bi_data_connectors bd on bc.bd_data_id=bd.id left join BI_DATABASES bds on bds.id = BD.DB_CONFIG where (bc.create_id = #{id} or bc.id in (" +
|
|
|
" select bc_chart_id from bi_chart_strategys where BC_ID in (" +
|
|
|
" select BO_ST_ID from BI_CHART_OBJECT where (BO_TYPE='1' and BO_OB_ID = #{id})" +
|
|
|
@@ -152,6 +150,7 @@ public interface ChartsConfigMapper {
|
|
|
"<if test=\"chartOption !=null\">, bc_charts_option = #{chartOption}</if>"+
|
|
|
"<if test=\"fetchConfig !=null\">, BC_FETCHCONFIG = #{fetchConfig}</if>"+
|
|
|
"<if test=\"updateDate != null\"> , UPDATE_DATE = to_date(#{updateDate},'YYYY-MM-DD hh24:mi:ss') </if>" +
|
|
|
+ "<if test=\"thumbnail != null\"> , thumbnail = #{thumbnail} </if>" +
|
|
|
"where id = #{chartId}" +
|
|
|
"</script>")
|
|
|
void updateChartConfig(ChartConfig chartConfig);
|