mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-16 06:56:57 +00:00
[release](project)update version 0.7.4 backend (#66)
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||
<result column="biz_name" jdbcType="VARCHAR" property="bizName" />
|
||||
<result column="domain_id" jdbcType="BIGINT" property="domainId" />
|
||||
<result column="alias" jdbcType="VARCHAR" property="alias" />
|
||||
<result column="viewer" jdbcType="VARCHAR" property="viewer" />
|
||||
<result column="view_org" jdbcType="VARCHAR" property="viewOrg" />
|
||||
<result column="admin" jdbcType="VARCHAR" property="admin" />
|
||||
@@ -78,8 +79,8 @@
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Base_Column_List">
|
||||
id, name, biz_name, domain_id, viewer, view_org, admin, admin_org, is_open, created_by,
|
||||
created_at, updated_by, updated_at
|
||||
id, name, biz_name, domain_id, alias, viewer, view_org, admin, admin_org, is_open,
|
||||
created_by, created_at, updated_by, updated_at
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
entity
|
||||
@@ -131,15 +132,17 @@
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.ModelDO">
|
||||
insert into s2_model (id, name, biz_name,
|
||||
domain_id, viewer, view_org,
|
||||
admin, admin_org, is_open,
|
||||
created_by, created_at, updated_by,
|
||||
updated_at, entity)
|
||||
domain_id, alias, viewer,
|
||||
view_org, admin, admin_org,
|
||||
is_open, created_by, created_at,
|
||||
updated_by, updated_at, entity
|
||||
)
|
||||
values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{bizName,jdbcType=VARCHAR},
|
||||
#{domainId,jdbcType=BIGINT}, #{viewer,jdbcType=VARCHAR}, #{viewOrg,jdbcType=VARCHAR},
|
||||
#{admin,jdbcType=VARCHAR}, #{adminOrg,jdbcType=VARCHAR}, #{isOpen,jdbcType=INTEGER},
|
||||
#{createdBy,jdbcType=VARCHAR}, #{createdAt,jdbcType=TIMESTAMP}, #{updatedBy,jdbcType=VARCHAR},
|
||||
#{updatedAt,jdbcType=TIMESTAMP}, #{entity,jdbcType=LONGVARCHAR})
|
||||
#{domainId,jdbcType=BIGINT}, #{alias,jdbcType=VARCHAR}, #{viewer,jdbcType=VARCHAR},
|
||||
#{viewOrg,jdbcType=VARCHAR}, #{admin,jdbcType=VARCHAR}, #{adminOrg,jdbcType=VARCHAR},
|
||||
#{isOpen,jdbcType=INTEGER}, #{createdBy,jdbcType=VARCHAR}, #{createdAt,jdbcType=TIMESTAMP},
|
||||
#{updatedBy,jdbcType=VARCHAR}, #{updatedAt,jdbcType=TIMESTAMP}, #{entity,jdbcType=LONGVARCHAR}
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.ModelDO">
|
||||
insert into s2_model
|
||||
@@ -156,6 +159,9 @@
|
||||
<if test="domainId != null">
|
||||
domain_id,
|
||||
</if>
|
||||
<if test="alias != null">
|
||||
alias,
|
||||
</if>
|
||||
<if test="viewer != null">
|
||||
viewer,
|
||||
</if>
|
||||
@@ -200,6 +206,9 @@
|
||||
<if test="domainId != null">
|
||||
#{domainId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="alias != null">
|
||||
#{alias,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="viewer != null">
|
||||
#{viewer,jdbcType=VARCHAR},
|
||||
</if>
|
||||
@@ -253,6 +262,9 @@
|
||||
<if test="record.domainId != null">
|
||||
domain_id = #{record.domainId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.alias != null">
|
||||
alias = #{record.alias,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.viewer != null">
|
||||
viewer = #{record.viewer,jdbcType=VARCHAR},
|
||||
</if>
|
||||
@@ -294,6 +306,7 @@
|
||||
name = #{record.name,jdbcType=VARCHAR},
|
||||
biz_name = #{record.bizName,jdbcType=VARCHAR},
|
||||
domain_id = #{record.domainId,jdbcType=BIGINT},
|
||||
alias = #{record.alias,jdbcType=VARCHAR},
|
||||
viewer = #{record.viewer,jdbcType=VARCHAR},
|
||||
view_org = #{record.viewOrg,jdbcType=VARCHAR},
|
||||
admin = #{record.admin,jdbcType=VARCHAR},
|
||||
@@ -314,6 +327,7 @@
|
||||
name = #{record.name,jdbcType=VARCHAR},
|
||||
biz_name = #{record.bizName,jdbcType=VARCHAR},
|
||||
domain_id = #{record.domainId,jdbcType=BIGINT},
|
||||
alias = #{record.alias,jdbcType=VARCHAR},
|
||||
viewer = #{record.viewer,jdbcType=VARCHAR},
|
||||
view_org = #{record.viewOrg,jdbcType=VARCHAR},
|
||||
admin = #{record.admin,jdbcType=VARCHAR},
|
||||
@@ -339,6 +353,9 @@
|
||||
<if test="domainId != null">
|
||||
domain_id = #{domainId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="alias != null">
|
||||
alias = #{alias,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="viewer != null">
|
||||
viewer = #{viewer,jdbcType=VARCHAR},
|
||||
</if>
|
||||
@@ -377,6 +394,7 @@
|
||||
set name = #{name,jdbcType=VARCHAR},
|
||||
biz_name = #{bizName,jdbcType=VARCHAR},
|
||||
domain_id = #{domainId,jdbcType=BIGINT},
|
||||
alias = #{alias,jdbcType=VARCHAR},
|
||||
viewer = #{viewer,jdbcType=VARCHAR},
|
||||
view_org = #{viewOrg,jdbcType=VARCHAR},
|
||||
admin = #{admin,jdbcType=VARCHAR},
|
||||
@@ -394,6 +412,7 @@
|
||||
set name = #{name,jdbcType=VARCHAR},
|
||||
biz_name = #{bizName,jdbcType=VARCHAR},
|
||||
domain_id = #{domainId,jdbcType=BIGINT},
|
||||
alias = #{alias,jdbcType=VARCHAR},
|
||||
viewer = #{viewer,jdbcType=VARCHAR},
|
||||
view_org = #{viewOrg,jdbcType=VARCHAR},
|
||||
admin = #{admin,jdbcType=VARCHAR},
|
||||
|
||||
@@ -2,23 +2,28 @@
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.tencent.supersonic.semantic.model.infrastructure.mapper.DimensionDOCustomMapper">
|
||||
<resultMap id="BaseResultMap"
|
||||
type="com.tencent.supersonic.semantic.model.domain.dataobject.DimensionDO">
|
||||
<id column="id" jdbcType="BIGINT" property="id"/>
|
||||
<result column="name" jdbcType="VARCHAR" property="name"/>
|
||||
<result column="biz_name" jdbcType="VARCHAR" property="bizName"/>
|
||||
<result column="description" jdbcType="VARCHAR" property="description"/>
|
||||
<result column="status" jdbcType="INTEGER" property="status"/>
|
||||
<result column="model_id" jdbcType="BIGINT" property="modelId"/>
|
||||
<result column="type" jdbcType="VARCHAR" property="type"/>
|
||||
<result column="type_params" jdbcType="VARCHAR" property="typeParams"/>
|
||||
<result column="expr" jdbcType="VARCHAR" property="expr"/>
|
||||
<result column="datasource_id" jdbcType="BIGINT" property="datasourceId"/>
|
||||
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt"/>
|
||||
<result column="created_by" jdbcType="VARCHAR" property="createdBy"/>
|
||||
<result column="updated_by" jdbcType="VARCHAR" property="updatedBy"/>
|
||||
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt"/>
|
||||
<result column="semantic_type" jdbcType="VARCHAR" property="semanticType"/>
|
||||
<resultMap id="BaseResultMap" type="com.tencent.supersonic.semantic.model.domain.dataobject.DimensionDO">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="model_id" jdbcType="BIGINT" property="modelId" />
|
||||
<result column="datasource_id" jdbcType="BIGINT" property="datasourceId" />
|
||||
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||
<result column="biz_name" jdbcType="VARCHAR" property="bizName" />
|
||||
<result column="description" jdbcType="VARCHAR" property="description" />
|
||||
<result column="status" jdbcType="INTEGER" property="status" />
|
||||
<result column="sensitive_level" jdbcType="INTEGER" property="sensitiveLevel" />
|
||||
<result column="type" jdbcType="VARCHAR" property="type" />
|
||||
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" />
|
||||
<result column="created_by" jdbcType="VARCHAR" property="createdBy" />
|
||||
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" />
|
||||
<result column="updated_by" jdbcType="VARCHAR" property="updatedBy" />
|
||||
<result column="semantic_type" jdbcType="VARCHAR" property="semanticType" />
|
||||
<result column="alias" jdbcType="VARCHAR" property="alias" />
|
||||
<result column="default_values" jdbcType="VARCHAR" property="defaultValues" />
|
||||
<result column="dim_value_maps" jdbcType="VARCHAR" property="dimValueMaps" />
|
||||
</resultMap>
|
||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.tencent.supersonic.semantic.model.domain.dataobject.DimensionDO">
|
||||
<result column="type_params" jdbcType="LONGVARCHAR" property="typeParams" />
|
||||
<result column="expr" jdbcType="LONGVARCHAR" property="expr" />
|
||||
</resultMap>
|
||||
|
||||
|
||||
@@ -102,5 +107,36 @@
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<select id="query" resultMap="ResultMapWithBLOBs">
|
||||
select *
|
||||
from s2_dimension
|
||||
where 1=1
|
||||
<if test="key != null and key != ''">
|
||||
and ( id like CONCAT('%',#{key , jdbcType=VARCHAR},'%') or
|
||||
name like CONCAT('%',#{key , jdbcType=VARCHAR},'%') or
|
||||
biz_name like CONCAT('%',#{key , jdbcType=VARCHAR},'%') or
|
||||
description like CONCAT('%',#{key , jdbcType=VARCHAR},'%') )
|
||||
</if>
|
||||
<if test="id != null">
|
||||
and id like CONCAT('%',#{id , jdbcType=VARCHAR},'%')
|
||||
</if>
|
||||
<if test="name != null and name != '' ">
|
||||
and name like CONCAT('%',#{name , jdbcType=VARCHAR},'%')
|
||||
</if>
|
||||
<if test="bizName != null and bizName != ''">
|
||||
and biz_name like CONCAT('%',#{bizName , jdbcType=VARCHAR},'%')
|
||||
</if>
|
||||
<if test="sensitiveLevel != null">
|
||||
and sensitive_level = #{sensitiveLevel}
|
||||
</if>
|
||||
<if test="modelIds != null and modelIds.size >0">
|
||||
and model_id in
|
||||
<foreach collection="modelIds" index="index" item="model" open="(" close=")"
|
||||
separator=",">
|
||||
#{model}
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
||||
@@ -35,4 +35,4 @@ CREATE TABLE IF NOT EXISTS `s2_datasource`
|
||||
(
|
||||
100
|
||||
) NOT NULL COMMENT '更新人'
|
||||
) comment '数据源表'
|
||||
) comment '数据源表'
|
||||
Reference in New Issue
Block a user