|
|
@@ -18,9 +18,9 @@ public interface DashboardsMapper {
|
|
|
插入
|
|
|
*/
|
|
|
@Insert("insert into " +
|
|
|
- "bi_dashboards(id, bd_name,bd_note,CONFIGURATION,create_by, filters, create_date, BD_THUMBNAIL,relation_columns, create_id, bd_code)" +
|
|
|
+ "bi_dashboards(id, bd_name,bd_note,CONFIGURATION,create_by, filters, create_date, BD_THUMBNAIL,relation_columns, create_id, bd_code,bd_menuId)" +
|
|
|
"values(#{id,jdbcType=INTEGER}, #{bdName,jdbcType=VARCHAR},#{bdNote,jdbcType=VARCHAR},#{bdConfiguration,jdbcType=VARCHAR},#{createBy,jdbcType=VARCHAR}, #{filters,jdbcType=VARCHAR}, " +
|
|
|
- "to_date(to_char(sysdate,'yyyy-mm-dd hh24:mi:ss'),'YYYY-MM-DD hh24:mi:ss'), #{thumbnail,jdbcType=VARCHAR},#{relationColumns,jdbcType=VARCHAR}, #{createId,jdbcType=INTEGER}, #{bdCode,jdbcType=VARCHAR})")
|
|
|
+ "to_date(to_char(sysdate,'yyyy-mm-dd hh24:mi:ss'),'YYYY-MM-DD hh24:mi:ss'), #{thumbnail,jdbcType=VARCHAR},#{relationColumns,jdbcType=VARCHAR}, #{createId,jdbcType=INTEGER}, #{bdCode,jdbcType=VARCHAR}, #{menuId, jdbcType=INTEGER})")
|
|
|
@SelectKey(before=true,keyProperty="id",resultType=Integer.class,statement="SELECT BI_DASHBOARDS_SEQUENCE.nextval from dual",keyColumn = "id")
|
|
|
void setDashboards(Dashboards dashboards);
|
|
|
|
|
|
@@ -83,7 +83,7 @@ public interface DashboardsMapper {
|
|
|
/*
|
|
|
查询看板列表
|
|
|
*/
|
|
|
- @Select("select id, bd_note as bdNote, bd_name as bdName, CONFIGURATION as bdConfiguration, CREATE_BY as createBy, create_id as createId, CREATE_DATE as createDate, BD_THUMBNAIL as thumbnail, filters, demo, bd_code " +
|
|
|
+ @Select("select id, bd_note as bdNote, bd_name as bdName, CONFIGURATION as bdConfiguration, CREATE_BY as createBy, create_id as createId, CREATE_DATE as createDate, BD_THUMBNAIL as thumbnail, filters, demo, bd_code,bd_menuId " +
|
|
|
"from BI_DASHBOARDS where id in " +
|
|
|
" (select bo_da_id from bi_DASHBOARDS_object " +
|
|
|
"where (bo_type = '0' and bo_ob_id in (select br_user_group from bi_user_rel_groups where br_user_id= #{userId})) " +
|
|
|
@@ -94,7 +94,7 @@ public interface DashboardsMapper {
|
|
|
/*
|
|
|
查询看板
|
|
|
*/
|
|
|
- @Select("select id, bd_note as bdNote, bd_name as bdName, CONFIGURATION as bdConfiguration, CREATE_BY as createBy, create_id as createId, CREATE_DATE as createDate, BD_THUMBNAIL as thumbnail, relation_columns as relationColumns, filters, demo, bd_code " +
|
|
|
+ @Select("select id, bd_note as bdNote, bd_name as bdName, CONFIGURATION as bdConfiguration, CREATE_BY as createBy, create_id as createId, CREATE_DATE as createDate, BD_THUMBNAIL as thumbnail, relation_columns as relationColumns, filters, demo, bd_code,bd_menuId " +
|
|
|
" from BI_DASHBOARDS where (id in " +
|
|
|
" (select bo_da_id from bi_DASHBOARDS_object " +
|
|
|
" where (bo_type = '0' and bo_ob_id in (select br_user_group from bi_user_rel_groups where br_user_id= #{userId}))" +
|
|
|
@@ -112,11 +112,12 @@ public interface DashboardsMapper {
|
|
|
@Result(column = "filters", property = "filters", jdbcType = JdbcType.VARCHAR),
|
|
|
@Result(column = "demo", property = "demo", jdbcType = JdbcType.BOOLEAN),
|
|
|
@Result(column = "id", property = "chartIds", one = @One(select = "getChartIdsById")),
|
|
|
- @Result(column = "bd_code", property = "bdCode", jdbcType = JdbcType.VARCHAR)
|
|
|
+ @Result(column = "bd_code", property = "bdCode", jdbcType = JdbcType.VARCHAR),
|
|
|
+ @Result(column = "bd_menuId", property = "menuId", jdbcType = JdbcType.VARCHAR)
|
|
|
})
|
|
|
Dashboards getDashboards(@Param("userId") int userId, @Param("id") int id);
|
|
|
|
|
|
- @Select("SELECT id, bd_note as bdNote, bd_name as bdName, CONFIGURATION as bdConfiguration, CREATE_BY as createBy, create_id as createId, CREATE_DATE as createDate, BD_THUMBNAIL as thumbnail, relation_columns as relationColumns, filters, demo, bd_code FROM BI_DASHBOARDS WHERE BD_CODE = #{code}")
|
|
|
+ @Select("SELECT id, bd_note as bdNote, bd_name as bdName, CONFIGURATION as bdConfiguration, CREATE_BY as createBy, create_id as createId, CREATE_DATE as createDate, BD_THUMBNAIL as thumbnail, relation_columns as relationColumns, filters, demo, bd_code,bd_menuId FROM BI_DASHBOARDS WHERE BD_CODE = #{code}")
|
|
|
@ResultMap("DashBoardsResultMap")
|
|
|
Dashboards getDashboardByCode(String code);
|
|
|
|