mirror of
https://github.com/dataease/dataease.git
synced 2026-05-21 04:08:10 +08:00
feat:增加仪表盘预览等功能
This commit is contained in:
@@ -21,7 +21,5 @@ public class PanelGroup implements Serializable {
|
||||
|
||||
private String panelType;
|
||||
|
||||
private String panelStyle;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
||||
@@ -643,76 +643,6 @@ public class PanelGroupExample {
|
||||
addCriterion("panel_type not between", value1, value2, "panelType");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPanelStyleIsNull() {
|
||||
addCriterion("panel_style is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPanelStyleIsNotNull() {
|
||||
addCriterion("panel_style is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPanelStyleEqualTo(String value) {
|
||||
addCriterion("panel_style =", value, "panelStyle");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPanelStyleNotEqualTo(String value) {
|
||||
addCriterion("panel_style <>", value, "panelStyle");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPanelStyleGreaterThan(String value) {
|
||||
addCriterion("panel_style >", value, "panelStyle");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPanelStyleGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("panel_style >=", value, "panelStyle");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPanelStyleLessThan(String value) {
|
||||
addCriterion("panel_style <", value, "panelStyle");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPanelStyleLessThanOrEqualTo(String value) {
|
||||
addCriterion("panel_style <=", value, "panelStyle");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPanelStyleLike(String value) {
|
||||
addCriterion("panel_style like", value, "panelStyle");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPanelStyleNotLike(String value) {
|
||||
addCriterion("panel_style not like", value, "panelStyle");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPanelStyleIn(List<String> values) {
|
||||
addCriterion("panel_style in", values, "panelStyle");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPanelStyleNotIn(List<String> values) {
|
||||
addCriterion("panel_style not in", values, "panelStyle");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPanelStyleBetween(String value1, String value2) {
|
||||
addCriterion("panel_style between", value1, value2, "panelStyle");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPanelStyleNotBetween(String value1, String value2) {
|
||||
addCriterion("panel_style not between", value1, value2, "panelStyle");
|
||||
return (Criteria) this;
|
||||
}
|
||||
}
|
||||
|
||||
public static class Criteria extends GeneratedCriteria {
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
package io.dataease.base.domain;
|
||||
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class PanelGroupWithBLOBs extends PanelGroup implements Serializable {
|
||||
private String panelStyle;
|
||||
|
||||
private String panelData;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
||||
@@ -2,6 +2,7 @@ package io.dataease.base.mapper;
|
||||
|
||||
import io.dataease.base.domain.PanelGroup;
|
||||
import io.dataease.base.domain.PanelGroupExample;
|
||||
import io.dataease.base.domain.PanelGroupWithBLOBs;
|
||||
import java.util.List;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
@@ -12,19 +13,25 @@ public interface PanelGroupMapper {
|
||||
|
||||
int deleteByPrimaryKey(String id);
|
||||
|
||||
int insert(PanelGroup record);
|
||||
int insert(PanelGroupWithBLOBs record);
|
||||
|
||||
int insertSelective(PanelGroup record);
|
||||
int insertSelective(PanelGroupWithBLOBs record);
|
||||
|
||||
List<PanelGroupWithBLOBs> selectByExampleWithBLOBs(PanelGroupExample example);
|
||||
|
||||
List<PanelGroup> selectByExample(PanelGroupExample example);
|
||||
|
||||
PanelGroup selectByPrimaryKey(String id);
|
||||
PanelGroupWithBLOBs selectByPrimaryKey(String id);
|
||||
|
||||
int updateByExampleSelective(@Param("record") PanelGroup record, @Param("example") PanelGroupExample example);
|
||||
int updateByExampleSelective(@Param("record") PanelGroupWithBLOBs record, @Param("example") PanelGroupExample example);
|
||||
|
||||
int updateByExampleWithBLOBs(@Param("record") PanelGroupWithBLOBs record, @Param("example") PanelGroupExample example);
|
||||
|
||||
int updateByExample(@Param("record") PanelGroup record, @Param("example") PanelGroupExample example);
|
||||
|
||||
int updateByPrimaryKeySelective(PanelGroup record);
|
||||
int updateByPrimaryKeySelective(PanelGroupWithBLOBs record);
|
||||
|
||||
int updateByPrimaryKeyWithBLOBs(PanelGroupWithBLOBs record);
|
||||
|
||||
int updateByPrimaryKey(PanelGroup record);
|
||||
}
|
||||
@@ -10,7 +10,10 @@
|
||||
<result column="create_by" jdbcType="VARCHAR" property="createBy" />
|
||||
<result column="create_time" jdbcType="BIGINT" property="createTime" />
|
||||
<result column="panel_type" jdbcType="VARCHAR" property="panelType" />
|
||||
<result column="panel_style" jdbcType="VARCHAR" property="panelStyle" />
|
||||
</resultMap>
|
||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="io.dataease.base.domain.PanelGroupWithBLOBs">
|
||||
<result column="panel_style" jdbcType="LONGVARCHAR" property="panelStyle" />
|
||||
<result column="panel_data" jdbcType="LONGVARCHAR" property="panelData" />
|
||||
</resultMap>
|
||||
<sql id="Example_Where_Clause">
|
||||
<where>
|
||||
@@ -71,8 +74,27 @@
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Base_Column_List">
|
||||
id, `name`, pid, `level`, node_type, create_by, create_time, panel_type, panel_style
|
||||
id, `name`, pid, `level`, node_type, create_by, create_time, panel_type
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
panel_style, panel_data
|
||||
</sql>
|
||||
<select id="selectByExampleWithBLOBs" parameterType="io.dataease.base.domain.PanelGroupExample" resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
,
|
||||
<include refid="Blob_Column_List" />
|
||||
from panel_group
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
<if test="orderByClause != null">
|
||||
order by ${orderByClause}
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectByExample" parameterType="io.dataease.base.domain.PanelGroupExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
@@ -87,9 +109,11 @@
|
||||
order by ${orderByClause}
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
,
|
||||
<include refid="Blob_Column_List" />
|
||||
from panel_group
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</select>
|
||||
@@ -103,17 +127,17 @@
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" parameterType="io.dataease.base.domain.PanelGroup">
|
||||
<insert id="insert" parameterType="io.dataease.base.domain.PanelGroupWithBLOBs">
|
||||
insert into panel_group (id, `name`, pid,
|
||||
`level`, node_type, create_by,
|
||||
create_time, panel_type, panel_style
|
||||
)
|
||||
create_time, panel_type, panel_style,
|
||||
panel_data)
|
||||
values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{pid,jdbcType=VARCHAR},
|
||||
#{level,jdbcType=INTEGER}, #{nodeType,jdbcType=VARCHAR}, #{createBy,jdbcType=VARCHAR},
|
||||
#{createTime,jdbcType=BIGINT}, #{panelType,jdbcType=VARCHAR}, #{panelStyle,jdbcType=VARCHAR}
|
||||
)
|
||||
#{createTime,jdbcType=BIGINT}, #{panelType,jdbcType=VARCHAR}, #{panelStyle,jdbcType=LONGVARCHAR},
|
||||
#{panelData,jdbcType=LONGVARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="io.dataease.base.domain.PanelGroup">
|
||||
<insert id="insertSelective" parameterType="io.dataease.base.domain.PanelGroupWithBLOBs">
|
||||
insert into panel_group
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
@@ -143,6 +167,9 @@
|
||||
<if test="panelStyle != null">
|
||||
panel_style,
|
||||
</if>
|
||||
<if test="panelData != null">
|
||||
panel_data,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
@@ -170,7 +197,10 @@
|
||||
#{panelType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="panelStyle != null">
|
||||
#{panelStyle,jdbcType=VARCHAR},
|
||||
#{panelStyle,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="panelData != null">
|
||||
#{panelData,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
@@ -208,13 +238,32 @@
|
||||
panel_type = #{record.panelType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.panelStyle != null">
|
||||
panel_style = #{record.panelStyle,jdbcType=VARCHAR},
|
||||
panel_style = #{record.panelStyle,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="record.panelData != null">
|
||||
panel_data = #{record.panelData,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExampleWithBLOBs" parameterType="map">
|
||||
update panel_group
|
||||
set id = #{record.id,jdbcType=VARCHAR},
|
||||
`name` = #{record.name,jdbcType=VARCHAR},
|
||||
pid = #{record.pid,jdbcType=VARCHAR},
|
||||
`level` = #{record.level,jdbcType=INTEGER},
|
||||
node_type = #{record.nodeType,jdbcType=VARCHAR},
|
||||
create_by = #{record.createBy,jdbcType=VARCHAR},
|
||||
create_time = #{record.createTime,jdbcType=BIGINT},
|
||||
panel_type = #{record.panelType,jdbcType=VARCHAR},
|
||||
panel_style = #{record.panelStyle,jdbcType=LONGVARCHAR},
|
||||
panel_data = #{record.panelData,jdbcType=LONGVARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update panel_group
|
||||
set id = #{record.id,jdbcType=VARCHAR},
|
||||
@@ -224,13 +273,12 @@
|
||||
node_type = #{record.nodeType,jdbcType=VARCHAR},
|
||||
create_by = #{record.createBy,jdbcType=VARCHAR},
|
||||
create_time = #{record.createTime,jdbcType=BIGINT},
|
||||
panel_type = #{record.panelType,jdbcType=VARCHAR},
|
||||
panel_style = #{record.panelStyle,jdbcType=VARCHAR}
|
||||
panel_type = #{record.panelType,jdbcType=VARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="io.dataease.base.domain.PanelGroup">
|
||||
<update id="updateByPrimaryKeySelective" parameterType="io.dataease.base.domain.PanelGroupWithBLOBs">
|
||||
update panel_group
|
||||
<set>
|
||||
<if test="name != null">
|
||||
@@ -255,11 +303,27 @@
|
||||
panel_type = #{panelType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="panelStyle != null">
|
||||
panel_style = #{panelStyle,jdbcType=VARCHAR},
|
||||
panel_style = #{panelStyle,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="panelData != null">
|
||||
panel_data = #{panelData,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<update id="updateByPrimaryKeyWithBLOBs" parameterType="io.dataease.base.domain.PanelGroupWithBLOBs">
|
||||
update panel_group
|
||||
set `name` = #{name,jdbcType=VARCHAR},
|
||||
pid = #{pid,jdbcType=VARCHAR},
|
||||
`level` = #{level,jdbcType=INTEGER},
|
||||
node_type = #{nodeType,jdbcType=VARCHAR},
|
||||
create_by = #{createBy,jdbcType=VARCHAR},
|
||||
create_time = #{createTime,jdbcType=BIGINT},
|
||||
panel_type = #{panelType,jdbcType=VARCHAR},
|
||||
panel_style = #{panelStyle,jdbcType=LONGVARCHAR},
|
||||
panel_data = #{panelData,jdbcType=LONGVARCHAR}
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="io.dataease.base.domain.PanelGroup">
|
||||
update panel_group
|
||||
set `name` = #{name,jdbcType=VARCHAR},
|
||||
@@ -268,8 +332,7 @@
|
||||
node_type = #{nodeType,jdbcType=VARCHAR},
|
||||
create_by = #{createBy,jdbcType=VARCHAR},
|
||||
create_time = #{createTime,jdbcType=BIGINT},
|
||||
panel_type = #{panelType,jdbcType=VARCHAR},
|
||||
panel_style = #{panelStyle,jdbcType=VARCHAR}
|
||||
panel_type = #{panelType,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
</mapper>
|
||||
@@ -1,6 +1,7 @@
|
||||
package io.dataease.controller.panel;
|
||||
|
||||
import io.dataease.base.domain.DatasetGroup;
|
||||
import io.dataease.base.domain.PanelGroupWithBLOBs;
|
||||
import io.dataease.controller.request.dataset.DataSetGroupRequest;
|
||||
import io.dataease.controller.request.panel.PanelGroupRequest;
|
||||
import io.dataease.dto.dataset.DataSetGroupDTO;
|
||||
@@ -47,7 +48,7 @@ public class PanelGroupController {
|
||||
}
|
||||
|
||||
@GetMapping("/findOne/{id}")
|
||||
public PanelGroupDTO findOne(@PathVariable String id) throws Exception {
|
||||
public PanelGroupWithBLOBs findOne(@PathVariable String id) throws Exception {
|
||||
return panelGroupService.findOne(id);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package io.dataease.dto.panel;
|
||||
|
||||
import io.dataease.base.domain.PanelGroup;
|
||||
import io.dataease.base.domain.PanelGroupWithBLOBs;
|
||||
import io.dataease.dto.chart.ChartViewDTO;
|
||||
import lombok.Data;
|
||||
|
||||
@@ -13,7 +14,7 @@ import java.util.List;
|
||||
* Description:
|
||||
*/
|
||||
@Data
|
||||
public class PanelGroupDTO extends PanelGroup {
|
||||
public class PanelGroupDTO extends PanelGroupWithBLOBs {
|
||||
|
||||
private String label;
|
||||
|
||||
|
||||
@@ -77,7 +77,7 @@ public class PanelGroupService {
|
||||
request.setCreateTime(System.currentTimeMillis());
|
||||
panelGroupMapper.insert(request);
|
||||
} else {
|
||||
panelGroupMapper.updateByPrimaryKey(request);
|
||||
panelGroupMapper.updateByPrimaryKeySelective(request);
|
||||
}
|
||||
PanelGroupDTO panelGroupDTO = new PanelGroupDTO();
|
||||
BeanUtils.copyBean(panelGroupDTO, request);
|
||||
@@ -92,7 +92,11 @@ public class PanelGroupService {
|
||||
}
|
||||
|
||||
|
||||
public PanelGroupDTO findOne(String panelId) throws Exception{
|
||||
public PanelGroupWithBLOBs findOne(String panelId){
|
||||
return panelGroupMapper.selectByPrimaryKey(panelId);
|
||||
}
|
||||
|
||||
public PanelGroupDTO findOneBack(String panelId) throws Exception{
|
||||
PanelGroupDTO panelGroupDTO = extPanelGroupMapper.panelGroup(panelId);
|
||||
Assert.notNull(panelGroupDTO, "未查询到仪表盘信息");
|
||||
PanelDesignExample panelDesignExample = new PanelDesignExample();
|
||||
|
||||
Reference in New Issue
Block a user