mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-16 06:56:57 +00:00
(improvement)(project) support for modifying filter conditions and fix group by pushdown and add windows scipt (#49)
Co-authored-by: lexluo <lexluo@tencent.com>
This commit is contained in:
@@ -1,272 +1,266 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<!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.DatabaseDOMapper">
|
||||
<resultMap id="BaseResultMap"
|
||||
type="com.tencent.supersonic.semantic.model.domain.dataobject.DatabaseDO">
|
||||
<id column="id" jdbcType="BIGINT" property="id"/>
|
||||
<result column="domain_id" jdbcType="BIGINT" property="domainId"/>
|
||||
<result column="name" jdbcType="VARCHAR" property="name"/>
|
||||
<result column="description" jdbcType="VARCHAR" property="description"/>
|
||||
<result column="version" jdbcType="VARCHAR" property="version"/>
|
||||
<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"/>
|
||||
</resultMap>
|
||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs"
|
||||
type="com.tencent.supersonic.semantic.model.domain.dataobject.DatabaseDO">
|
||||
<result column="config" jdbcType="LONGVARCHAR" property="config"/>
|
||||
</resultMap>
|
||||
<sql id="Example_Where_Clause">
|
||||
<where>
|
||||
<foreach collection="oredCriteria" item="criteria" separator="or">
|
||||
<if test="criteria.valid">
|
||||
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||
<foreach collection="criteria.criteria" item="criterion">
|
||||
<choose>
|
||||
<when test="criterion.noValue">
|
||||
and ${criterion.condition}
|
||||
</when>
|
||||
<when test="criterion.singleValue">
|
||||
and ${criterion.condition} #{criterion.value}
|
||||
</when>
|
||||
<when test="criterion.betweenValue">
|
||||
and ${criterion.condition} #{criterion.value} and
|
||||
#{criterion.secondValue}
|
||||
</when>
|
||||
<when test="criterion.listValue">
|
||||
and ${criterion.condition}
|
||||
<foreach close=")" collection="criterion.value" item="listItem"
|
||||
open="(" separator=",">
|
||||
#{listItem}
|
||||
</foreach>
|
||||
</when>
|
||||
</choose>
|
||||
</foreach>
|
||||
</trim>
|
||||
</if>
|
||||
<resultMap id="BaseResultMap" type="com.tencent.supersonic.semantic.model.domain.dataobject.DatabaseDO">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||
<result column="description" jdbcType="VARCHAR" property="description" />
|
||||
<result column="version" jdbcType="VARCHAR" property="version" />
|
||||
<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="admin" jdbcType="VARCHAR" property="admin" />
|
||||
<result column="viewer" jdbcType="VARCHAR" property="viewer" />
|
||||
</resultMap>
|
||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.tencent.supersonic.semantic.model.domain.dataobject.DatabaseDO">
|
||||
<result column="config" jdbcType="LONGVARCHAR" property="config" />
|
||||
</resultMap>
|
||||
<sql id="Example_Where_Clause">
|
||||
<where>
|
||||
<foreach collection="oredCriteria" item="criteria" separator="or">
|
||||
<if test="criteria.valid">
|
||||
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||
<foreach collection="criteria.criteria" item="criterion">
|
||||
<choose>
|
||||
<when test="criterion.noValue">
|
||||
and ${criterion.condition}
|
||||
</when>
|
||||
<when test="criterion.singleValue">
|
||||
and ${criterion.condition} #{criterion.value}
|
||||
</when>
|
||||
<when test="criterion.betweenValue">
|
||||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||
</when>
|
||||
<when test="criterion.listValue">
|
||||
and ${criterion.condition}
|
||||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
||||
#{listItem}
|
||||
</foreach>
|
||||
</when>
|
||||
</choose>
|
||||
</foreach>
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Base_Column_List">
|
||||
id
|
||||
, domain_id, name, description, version, type, created_at, created_by, updated_at,
|
||||
updated_by
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
config
|
||||
</sql>
|
||||
<select id="selectByExampleWithBLOBs"
|
||||
parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.DatabaseDOExample"
|
||||
resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</trim>
|
||||
</if>
|
||||
<include refid="Base_Column_List"/>
|
||||
,
|
||||
<include refid="Blob_Column_List"/>
|
||||
from s2_database
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause"/>
|
||||
</if>
|
||||
<if test="orderByClause != null">
|
||||
order by ${orderByClause}
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectByExample"
|
||||
parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.DatabaseDOExample"
|
||||
resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List"/>
|
||||
from s2_database
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause"/>
|
||||
</if>
|
||||
<if test="orderByClause != null">
|
||||
order by ${orderByClause}
|
||||
</if>
|
||||
<if test="limitStart != null and limitStart>=0">
|
||||
limit #{limitStart} , #{limitEnd}
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
,
|
||||
<include refid="Blob_Column_List"/>
|
||||
from s2_database
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete
|
||||
from s2_database
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<insert id="insert"
|
||||
parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.DatabaseDO">
|
||||
insert into s2_database (id, domain_id, name,
|
||||
description, version, type,
|
||||
created_at, created_by, updated_at,
|
||||
updated_by, config)
|
||||
values (#{id,jdbcType=BIGINT}, #{domainId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR},
|
||||
#{description,jdbcType=VARCHAR}, #{version,jdbcType=VARCHAR},
|
||||
#{type,jdbcType=VARCHAR},
|
||||
#{createdAt,jdbcType=TIMESTAMP}, #{createdBy,jdbcType=VARCHAR},
|
||||
#{updatedAt,jdbcType=TIMESTAMP},
|
||||
#{updatedBy,jdbcType=VARCHAR}, #{config,jdbcType=LONGVARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective"
|
||||
parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.DatabaseDO">
|
||||
insert into s2_database
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
id,
|
||||
</if>
|
||||
<if test="domainId != null">
|
||||
domain_id,
|
||||
</if>
|
||||
<if test="name != null">
|
||||
name,
|
||||
</if>
|
||||
<if test="description != null">
|
||||
description,
|
||||
</if>
|
||||
<if test="version != null">
|
||||
version,
|
||||
</if>
|
||||
<if test="type != null">
|
||||
type,
|
||||
</if>
|
||||
<if test="createdAt != null">
|
||||
created_at,
|
||||
</if>
|
||||
<if test="createdBy != null">
|
||||
created_by,
|
||||
</if>
|
||||
<if test="updatedAt != null">
|
||||
updated_at,
|
||||
</if>
|
||||
<if test="updatedBy != null">
|
||||
updated_by,
|
||||
</if>
|
||||
<if test="config != null">
|
||||
config,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
#{id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="domainId != null">
|
||||
#{domainId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
#{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="description != null">
|
||||
#{description,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="version != null">
|
||||
#{version,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="type != null">
|
||||
#{type,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createdAt != null">
|
||||
#{createdAt,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="createdBy != null">
|
||||
#{createdBy,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="updatedAt != null">
|
||||
#{updatedAt,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="updatedBy != null">
|
||||
#{updatedBy,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="config != null">
|
||||
#{config,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample"
|
||||
parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.DatabaseDOExample"
|
||||
resultType="java.lang.Long">
|
||||
select count(*) from s2_database
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause"/>
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByPrimaryKeySelective"
|
||||
parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.DatabaseDO">
|
||||
update s2_database
|
||||
<set>
|
||||
<if test="domainId != null">
|
||||
domain_id = #{domainId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
name = #{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="description != null">
|
||||
description = #{description,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="version != null">
|
||||
version = #{version,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="type != null">
|
||||
type = #{type,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createdAt != null">
|
||||
created_at = #{createdAt,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="createdBy != null">
|
||||
created_by = #{createdBy,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="updatedAt != null">
|
||||
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="updatedBy != null">
|
||||
updated_by = #{updatedBy,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="config != null">
|
||||
config = #{config,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKeyWithBLOBs"
|
||||
parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.DatabaseDO">
|
||||
update s2_database
|
||||
set domain_id = #{domainId,jdbcType=BIGINT},
|
||||
name = #{name,jdbcType=VARCHAR},
|
||||
description = #{description,jdbcType=VARCHAR},
|
||||
version = #{version,jdbcType=VARCHAR},
|
||||
type = #{type,jdbcType=VARCHAR},
|
||||
created_at = #{createdAt,jdbcType=TIMESTAMP},
|
||||
created_by = #{createdBy,jdbcType=VARCHAR},
|
||||
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
|
||||
updated_by = #{updatedBy,jdbcType=VARCHAR},
|
||||
config = #{config,jdbcType=LONGVARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey"
|
||||
parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.DatabaseDO">
|
||||
update s2_database
|
||||
set domain_id = #{domainId,jdbcType=BIGINT},
|
||||
name = #{name,jdbcType=VARCHAR},
|
||||
description = #{description,jdbcType=VARCHAR},
|
||||
version = #{version,jdbcType=VARCHAR},
|
||||
type = #{type,jdbcType=VARCHAR},
|
||||
created_at = #{createdAt,jdbcType=TIMESTAMP},
|
||||
created_by = #{createdBy,jdbcType=VARCHAR},
|
||||
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
|
||||
updated_by = #{updatedBy,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</foreach>
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Base_Column_List">
|
||||
id, name, description, version, type, created_at, created_by, updated_at, updated_by,
|
||||
admin, viewer
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
config
|
||||
</sql>
|
||||
<select id="selectByExampleWithBLOBs" parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.DatabaseDOExample" resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
,
|
||||
<include refid="Blob_Column_List" />
|
||||
from s2_database
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
<if test="orderByClause != null">
|
||||
order by ${orderByClause}
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectByExample" parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.DatabaseDOExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from s2_database
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
<if test="orderByClause != null">
|
||||
order by ${orderByClause}
|
||||
</if>
|
||||
<if test="limitStart != null and limitStart>=0">
|
||||
limit #{limitStart} , #{limitEnd}
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
,
|
||||
<include refid="Blob_Column_List" />
|
||||
from s2_database
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from s2_database
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.DatabaseDO">
|
||||
insert into s2_database (id, name, description,
|
||||
version, type, created_at,
|
||||
created_by, updated_at, updated_by,
|
||||
admin, viewer, config
|
||||
)
|
||||
values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR},
|
||||
#{version,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR}, #{createdAt,jdbcType=TIMESTAMP},
|
||||
#{createdBy,jdbcType=VARCHAR}, #{updatedAt,jdbcType=TIMESTAMP}, #{updatedBy,jdbcType=VARCHAR},
|
||||
#{admin,jdbcType=VARCHAR}, #{viewer,jdbcType=VARCHAR}, #{config,jdbcType=LONGVARCHAR}
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.DatabaseDO">
|
||||
insert into s2_database
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
id,
|
||||
</if>
|
||||
<if test="name != null">
|
||||
name,
|
||||
</if>
|
||||
<if test="description != null">
|
||||
description,
|
||||
</if>
|
||||
<if test="version != null">
|
||||
version,
|
||||
</if>
|
||||
<if test="type != null">
|
||||
type,
|
||||
</if>
|
||||
<if test="createdAt != null">
|
||||
created_at,
|
||||
</if>
|
||||
<if test="createdBy != null">
|
||||
created_by,
|
||||
</if>
|
||||
<if test="updatedAt != null">
|
||||
updated_at,
|
||||
</if>
|
||||
<if test="updatedBy != null">
|
||||
updated_by,
|
||||
</if>
|
||||
<if test="admin != null">
|
||||
admin,
|
||||
</if>
|
||||
<if test="viewer != null">
|
||||
viewer,
|
||||
</if>
|
||||
<if test="config != null">
|
||||
config,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
#{id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
#{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="description != null">
|
||||
#{description,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="version != null">
|
||||
#{version,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="type != null">
|
||||
#{type,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createdAt != null">
|
||||
#{createdAt,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="createdBy != null">
|
||||
#{createdBy,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="updatedAt != null">
|
||||
#{updatedAt,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="updatedBy != null">
|
||||
#{updatedBy,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="admin != null">
|
||||
#{admin,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="viewer != null">
|
||||
#{viewer,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="config != null">
|
||||
#{config,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.DatabaseDOExample" resultType="java.lang.Long">
|
||||
select count(*) from s2_database
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.DatabaseDO">
|
||||
update s2_database
|
||||
<set>
|
||||
<if test="name != null">
|
||||
name = #{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="description != null">
|
||||
description = #{description,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="version != null">
|
||||
version = #{version,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="type != null">
|
||||
type = #{type,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createdAt != null">
|
||||
created_at = #{createdAt,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="createdBy != null">
|
||||
created_by = #{createdBy,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="updatedAt != null">
|
||||
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="updatedBy != null">
|
||||
updated_by = #{updatedBy,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="admin != null">
|
||||
admin = #{admin,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="viewer != null">
|
||||
viewer = #{viewer,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="config != null">
|
||||
config = #{config,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.DatabaseDO">
|
||||
update s2_database
|
||||
set name = #{name,jdbcType=VARCHAR},
|
||||
description = #{description,jdbcType=VARCHAR},
|
||||
version = #{version,jdbcType=VARCHAR},
|
||||
type = #{type,jdbcType=VARCHAR},
|
||||
created_at = #{createdAt,jdbcType=TIMESTAMP},
|
||||
created_by = #{createdBy,jdbcType=VARCHAR},
|
||||
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
|
||||
updated_by = #{updatedBy,jdbcType=VARCHAR},
|
||||
admin = #{admin,jdbcType=VARCHAR},
|
||||
viewer = #{viewer,jdbcType=VARCHAR},
|
||||
config = #{config,jdbcType=LONGVARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.DatabaseDO">
|
||||
update s2_database
|
||||
set name = #{name,jdbcType=VARCHAR},
|
||||
description = #{description,jdbcType=VARCHAR},
|
||||
version = #{version,jdbcType=VARCHAR},
|
||||
type = #{type,jdbcType=VARCHAR},
|
||||
created_at = #{createdAt,jdbcType=TIMESTAMP},
|
||||
created_by = #{createdBy,jdbcType=VARCHAR},
|
||||
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
|
||||
updated_by = #{updatedBy,jdbcType=VARCHAR},
|
||||
admin = #{admin,jdbcType=VARCHAR},
|
||||
viewer = #{viewer,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
||||
@@ -1,272 +1,252 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<!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.DatasourceDOMapper">
|
||||
<resultMap id="BaseResultMap"
|
||||
type="com.tencent.supersonic.semantic.model.domain.dataobject.DatasourceDO">
|
||||
<id column="id" jdbcType="BIGINT" property="id"/>
|
||||
<result column="model_id" jdbcType="BIGINT" property="modelId"/>
|
||||
<result column="name" jdbcType="VARCHAR" property="name"/>
|
||||
<result column="biz_name" jdbcType="VARCHAR" property="bizName"/>
|
||||
<result column="description" jdbcType="VARCHAR" property="description"/>
|
||||
<result column="database_id" jdbcType="BIGINT" property="databaseId"/>
|
||||
<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"/>
|
||||
</resultMap>
|
||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs"
|
||||
type="com.tencent.supersonic.semantic.model.domain.dataobject.DatasourceDO">
|
||||
<result column="datasource_detail" jdbcType="LONGVARCHAR" property="datasourceDetail"/>
|
||||
</resultMap>
|
||||
<sql id="Example_Where_Clause">
|
||||
<where>
|
||||
<foreach collection="oredCriteria" item="criteria" separator="or">
|
||||
<if test="criteria.valid">
|
||||
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||
<foreach collection="criteria.criteria" item="criterion">
|
||||
<choose>
|
||||
<when test="criterion.noValue">
|
||||
and ${criterion.condition}
|
||||
</when>
|
||||
<when test="criterion.singleValue">
|
||||
and ${criterion.condition} #{criterion.value}
|
||||
</when>
|
||||
<when test="criterion.betweenValue">
|
||||
and ${criterion.condition} #{criterion.value} and
|
||||
#{criterion.secondValue}
|
||||
</when>
|
||||
<when test="criterion.listValue">
|
||||
and ${criterion.condition}
|
||||
<foreach close=")" collection="criterion.value" item="listItem"
|
||||
open="(" separator=",">
|
||||
#{listItem}
|
||||
</foreach>
|
||||
</when>
|
||||
</choose>
|
||||
</foreach>
|
||||
</trim>
|
||||
</if>
|
||||
<resultMap id="BaseResultMap" type="com.tencent.supersonic.semantic.model.domain.dataobject.DatasourceDO">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="model_id" jdbcType="BIGINT" property="modelId" />
|
||||
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||
<result column="biz_name" jdbcType="VARCHAR" property="bizName" />
|
||||
<result column="description" jdbcType="VARCHAR" property="description" />
|
||||
<result column="database_id" jdbcType="BIGINT" property="databaseId" />
|
||||
<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" />
|
||||
</resultMap>
|
||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.tencent.supersonic.semantic.model.domain.dataobject.DatasourceDO">
|
||||
<result column="datasource_detail" jdbcType="LONGVARCHAR" property="datasourceDetail" />
|
||||
</resultMap>
|
||||
<sql id="Example_Where_Clause">
|
||||
<where>
|
||||
<foreach collection="oredCriteria" item="criteria" separator="or">
|
||||
<if test="criteria.valid">
|
||||
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||
<foreach collection="criteria.criteria" item="criterion">
|
||||
<choose>
|
||||
<when test="criterion.noValue">
|
||||
and ${criterion.condition}
|
||||
</when>
|
||||
<when test="criterion.singleValue">
|
||||
and ${criterion.condition} #{criterion.value}
|
||||
</when>
|
||||
<when test="criterion.betweenValue">
|
||||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||
</when>
|
||||
<when test="criterion.listValue">
|
||||
and ${criterion.condition}
|
||||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
||||
#{listItem}
|
||||
</foreach>
|
||||
</when>
|
||||
</choose>
|
||||
</foreach>
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Base_Column_List">
|
||||
id
|
||||
, model_id, name, biz_name, description, database_id, created_at, created_by, updated_at,
|
||||
</trim>
|
||||
</if>
|
||||
</foreach>
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Base_Column_List">
|
||||
id, model_id, name, biz_name, description, database_id, created_at, created_by, updated_at,
|
||||
updated_by
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
datasource_detail
|
||||
</sql>
|
||||
<select id="selectByExampleWithBLOBs"
|
||||
parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.DatasourceDOExample"
|
||||
resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List"/>
|
||||
,
|
||||
<include refid="Blob_Column_List"/>
|
||||
from s2_datasource
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause"/>
|
||||
</if>
|
||||
<if test="orderByClause != null">
|
||||
order by ${orderByClause}
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectByExample"
|
||||
parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.DatasourceDOExample"
|
||||
resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List"/>
|
||||
from s2_datasource
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause"/>
|
||||
</if>
|
||||
<if test="orderByClause != null">
|
||||
order by ${orderByClause}
|
||||
</if>
|
||||
<if test="limitStart != null and limitStart>=0">
|
||||
limit #{limitStart} , #{limitEnd}
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
,
|
||||
<include refid="Blob_Column_List"/>
|
||||
from s2_datasource
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete
|
||||
from s2_datasource
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<insert id="insert"
|
||||
parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.DatasourceDO">
|
||||
insert into s2_datasource (id, model_id, name,
|
||||
biz_name, description, database_id,
|
||||
created_at, created_by, updated_at,
|
||||
updated_by, datasource_detail)
|
||||
values (#{id,jdbcType=BIGINT}, #{modelId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR},
|
||||
#{bizName,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR},
|
||||
#{databaseId,jdbcType=BIGINT},
|
||||
#{createdAt,jdbcType=TIMESTAMP}, #{createdBy,jdbcType=VARCHAR},
|
||||
#{updatedAt,jdbcType=TIMESTAMP},
|
||||
#{updatedBy,jdbcType=VARCHAR}, #{datasourceDetail,jdbcType=LONGVARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective"
|
||||
parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.DatasourceDO">
|
||||
insert into s2_datasource
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
id,
|
||||
</if>
|
||||
<if test="modelId != null">
|
||||
model_id,
|
||||
</if>
|
||||
<if test="name != null">
|
||||
name,
|
||||
</if>
|
||||
<if test="bizName != null">
|
||||
biz_name,
|
||||
</if>
|
||||
<if test="description != null">
|
||||
description,
|
||||
</if>
|
||||
<if test="databaseId != null">
|
||||
database_id,
|
||||
</if>
|
||||
<if test="createdAt != null">
|
||||
created_at,
|
||||
</if>
|
||||
<if test="createdBy != null">
|
||||
created_by,
|
||||
</if>
|
||||
<if test="updatedAt != null">
|
||||
updated_at,
|
||||
</if>
|
||||
<if test="updatedBy != null">
|
||||
updated_by,
|
||||
</if>
|
||||
<if test="datasourceDetail != null">
|
||||
datasource_detail,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
#{id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="modelId != null">
|
||||
#{modelId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
#{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="bizName != null">
|
||||
#{bizName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="description != null">
|
||||
#{description,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="databaseId != null">
|
||||
#{databaseId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="createdAt != null">
|
||||
#{createdAt,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="createdBy != null">
|
||||
#{createdBy,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="updatedAt != null">
|
||||
#{updatedAt,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="updatedBy != null">
|
||||
#{updatedBy,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="datasourceDetail != null">
|
||||
#{datasourceDetail,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample"
|
||||
parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.DatasourceDOExample"
|
||||
resultType="java.lang.Long">
|
||||
select count(*) from s2_datasource
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause"/>
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByPrimaryKeySelective"
|
||||
parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.DatasourceDO">
|
||||
update s2_datasource
|
||||
<set>
|
||||
<if test="modelId != null">
|
||||
model_id = #{modelId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
name = #{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="bizName != null">
|
||||
biz_name = #{bizName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="description != null">
|
||||
description = #{description,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="databaseId != null">
|
||||
database_id = #{databaseId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="createdAt != null">
|
||||
created_at = #{createdAt,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="createdBy != null">
|
||||
created_by = #{createdBy,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="updatedAt != null">
|
||||
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="updatedBy != null">
|
||||
updated_by = #{updatedBy,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="datasourceDetail != null">
|
||||
datasource_detail = #{datasourceDetail,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKeyWithBLOBs"
|
||||
parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.DatasourceDO">
|
||||
update s2_datasource
|
||||
set model_id = #{modelId,jdbcType=BIGINT},
|
||||
name = #{name,jdbcType=VARCHAR},
|
||||
biz_name = #{bizName,jdbcType=VARCHAR},
|
||||
description = #{description,jdbcType=VARCHAR},
|
||||
database_id = #{databaseId,jdbcType=BIGINT},
|
||||
created_at = #{createdAt,jdbcType=TIMESTAMP},
|
||||
created_by = #{createdBy,jdbcType=VARCHAR},
|
||||
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
|
||||
updated_by = #{updatedBy,jdbcType=VARCHAR},
|
||||
datasource_detail = #{datasourceDetail,jdbcType=LONGVARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey"
|
||||
parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.DatasourceDO">
|
||||
update s2_datasource
|
||||
set model_id = #{modelId,jdbcType=BIGINT},
|
||||
name = #{name,jdbcType=VARCHAR},
|
||||
biz_name = #{bizName,jdbcType=VARCHAR},
|
||||
description = #{description,jdbcType=VARCHAR},
|
||||
database_id = #{databaseId,jdbcType=BIGINT},
|
||||
created_at = #{createdAt,jdbcType=TIMESTAMP},
|
||||
created_by = #{createdBy,jdbcType=VARCHAR},
|
||||
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
|
||||
updated_by = #{updatedBy,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
datasource_detail
|
||||
</sql>
|
||||
<select id="selectByExampleWithBLOBs" parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.DatasourceDOExample" resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
,
|
||||
<include refid="Blob_Column_List" />
|
||||
from s2_datasource
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
<if test="orderByClause != null">
|
||||
order by ${orderByClause}
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectByExample" parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.DatasourceDOExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from s2_datasource
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
<if test="orderByClause != null">
|
||||
order by ${orderByClause}
|
||||
</if>
|
||||
<if test="limitStart != null and limitStart>=0">
|
||||
limit #{limitStart} , #{limitEnd}
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
,
|
||||
<include refid="Blob_Column_List" />
|
||||
from s2_datasource
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from s2_datasource
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.DatasourceDO">
|
||||
insert into s2_datasource (id, model_id, name,
|
||||
biz_name, description, database_id,
|
||||
created_at, created_by, updated_at,
|
||||
updated_by, datasource_detail)
|
||||
values (#{id,jdbcType=BIGINT}, #{modelId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR},
|
||||
#{bizName,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, #{databaseId,jdbcType=BIGINT},
|
||||
#{createdAt,jdbcType=TIMESTAMP}, #{createdBy,jdbcType=VARCHAR}, #{updatedAt,jdbcType=TIMESTAMP},
|
||||
#{updatedBy,jdbcType=VARCHAR}, #{datasourceDetail,jdbcType=LONGVARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.DatasourceDO">
|
||||
insert into s2_datasource
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
id,
|
||||
</if>
|
||||
<if test="modelId != null">
|
||||
model_id,
|
||||
</if>
|
||||
<if test="name != null">
|
||||
name,
|
||||
</if>
|
||||
<if test="bizName != null">
|
||||
biz_name,
|
||||
</if>
|
||||
<if test="description != null">
|
||||
description,
|
||||
</if>
|
||||
<if test="databaseId != null">
|
||||
database_id,
|
||||
</if>
|
||||
<if test="createdAt != null">
|
||||
created_at,
|
||||
</if>
|
||||
<if test="createdBy != null">
|
||||
created_by,
|
||||
</if>
|
||||
<if test="updatedAt != null">
|
||||
updated_at,
|
||||
</if>
|
||||
<if test="updatedBy != null">
|
||||
updated_by,
|
||||
</if>
|
||||
<if test="datasourceDetail != null">
|
||||
datasource_detail,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
#{id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="modelId != null">
|
||||
#{modelId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
#{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="bizName != null">
|
||||
#{bizName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="description != null">
|
||||
#{description,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="databaseId != null">
|
||||
#{databaseId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="createdAt != null">
|
||||
#{createdAt,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="createdBy != null">
|
||||
#{createdBy,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="updatedAt != null">
|
||||
#{updatedAt,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="updatedBy != null">
|
||||
#{updatedBy,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="datasourceDetail != null">
|
||||
#{datasourceDetail,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.DatasourceDOExample" resultType="java.lang.Long">
|
||||
select count(*) from s2_datasource
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.DatasourceDO">
|
||||
update s2_datasource
|
||||
<set>
|
||||
<if test="modelId != null">
|
||||
model_id = #{modelId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
name = #{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="bizName != null">
|
||||
biz_name = #{bizName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="description != null">
|
||||
description = #{description,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="databaseId != null">
|
||||
database_id = #{databaseId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="createdAt != null">
|
||||
created_at = #{createdAt,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="createdBy != null">
|
||||
created_by = #{createdBy,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="updatedAt != null">
|
||||
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="updatedBy != null">
|
||||
updated_by = #{updatedBy,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="datasourceDetail != null">
|
||||
datasource_detail = #{datasourceDetail,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.DatasourceDO">
|
||||
update s2_datasource
|
||||
set model_id = #{modelId,jdbcType=BIGINT},
|
||||
name = #{name,jdbcType=VARCHAR},
|
||||
biz_name = #{bizName,jdbcType=VARCHAR},
|
||||
description = #{description,jdbcType=VARCHAR},
|
||||
database_id = #{databaseId,jdbcType=BIGINT},
|
||||
created_at = #{createdAt,jdbcType=TIMESTAMP},
|
||||
created_by = #{createdBy,jdbcType=VARCHAR},
|
||||
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
|
||||
updated_by = #{updatedBy,jdbcType=VARCHAR},
|
||||
datasource_detail = #{datasourceDetail,jdbcType=LONGVARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.DatasourceDO">
|
||||
update s2_datasource
|
||||
set model_id = #{modelId,jdbcType=BIGINT},
|
||||
name = #{name,jdbcType=VARCHAR},
|
||||
biz_name = #{bizName,jdbcType=VARCHAR},
|
||||
description = #{description,jdbcType=VARCHAR},
|
||||
database_id = #{databaseId,jdbcType=BIGINT},
|
||||
created_at = #{createdAt,jdbcType=TIMESTAMP},
|
||||
created_by = #{createdBy,jdbcType=VARCHAR},
|
||||
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
|
||||
updated_by = #{updatedBy,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
||||
@@ -1,209 +1,194 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<!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.DatasourceRelaDOMapper">
|
||||
<resultMap id="BaseResultMap"
|
||||
type="com.tencent.supersonic.semantic.model.domain.dataobject.DatasourceRelaDO">
|
||||
<id column="id" jdbcType="BIGINT" property="id"/>
|
||||
<result column="model_id" jdbcType="BIGINT" property="modelId"/>
|
||||
<result column="datasource_from" jdbcType="BIGINT" property="datasourceFrom"/>
|
||||
<result column="datasource_to" jdbcType="BIGINT" property="datasourceTo"/>
|
||||
<result column="join_key" jdbcType="VARCHAR" property="joinKey"/>
|
||||
<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"/>
|
||||
</resultMap>
|
||||
<sql id="Example_Where_Clause">
|
||||
<where>
|
||||
<foreach collection="oredCriteria" item="criteria" separator="or">
|
||||
<if test="criteria.valid">
|
||||
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||
<foreach collection="criteria.criteria" item="criterion">
|
||||
<choose>
|
||||
<when test="criterion.noValue">
|
||||
and ${criterion.condition}
|
||||
</when>
|
||||
<when test="criterion.singleValue">
|
||||
and ${criterion.condition} #{criterion.value}
|
||||
</when>
|
||||
<when test="criterion.betweenValue">
|
||||
and ${criterion.condition} #{criterion.value} and
|
||||
#{criterion.secondValue}
|
||||
</when>
|
||||
<when test="criterion.listValue">
|
||||
and ${criterion.condition}
|
||||
<foreach close=")" collection="criterion.value" item="listItem"
|
||||
open="(" separator=",">
|
||||
#{listItem}
|
||||
</foreach>
|
||||
</when>
|
||||
</choose>
|
||||
</foreach>
|
||||
</trim>
|
||||
</if>
|
||||
<resultMap id="BaseResultMap" type="com.tencent.supersonic.semantic.model.domain.dataobject.DatasourceRelaDO">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="model_id" jdbcType="BIGINT" property="modelId" />
|
||||
<result column="datasource_from" jdbcType="BIGINT" property="datasourceFrom" />
|
||||
<result column="datasource_to" jdbcType="BIGINT" property="datasourceTo" />
|
||||
<result column="join_key" jdbcType="VARCHAR" property="joinKey" />
|
||||
<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" />
|
||||
</resultMap>
|
||||
<sql id="Example_Where_Clause">
|
||||
<where>
|
||||
<foreach collection="oredCriteria" item="criteria" separator="or">
|
||||
<if test="criteria.valid">
|
||||
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||
<foreach collection="criteria.criteria" item="criterion">
|
||||
<choose>
|
||||
<when test="criterion.noValue">
|
||||
and ${criterion.condition}
|
||||
</when>
|
||||
<when test="criterion.singleValue">
|
||||
and ${criterion.condition} #{criterion.value}
|
||||
</when>
|
||||
<when test="criterion.betweenValue">
|
||||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||
</when>
|
||||
<when test="criterion.listValue">
|
||||
and ${criterion.condition}
|
||||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
||||
#{listItem}
|
||||
</foreach>
|
||||
</when>
|
||||
</choose>
|
||||
</foreach>
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Base_Column_List">
|
||||
id
|
||||
, model_id, datasource_from, datasource_to, join_key, created_at, created_by, updated_at,
|
||||
</trim>
|
||||
</if>
|
||||
</foreach>
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Base_Column_List">
|
||||
id, model_id, datasource_from, datasource_to, join_key, created_at, created_by, updated_at,
|
||||
updated_by
|
||||
</sql>
|
||||
<select id="selectByExample"
|
||||
parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.DatasourceRelaDOExample"
|
||||
resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List"/>
|
||||
from s2_datasource_rela
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause"/>
|
||||
</if>
|
||||
<if test="orderByClause != null">
|
||||
order by ${orderByClause}
|
||||
</if>
|
||||
<if test="limitStart != null and limitStart>=0">
|
||||
limit #{limitStart} , #{limitEnd}
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from s2_datasource_rela
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete
|
||||
from s2_datasource_rela
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<insert id="insert"
|
||||
parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.DatasourceRelaDO">
|
||||
insert into s2_datasource_rela (id, model_id, datasource_from,
|
||||
datasource_to, join_key, created_at,
|
||||
created_by, updated_at, updated_by)
|
||||
values (#{id,jdbcType=BIGINT}, #{modelId,jdbcType=BIGINT},
|
||||
#{datasourceFrom,jdbcType=BIGINT},
|
||||
#{datasourceTo,jdbcType=BIGINT}, #{joinKey,jdbcType=VARCHAR},
|
||||
#{createdAt,jdbcType=TIMESTAMP},
|
||||
#{createdBy,jdbcType=VARCHAR}, #{updatedAt,jdbcType=TIMESTAMP},
|
||||
#{updatedBy,jdbcType=VARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective"
|
||||
parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.DatasourceRelaDO">
|
||||
insert into s2_datasource_rela
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
id,
|
||||
</if>
|
||||
<if test="modelId != null">
|
||||
model_id,
|
||||
</if>
|
||||
<if test="datasourceFrom != null">
|
||||
datasource_from,
|
||||
</if>
|
||||
<if test="datasourceTo != null">
|
||||
datasource_to,
|
||||
</if>
|
||||
<if test="joinKey != null">
|
||||
join_key,
|
||||
</if>
|
||||
<if test="createdAt != null">
|
||||
created_at,
|
||||
</if>
|
||||
<if test="createdBy != null">
|
||||
created_by,
|
||||
</if>
|
||||
<if test="updatedAt != null">
|
||||
updated_at,
|
||||
</if>
|
||||
<if test="updatedBy != null">
|
||||
updated_by,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
#{id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="modelId != null">
|
||||
#{modelId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="datasourceFrom != null">
|
||||
#{datasourceFrom,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="datasourceTo != null">
|
||||
#{datasourceTo,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="joinKey != null">
|
||||
#{joinKey,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createdAt != null">
|
||||
#{createdAt,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="createdBy != null">
|
||||
#{createdBy,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="updatedAt != null">
|
||||
#{updatedAt,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="updatedBy != null">
|
||||
#{updatedBy,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample"
|
||||
parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.DatasourceRelaDOExample"
|
||||
resultType="java.lang.Long">
|
||||
select count(*) from s2_datasource_rela
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause"/>
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByPrimaryKeySelective"
|
||||
parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.DatasourceRelaDO">
|
||||
update s2_datasource_rela
|
||||
<set>
|
||||
<if test="modelId != null">
|
||||
model_id = #{modelId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="datasourceFrom != null">
|
||||
datasource_from = #{datasourceFrom,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="datasourceTo != null">
|
||||
datasource_to = #{datasourceTo,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="joinKey != null">
|
||||
join_key = #{joinKey,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createdAt != null">
|
||||
created_at = #{createdAt,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="createdBy != null">
|
||||
created_by = #{createdBy,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="updatedAt != null">
|
||||
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="updatedBy != null">
|
||||
updated_by = #{updatedBy,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey"
|
||||
parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.DatasourceRelaDO">
|
||||
update s2_datasource_rela
|
||||
set model_id = #{modelId,jdbcType=BIGINT},
|
||||
datasource_from = #{datasourceFrom,jdbcType=BIGINT},
|
||||
datasource_to = #{datasourceTo,jdbcType=BIGINT},
|
||||
join_key = #{joinKey,jdbcType=VARCHAR},
|
||||
created_at = #{createdAt,jdbcType=TIMESTAMP},
|
||||
created_by = #{createdBy,jdbcType=VARCHAR},
|
||||
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
|
||||
updated_by = #{updatedBy,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.DatasourceRelaDOExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from s2_datasource_rela
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
<if test="orderByClause != null">
|
||||
order by ${orderByClause}
|
||||
</if>
|
||||
<if test="limitStart != null and limitStart>=0">
|
||||
limit #{limitStart} , #{limitEnd}
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from s2_datasource_rela
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from s2_datasource_rela
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.DatasourceRelaDO">
|
||||
insert into s2_datasource_rela (id, model_id, datasource_from,
|
||||
datasource_to, join_key, created_at,
|
||||
created_by, updated_at, updated_by
|
||||
)
|
||||
values (#{id,jdbcType=BIGINT}, #{modelId,jdbcType=BIGINT}, #{datasourceFrom,jdbcType=BIGINT},
|
||||
#{datasourceTo,jdbcType=BIGINT}, #{joinKey,jdbcType=VARCHAR}, #{createdAt,jdbcType=TIMESTAMP},
|
||||
#{createdBy,jdbcType=VARCHAR}, #{updatedAt,jdbcType=TIMESTAMP}, #{updatedBy,jdbcType=VARCHAR}
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.DatasourceRelaDO">
|
||||
insert into s2_datasource_rela
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
id,
|
||||
</if>
|
||||
<if test="modelId != null">
|
||||
model_id,
|
||||
</if>
|
||||
<if test="datasourceFrom != null">
|
||||
datasource_from,
|
||||
</if>
|
||||
<if test="datasourceTo != null">
|
||||
datasource_to,
|
||||
</if>
|
||||
<if test="joinKey != null">
|
||||
join_key,
|
||||
</if>
|
||||
<if test="createdAt != null">
|
||||
created_at,
|
||||
</if>
|
||||
<if test="createdBy != null">
|
||||
created_by,
|
||||
</if>
|
||||
<if test="updatedAt != null">
|
||||
updated_at,
|
||||
</if>
|
||||
<if test="updatedBy != null">
|
||||
updated_by,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
#{id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="modelId != null">
|
||||
#{modelId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="datasourceFrom != null">
|
||||
#{datasourceFrom,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="datasourceTo != null">
|
||||
#{datasourceTo,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="joinKey != null">
|
||||
#{joinKey,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createdAt != null">
|
||||
#{createdAt,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="createdBy != null">
|
||||
#{createdBy,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="updatedAt != null">
|
||||
#{updatedAt,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="updatedBy != null">
|
||||
#{updatedBy,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.DatasourceRelaDOExample" resultType="java.lang.Long">
|
||||
select count(*) from s2_datasource_rela
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.DatasourceRelaDO">
|
||||
update s2_datasource_rela
|
||||
<set>
|
||||
<if test="modelId != null">
|
||||
model_id = #{modelId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="datasourceFrom != null">
|
||||
datasource_from = #{datasourceFrom,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="datasourceTo != null">
|
||||
datasource_to = #{datasourceTo,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="joinKey != null">
|
||||
join_key = #{joinKey,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createdAt != null">
|
||||
created_at = #{createdAt,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="createdBy != null">
|
||||
created_by = #{createdBy,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="updatedAt != null">
|
||||
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="updatedBy != null">
|
||||
updated_by = #{updatedBy,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.DatasourceRelaDO">
|
||||
update s2_datasource_rela
|
||||
set model_id = #{modelId,jdbcType=BIGINT},
|
||||
datasource_from = #{datasourceFrom,jdbcType=BIGINT},
|
||||
datasource_to = #{datasourceTo,jdbcType=BIGINT},
|
||||
join_key = #{joinKey,jdbcType=VARCHAR},
|
||||
created_at = #{createdAt,jdbcType=TIMESTAMP},
|
||||
created_by = #{createdBy,jdbcType=VARCHAR},
|
||||
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
|
||||
updated_by = #{updatedBy,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
||||
@@ -1,378 +1,354 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<!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.DimensionDOMapper">
|
||||
<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>
|
||||
<sql id="Example_Where_Clause">
|
||||
<where>
|
||||
<foreach collection="oredCriteria" item="criteria" separator="or">
|
||||
<if test="criteria.valid">
|
||||
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||
<foreach collection="criteria.criteria" item="criterion">
|
||||
<choose>
|
||||
<when test="criterion.noValue">
|
||||
and ${criterion.condition}
|
||||
</when>
|
||||
<when test="criterion.singleValue">
|
||||
and ${criterion.condition} #{criterion.value}
|
||||
</when>
|
||||
<when test="criterion.betweenValue">
|
||||
and ${criterion.condition} #{criterion.value} and
|
||||
#{criterion.secondValue}
|
||||
</when>
|
||||
<when test="criterion.listValue">
|
||||
and ${criterion.condition}
|
||||
<foreach close=")" collection="criterion.value" item="listItem"
|
||||
open="(" separator=",">
|
||||
#{listItem}
|
||||
</foreach>
|
||||
</when>
|
||||
</choose>
|
||||
</foreach>
|
||||
</trim>
|
||||
</if>
|
||||
<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>
|
||||
<sql id="Example_Where_Clause">
|
||||
<where>
|
||||
<foreach collection="oredCriteria" item="criteria" separator="or">
|
||||
<if test="criteria.valid">
|
||||
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||
<foreach collection="criteria.criteria" item="criterion">
|
||||
<choose>
|
||||
<when test="criterion.noValue">
|
||||
and ${criterion.condition}
|
||||
</when>
|
||||
<when test="criterion.singleValue">
|
||||
and ${criterion.condition} #{criterion.value}
|
||||
</when>
|
||||
<when test="criterion.betweenValue">
|
||||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||
</when>
|
||||
<when test="criterion.listValue">
|
||||
and ${criterion.condition}
|
||||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
||||
#{listItem}
|
||||
</foreach>
|
||||
</when>
|
||||
</choose>
|
||||
</foreach>
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Base_Column_List">
|
||||
id
|
||||
, model_id, datasource_id, name, biz_name, description, status, sensitive_level,
|
||||
</trim>
|
||||
</if>
|
||||
</foreach>
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Base_Column_List">
|
||||
id, model_id, datasource_id, name, biz_name, description, status, sensitive_level,
|
||||
type, created_at, created_by, updated_at, updated_by, semantic_type, alias, default_values,
|
||||
dim_value_maps
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
type_params
|
||||
, expr
|
||||
</sql>
|
||||
<select id="selectByExampleWithBLOBs"
|
||||
parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.DimensionDOExample"
|
||||
resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List"/>
|
||||
,
|
||||
<include refid="Blob_Column_List"/>
|
||||
from s2_dimension
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause"/>
|
||||
</if>
|
||||
<if test="orderByClause != null">
|
||||
order by ${orderByClause}
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectByExample"
|
||||
parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.DimensionDOExample"
|
||||
resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List"/>
|
||||
from s2_dimension
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause"/>
|
||||
</if>
|
||||
<if test="orderByClause != null">
|
||||
order by ${orderByClause}
|
||||
</if>
|
||||
<if test="limitStart != null and limitStart>=0">
|
||||
limit #{limitStart} , #{limitEnd}
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
,
|
||||
<include refid="Blob_Column_List"/>
|
||||
from s2_dimension
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete
|
||||
from s2_dimension
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<insert id="insert"
|
||||
parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.DimensionDO">
|
||||
insert into s2_dimension (id, model_id, datasource_id,
|
||||
name, biz_name, description,
|
||||
status, sensitive_level, type,
|
||||
created_at, created_by, updated_at,
|
||||
updated_by, semantic_type, alias,
|
||||
default_values, dim_value_maps, type_params,
|
||||
expr)
|
||||
values (#{id,jdbcType=BIGINT}, #{modelId,jdbcType=BIGINT}, #{datasourceId,jdbcType=BIGINT},
|
||||
#{name,jdbcType=VARCHAR}, #{bizName,jdbcType=VARCHAR},
|
||||
#{description,jdbcType=VARCHAR},
|
||||
#{status,jdbcType=INTEGER}, #{sensitiveLevel,jdbcType=INTEGER},
|
||||
#{type,jdbcType=VARCHAR},
|
||||
#{createdAt,jdbcType=TIMESTAMP}, #{createdBy,jdbcType=VARCHAR},
|
||||
#{updatedAt,jdbcType=TIMESTAMP},
|
||||
#{updatedBy,jdbcType=VARCHAR}, #{semanticType,jdbcType=VARCHAR},
|
||||
#{alias,jdbcType=VARCHAR},
|
||||
#{defaultValues,jdbcType=VARCHAR}, #{dimValueMaps,jdbcType=VARCHAR},
|
||||
#{typeParams,jdbcType=LONGVARCHAR},
|
||||
#{expr,jdbcType=LONGVARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective"
|
||||
parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.DimensionDO">
|
||||
insert into s2_dimension
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
id,
|
||||
</if>
|
||||
<if test="modelId != null">
|
||||
model_id,
|
||||
</if>
|
||||
<if test="datasourceId != null">
|
||||
datasource_id,
|
||||
</if>
|
||||
<if test="name != null">
|
||||
name,
|
||||
</if>
|
||||
<if test="bizName != null">
|
||||
biz_name,
|
||||
</if>
|
||||
<if test="description != null">
|
||||
description,
|
||||
</if>
|
||||
<if test="status != null">
|
||||
status,
|
||||
</if>
|
||||
<if test="sensitiveLevel != null">
|
||||
sensitive_level,
|
||||
</if>
|
||||
<if test="type != null">
|
||||
type,
|
||||
</if>
|
||||
<if test="createdAt != null">
|
||||
created_at,
|
||||
</if>
|
||||
<if test="createdBy != null">
|
||||
created_by,
|
||||
</if>
|
||||
<if test="updatedAt != null">
|
||||
updated_at,
|
||||
</if>
|
||||
<if test="updatedBy != null">
|
||||
updated_by,
|
||||
</if>
|
||||
<if test="semanticType != null">
|
||||
semantic_type,
|
||||
</if>
|
||||
<if test="alias != null">
|
||||
alias,
|
||||
</if>
|
||||
<if test="defaultValues != null">
|
||||
default_values,
|
||||
</if>
|
||||
<if test="dimValueMaps != null">
|
||||
dim_value_maps,
|
||||
</if>
|
||||
<if test="typeParams != null">
|
||||
type_params,
|
||||
</if>
|
||||
<if test="expr != null">
|
||||
expr,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
#{id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="modelId != null">
|
||||
#{modelId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="datasourceId != null">
|
||||
#{datasourceId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
#{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="bizName != null">
|
||||
#{bizName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="description != null">
|
||||
#{description,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
#{status,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="sensitiveLevel != null">
|
||||
#{sensitiveLevel,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="type != null">
|
||||
#{type,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createdAt != null">
|
||||
#{createdAt,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="createdBy != null">
|
||||
#{createdBy,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="updatedAt != null">
|
||||
#{updatedAt,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="updatedBy != null">
|
||||
#{updatedBy,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="semanticType != null">
|
||||
#{semanticType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="alias != null">
|
||||
#{alias,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="defaultValues != null">
|
||||
#{defaultValues,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="dimValueMaps != null">
|
||||
#{dimValueMaps,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="typeParams != null">
|
||||
#{typeParams,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="expr != null">
|
||||
#{expr,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample"
|
||||
parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.DimensionDOExample"
|
||||
resultType="java.lang.Long">
|
||||
select count(*) from s2_dimension
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause"/>
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByPrimaryKeySelective"
|
||||
parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.DimensionDO">
|
||||
update s2_dimension
|
||||
<set>
|
||||
<if test="modelId != null">
|
||||
model_id = #{modelId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="datasourceId != null">
|
||||
datasource_id = #{datasourceId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
name = #{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="bizName != null">
|
||||
biz_name = #{bizName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="description != null">
|
||||
description = #{description,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
status = #{status,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="sensitiveLevel != null">
|
||||
sensitive_level = #{sensitiveLevel,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="type != null">
|
||||
type = #{type,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createdAt != null">
|
||||
created_at = #{createdAt,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="createdBy != null">
|
||||
created_by = #{createdBy,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="updatedAt != null">
|
||||
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="updatedBy != null">
|
||||
updated_by = #{updatedBy,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="semanticType != null">
|
||||
semantic_type = #{semanticType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="alias != null">
|
||||
alias = #{alias,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="defaultValues != null">
|
||||
default_values = #{defaultValues,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="dimValueMaps != null">
|
||||
dim_value_maps = #{dimValueMaps,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="typeParams != null">
|
||||
type_params = #{typeParams,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="expr != null">
|
||||
expr = #{expr,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKeyWithBLOBs"
|
||||
parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.DimensionDO">
|
||||
update s2_dimension
|
||||
set model_id = #{modelId,jdbcType=BIGINT},
|
||||
datasource_id = #{datasourceId,jdbcType=BIGINT},
|
||||
name = #{name,jdbcType=VARCHAR},
|
||||
biz_name = #{bizName,jdbcType=VARCHAR},
|
||||
description = #{description,jdbcType=VARCHAR},
|
||||
status = #{status,jdbcType=INTEGER},
|
||||
sensitive_level = #{sensitiveLevel,jdbcType=INTEGER},
|
||||
type = #{type,jdbcType=VARCHAR},
|
||||
created_at = #{createdAt,jdbcType=TIMESTAMP},
|
||||
created_by = #{createdBy,jdbcType=VARCHAR},
|
||||
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
|
||||
updated_by = #{updatedBy,jdbcType=VARCHAR},
|
||||
semantic_type = #{semanticType,jdbcType=VARCHAR},
|
||||
alias = #{alias,jdbcType=VARCHAR},
|
||||
default_values = #{defaultValues,jdbcType=VARCHAR},
|
||||
dim_value_maps = #{dimValueMaps,jdbcType=VARCHAR},
|
||||
type_params = #{typeParams,jdbcType=LONGVARCHAR},
|
||||
expr = #{expr,jdbcType=LONGVARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey"
|
||||
parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.DimensionDO">
|
||||
update s2_dimension
|
||||
set model_id = #{modelId,jdbcType=BIGINT},
|
||||
datasource_id = #{datasourceId,jdbcType=BIGINT},
|
||||
name = #{name,jdbcType=VARCHAR},
|
||||
biz_name = #{bizName,jdbcType=VARCHAR},
|
||||
description = #{description,jdbcType=VARCHAR},
|
||||
status = #{status,jdbcType=INTEGER},
|
||||
sensitive_level = #{sensitiveLevel,jdbcType=INTEGER},
|
||||
type = #{type,jdbcType=VARCHAR},
|
||||
created_at = #{createdAt,jdbcType=TIMESTAMP},
|
||||
created_by = #{createdBy,jdbcType=VARCHAR},
|
||||
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
|
||||
updated_by = #{updatedBy,jdbcType=VARCHAR},
|
||||
semantic_type = #{semanticType,jdbcType=VARCHAR},
|
||||
alias = #{alias,jdbcType=VARCHAR},
|
||||
default_values = #{defaultValues,jdbcType=VARCHAR},
|
||||
dim_value_maps = #{dimValueMaps,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
type_params, expr
|
||||
</sql>
|
||||
<select id="selectByExampleWithBLOBs" parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.DimensionDOExample" resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
,
|
||||
<include refid="Blob_Column_List" />
|
||||
from s2_dimension
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
<if test="orderByClause != null">
|
||||
order by ${orderByClause}
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectByExample" parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.DimensionDOExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from s2_dimension
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
<if test="orderByClause != null">
|
||||
order by ${orderByClause}
|
||||
</if>
|
||||
<if test="limitStart != null and limitStart>=0">
|
||||
limit #{limitStart} , #{limitEnd}
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
,
|
||||
<include refid="Blob_Column_List" />
|
||||
from s2_dimension
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from s2_dimension
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.DimensionDO">
|
||||
insert into s2_dimension (id, model_id, datasource_id,
|
||||
name, biz_name, description,
|
||||
status, sensitive_level, type,
|
||||
created_at, created_by, updated_at,
|
||||
updated_by, semantic_type, alias,
|
||||
default_values, dim_value_maps, type_params,
|
||||
expr)
|
||||
values (#{id,jdbcType=BIGINT}, #{modelId,jdbcType=BIGINT}, #{datasourceId,jdbcType=BIGINT},
|
||||
#{name,jdbcType=VARCHAR}, #{bizName,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR},
|
||||
#{status,jdbcType=INTEGER}, #{sensitiveLevel,jdbcType=INTEGER}, #{type,jdbcType=VARCHAR},
|
||||
#{createdAt,jdbcType=TIMESTAMP}, #{createdBy,jdbcType=VARCHAR}, #{updatedAt,jdbcType=TIMESTAMP},
|
||||
#{updatedBy,jdbcType=VARCHAR}, #{semanticType,jdbcType=VARCHAR}, #{alias,jdbcType=VARCHAR},
|
||||
#{defaultValues,jdbcType=VARCHAR}, #{dimValueMaps,jdbcType=VARCHAR}, #{typeParams,jdbcType=LONGVARCHAR},
|
||||
#{expr,jdbcType=LONGVARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.DimensionDO">
|
||||
insert into s2_dimension
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
id,
|
||||
</if>
|
||||
<if test="modelId != null">
|
||||
model_id,
|
||||
</if>
|
||||
<if test="datasourceId != null">
|
||||
datasource_id,
|
||||
</if>
|
||||
<if test="name != null">
|
||||
name,
|
||||
</if>
|
||||
<if test="bizName != null">
|
||||
biz_name,
|
||||
</if>
|
||||
<if test="description != null">
|
||||
description,
|
||||
</if>
|
||||
<if test="status != null">
|
||||
status,
|
||||
</if>
|
||||
<if test="sensitiveLevel != null">
|
||||
sensitive_level,
|
||||
</if>
|
||||
<if test="type != null">
|
||||
type,
|
||||
</if>
|
||||
<if test="createdAt != null">
|
||||
created_at,
|
||||
</if>
|
||||
<if test="createdBy != null">
|
||||
created_by,
|
||||
</if>
|
||||
<if test="updatedAt != null">
|
||||
updated_at,
|
||||
</if>
|
||||
<if test="updatedBy != null">
|
||||
updated_by,
|
||||
</if>
|
||||
<if test="semanticType != null">
|
||||
semantic_type,
|
||||
</if>
|
||||
<if test="alias != null">
|
||||
alias,
|
||||
</if>
|
||||
<if test="defaultValues != null">
|
||||
default_values,
|
||||
</if>
|
||||
<if test="dimValueMaps != null">
|
||||
dim_value_maps,
|
||||
</if>
|
||||
<if test="typeParams != null">
|
||||
type_params,
|
||||
</if>
|
||||
<if test="expr != null">
|
||||
expr,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
#{id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="modelId != null">
|
||||
#{modelId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="datasourceId != null">
|
||||
#{datasourceId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
#{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="bizName != null">
|
||||
#{bizName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="description != null">
|
||||
#{description,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
#{status,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="sensitiveLevel != null">
|
||||
#{sensitiveLevel,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="type != null">
|
||||
#{type,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createdAt != null">
|
||||
#{createdAt,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="createdBy != null">
|
||||
#{createdBy,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="updatedAt != null">
|
||||
#{updatedAt,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="updatedBy != null">
|
||||
#{updatedBy,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="semanticType != null">
|
||||
#{semanticType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="alias != null">
|
||||
#{alias,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="defaultValues != null">
|
||||
#{defaultValues,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="dimValueMaps != null">
|
||||
#{dimValueMaps,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="typeParams != null">
|
||||
#{typeParams,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="expr != null">
|
||||
#{expr,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.DimensionDOExample" resultType="java.lang.Long">
|
||||
select count(*) from s2_dimension
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.DimensionDO">
|
||||
update s2_dimension
|
||||
<set>
|
||||
<if test="modelId != null">
|
||||
model_id = #{modelId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="datasourceId != null">
|
||||
datasource_id = #{datasourceId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
name = #{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="bizName != null">
|
||||
biz_name = #{bizName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="description != null">
|
||||
description = #{description,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
status = #{status,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="sensitiveLevel != null">
|
||||
sensitive_level = #{sensitiveLevel,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="type != null">
|
||||
type = #{type,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createdAt != null">
|
||||
created_at = #{createdAt,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="createdBy != null">
|
||||
created_by = #{createdBy,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="updatedAt != null">
|
||||
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="updatedBy != null">
|
||||
updated_by = #{updatedBy,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="semanticType != null">
|
||||
semantic_type = #{semanticType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="alias != null">
|
||||
alias = #{alias,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="defaultValues != null">
|
||||
default_values = #{defaultValues,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="dimValueMaps != null">
|
||||
dim_value_maps = #{dimValueMaps,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="typeParams != null">
|
||||
type_params = #{typeParams,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="expr != null">
|
||||
expr = #{expr,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.DimensionDO">
|
||||
update s2_dimension
|
||||
set model_id = #{modelId,jdbcType=BIGINT},
|
||||
datasource_id = #{datasourceId,jdbcType=BIGINT},
|
||||
name = #{name,jdbcType=VARCHAR},
|
||||
biz_name = #{bizName,jdbcType=VARCHAR},
|
||||
description = #{description,jdbcType=VARCHAR},
|
||||
status = #{status,jdbcType=INTEGER},
|
||||
sensitive_level = #{sensitiveLevel,jdbcType=INTEGER},
|
||||
type = #{type,jdbcType=VARCHAR},
|
||||
created_at = #{createdAt,jdbcType=TIMESTAMP},
|
||||
created_by = #{createdBy,jdbcType=VARCHAR},
|
||||
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
|
||||
updated_by = #{updatedBy,jdbcType=VARCHAR},
|
||||
semantic_type = #{semanticType,jdbcType=VARCHAR},
|
||||
alias = #{alias,jdbcType=VARCHAR},
|
||||
default_values = #{defaultValues,jdbcType=VARCHAR},
|
||||
dim_value_maps = #{dimValueMaps,jdbcType=VARCHAR},
|
||||
type_params = #{typeParams,jdbcType=LONGVARCHAR},
|
||||
expr = #{expr,jdbcType=LONGVARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.DimensionDO">
|
||||
update s2_dimension
|
||||
set model_id = #{modelId,jdbcType=BIGINT},
|
||||
datasource_id = #{datasourceId,jdbcType=BIGINT},
|
||||
name = #{name,jdbcType=VARCHAR},
|
||||
biz_name = #{bizName,jdbcType=VARCHAR},
|
||||
description = #{description,jdbcType=VARCHAR},
|
||||
status = #{status,jdbcType=INTEGER},
|
||||
sensitive_level = #{sensitiveLevel,jdbcType=INTEGER},
|
||||
type = #{type,jdbcType=VARCHAR},
|
||||
created_at = #{createdAt,jdbcType=TIMESTAMP},
|
||||
created_by = #{createdBy,jdbcType=VARCHAR},
|
||||
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
|
||||
updated_by = #{updatedBy,jdbcType=VARCHAR},
|
||||
semantic_type = #{semanticType,jdbcType=VARCHAR},
|
||||
alias = #{alias,jdbcType=VARCHAR},
|
||||
default_values = #{defaultValues,jdbcType=VARCHAR},
|
||||
dim_value_maps = #{dimValueMaps,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
||||
@@ -1,267 +1,251 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<!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.DomainDOMapper">
|
||||
<resultMap id="BaseResultMap"
|
||||
type="com.tencent.supersonic.semantic.model.domain.dataobject.DomainDO">
|
||||
<id column="id" jdbcType="BIGINT" property="id"/>
|
||||
<result column="name" jdbcType="VARCHAR" property="name"/>
|
||||
<result column="biz_name" jdbcType="VARCHAR" property="bizName"/>
|
||||
<result column="parent_id" jdbcType="BIGINT" property="parentId"/>
|
||||
<result column="status" jdbcType="INTEGER" property="status"/>
|
||||
<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="admin" jdbcType="VARCHAR" property="admin"/>
|
||||
<result column="admin_org" jdbcType="VARCHAR" property="adminOrg"/>
|
||||
<result column="is_open" jdbcType="INTEGER" property="isOpen"/>
|
||||
<result column="viewer" jdbcType="VARCHAR" property="viewer"/>
|
||||
<result column="view_org" jdbcType="VARCHAR" property="viewOrg"/>
|
||||
</resultMap>
|
||||
<sql id="Example_Where_Clause">
|
||||
<where>
|
||||
<foreach collection="oredCriteria" item="criteria" separator="or">
|
||||
<if test="criteria.valid">
|
||||
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||
<foreach collection="criteria.criteria" item="criterion">
|
||||
<choose>
|
||||
<when test="criterion.noValue">
|
||||
and ${criterion.condition}
|
||||
</when>
|
||||
<when test="criterion.singleValue">
|
||||
and ${criterion.condition} #{criterion.value}
|
||||
</when>
|
||||
<when test="criterion.betweenValue">
|
||||
and ${criterion.condition} #{criterion.value} and
|
||||
#{criterion.secondValue}
|
||||
</when>
|
||||
<when test="criterion.listValue">
|
||||
and ${criterion.condition}
|
||||
<foreach close=")" collection="criterion.value" item="listItem"
|
||||
open="(" separator=",">
|
||||
#{listItem}
|
||||
</foreach>
|
||||
</when>
|
||||
</choose>
|
||||
</foreach>
|
||||
</trim>
|
||||
</if>
|
||||
<resultMap id="BaseResultMap" type="com.tencent.supersonic.semantic.model.domain.dataobject.DomainDO">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||
<result column="biz_name" jdbcType="VARCHAR" property="bizName" />
|
||||
<result column="parent_id" jdbcType="BIGINT" property="parentId" />
|
||||
<result column="status" jdbcType="INTEGER" property="status" />
|
||||
<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="admin" jdbcType="VARCHAR" property="admin" />
|
||||
<result column="admin_org" jdbcType="VARCHAR" property="adminOrg" />
|
||||
<result column="is_open" jdbcType="INTEGER" property="isOpen" />
|
||||
<result column="viewer" jdbcType="VARCHAR" property="viewer" />
|
||||
<result column="view_org" jdbcType="VARCHAR" property="viewOrg" />
|
||||
</resultMap>
|
||||
<sql id="Example_Where_Clause">
|
||||
<where>
|
||||
<foreach collection="oredCriteria" item="criteria" separator="or">
|
||||
<if test="criteria.valid">
|
||||
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||
<foreach collection="criteria.criteria" item="criterion">
|
||||
<choose>
|
||||
<when test="criterion.noValue">
|
||||
and ${criterion.condition}
|
||||
</when>
|
||||
<when test="criterion.singleValue">
|
||||
and ${criterion.condition} #{criterion.value}
|
||||
</when>
|
||||
<when test="criterion.betweenValue">
|
||||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||
</when>
|
||||
<when test="criterion.listValue">
|
||||
and ${criterion.condition}
|
||||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
||||
#{listItem}
|
||||
</foreach>
|
||||
</when>
|
||||
</choose>
|
||||
</foreach>
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Base_Column_List">
|
||||
id
|
||||
, name, biz_name, parent_id, status, created_at, created_by, updated_at, updated_by,
|
||||
</trim>
|
||||
</if>
|
||||
</foreach>
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Base_Column_List">
|
||||
id, name, biz_name, parent_id, status, created_at, created_by, updated_at, updated_by,
|
||||
admin, admin_org, is_open, viewer, view_org
|
||||
</sql>
|
||||
<select id="selectByExample"
|
||||
parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.DomainDOExample"
|
||||
resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List"/>
|
||||
from s2_domain
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause"/>
|
||||
</if>
|
||||
<if test="orderByClause != null">
|
||||
order by ${orderByClause}
|
||||
</if>
|
||||
<if test="limitStart != null and limitStart>=0">
|
||||
limit #{limitStart} , #{limitEnd}
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from s2_domain
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete
|
||||
from s2_domain
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<insert id="insert"
|
||||
parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.DomainDO">
|
||||
insert into s2_domain (id, name, biz_name,
|
||||
parent_id, status, created_at,
|
||||
created_by, updated_at, updated_by,
|
||||
admin, admin_org, is_open,
|
||||
viewer, view_org)
|
||||
values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{bizName,jdbcType=VARCHAR},
|
||||
#{parentId,jdbcType=BIGINT}, #{status,jdbcType=INTEGER},
|
||||
#{createdAt,jdbcType=TIMESTAMP},
|
||||
#{createdBy,jdbcType=VARCHAR}, #{updatedAt,jdbcType=TIMESTAMP},
|
||||
#{updatedBy,jdbcType=VARCHAR},
|
||||
#{admin,jdbcType=VARCHAR}, #{adminOrg,jdbcType=VARCHAR}, #{isOpen,jdbcType=INTEGER},
|
||||
#{viewer,jdbcType=VARCHAR}, #{viewOrg,jdbcType=VARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective"
|
||||
parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.DomainDO">
|
||||
insert into s2_domain
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
id,
|
||||
</if>
|
||||
<if test="name != null">
|
||||
name,
|
||||
</if>
|
||||
<if test="bizName != null">
|
||||
biz_name,
|
||||
</if>
|
||||
<if test="parentId != null">
|
||||
parent_id,
|
||||
</if>
|
||||
<if test="status != null">
|
||||
status,
|
||||
</if>
|
||||
<if test="createdAt != null">
|
||||
created_at,
|
||||
</if>
|
||||
<if test="createdBy != null">
|
||||
created_by,
|
||||
</if>
|
||||
<if test="updatedAt != null">
|
||||
updated_at,
|
||||
</if>
|
||||
<if test="updatedBy != null">
|
||||
updated_by,
|
||||
</if>
|
||||
<if test="admin != null">
|
||||
admin,
|
||||
</if>
|
||||
<if test="adminOrg != null">
|
||||
admin_org,
|
||||
</if>
|
||||
<if test="isOpen != null">
|
||||
is_open,
|
||||
</if>
|
||||
<if test="viewer != null">
|
||||
viewer,
|
||||
</if>
|
||||
<if test="viewOrg != null">
|
||||
view_org,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
#{id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
#{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="bizName != null">
|
||||
#{bizName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="parentId != null">
|
||||
#{parentId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
#{status,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="createdAt != null">
|
||||
#{createdAt,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="createdBy != null">
|
||||
#{createdBy,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="updatedAt != null">
|
||||
#{updatedAt,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="updatedBy != null">
|
||||
#{updatedBy,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="admin != null">
|
||||
#{admin,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="adminOrg != null">
|
||||
#{adminOrg,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="isOpen != null">
|
||||
#{isOpen,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="viewer != null">
|
||||
#{viewer,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="viewOrg != null">
|
||||
#{viewOrg,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample"
|
||||
parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.DomainDOExample"
|
||||
resultType="java.lang.Long">
|
||||
select count(*) from s2_domain
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause"/>
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByPrimaryKeySelective"
|
||||
parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.DomainDO">
|
||||
update s2_domain
|
||||
<set>
|
||||
<if test="name != null">
|
||||
name = #{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="bizName != null">
|
||||
biz_name = #{bizName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="parentId != null">
|
||||
parent_id = #{parentId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
status = #{status,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="createdAt != null">
|
||||
created_at = #{createdAt,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="createdBy != null">
|
||||
created_by = #{createdBy,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="updatedAt != null">
|
||||
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="updatedBy != null">
|
||||
updated_by = #{updatedBy,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="admin != null">
|
||||
admin = #{admin,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="adminOrg != null">
|
||||
admin_org = #{adminOrg,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="isOpen != null">
|
||||
is_open = #{isOpen,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="viewer != null">
|
||||
viewer = #{viewer,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="viewOrg != null">
|
||||
view_org = #{viewOrg,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey"
|
||||
parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.DomainDO">
|
||||
update s2_domain
|
||||
set name = #{name,jdbcType=VARCHAR},
|
||||
biz_name = #{bizName,jdbcType=VARCHAR},
|
||||
parent_id = #{parentId,jdbcType=BIGINT},
|
||||
status = #{status,jdbcType=INTEGER},
|
||||
created_at = #{createdAt,jdbcType=TIMESTAMP},
|
||||
created_by = #{createdBy,jdbcType=VARCHAR},
|
||||
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
|
||||
updated_by = #{updatedBy,jdbcType=VARCHAR},
|
||||
admin = #{admin,jdbcType=VARCHAR},
|
||||
admin_org = #{adminOrg,jdbcType=VARCHAR},
|
||||
is_open = #{isOpen,jdbcType=INTEGER},
|
||||
viewer = #{viewer,jdbcType=VARCHAR},
|
||||
view_org = #{viewOrg,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.DomainDOExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from s2_domain
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
<if test="orderByClause != null">
|
||||
order by ${orderByClause}
|
||||
</if>
|
||||
<if test="limitStart != null and limitStart>=0">
|
||||
limit #{limitStart} , #{limitEnd}
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from s2_domain
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from s2_domain
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.DomainDO">
|
||||
insert into s2_domain (id, name, biz_name,
|
||||
parent_id, status, created_at,
|
||||
created_by, updated_at, updated_by,
|
||||
admin, admin_org, is_open,
|
||||
viewer, view_org)
|
||||
values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{bizName,jdbcType=VARCHAR},
|
||||
#{parentId,jdbcType=BIGINT}, #{status,jdbcType=INTEGER}, #{createdAt,jdbcType=TIMESTAMP},
|
||||
#{createdBy,jdbcType=VARCHAR}, #{updatedAt,jdbcType=TIMESTAMP}, #{updatedBy,jdbcType=VARCHAR},
|
||||
#{admin,jdbcType=VARCHAR}, #{adminOrg,jdbcType=VARCHAR}, #{isOpen,jdbcType=INTEGER},
|
||||
#{viewer,jdbcType=VARCHAR}, #{viewOrg,jdbcType=VARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.DomainDO">
|
||||
insert into s2_domain
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
id,
|
||||
</if>
|
||||
<if test="name != null">
|
||||
name,
|
||||
</if>
|
||||
<if test="bizName != null">
|
||||
biz_name,
|
||||
</if>
|
||||
<if test="parentId != null">
|
||||
parent_id,
|
||||
</if>
|
||||
<if test="status != null">
|
||||
status,
|
||||
</if>
|
||||
<if test="createdAt != null">
|
||||
created_at,
|
||||
</if>
|
||||
<if test="createdBy != null">
|
||||
created_by,
|
||||
</if>
|
||||
<if test="updatedAt != null">
|
||||
updated_at,
|
||||
</if>
|
||||
<if test="updatedBy != null">
|
||||
updated_by,
|
||||
</if>
|
||||
<if test="admin != null">
|
||||
admin,
|
||||
</if>
|
||||
<if test="adminOrg != null">
|
||||
admin_org,
|
||||
</if>
|
||||
<if test="isOpen != null">
|
||||
is_open,
|
||||
</if>
|
||||
<if test="viewer != null">
|
||||
viewer,
|
||||
</if>
|
||||
<if test="viewOrg != null">
|
||||
view_org,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
#{id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
#{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="bizName != null">
|
||||
#{bizName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="parentId != null">
|
||||
#{parentId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
#{status,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="createdAt != null">
|
||||
#{createdAt,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="createdBy != null">
|
||||
#{createdBy,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="updatedAt != null">
|
||||
#{updatedAt,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="updatedBy != null">
|
||||
#{updatedBy,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="admin != null">
|
||||
#{admin,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="adminOrg != null">
|
||||
#{adminOrg,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="isOpen != null">
|
||||
#{isOpen,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="viewer != null">
|
||||
#{viewer,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="viewOrg != null">
|
||||
#{viewOrg,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.DomainDOExample" resultType="java.lang.Long">
|
||||
select count(*) from s2_domain
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.DomainDO">
|
||||
update s2_domain
|
||||
<set>
|
||||
<if test="name != null">
|
||||
name = #{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="bizName != null">
|
||||
biz_name = #{bizName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="parentId != null">
|
||||
parent_id = #{parentId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
status = #{status,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="createdAt != null">
|
||||
created_at = #{createdAt,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="createdBy != null">
|
||||
created_by = #{createdBy,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="updatedAt != null">
|
||||
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="updatedBy != null">
|
||||
updated_by = #{updatedBy,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="admin != null">
|
||||
admin = #{admin,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="adminOrg != null">
|
||||
admin_org = #{adminOrg,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="isOpen != null">
|
||||
is_open = #{isOpen,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="viewer != null">
|
||||
viewer = #{viewer,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="viewOrg != null">
|
||||
view_org = #{viewOrg,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.DomainDO">
|
||||
update s2_domain
|
||||
set name = #{name,jdbcType=VARCHAR},
|
||||
biz_name = #{bizName,jdbcType=VARCHAR},
|
||||
parent_id = #{parentId,jdbcType=BIGINT},
|
||||
status = #{status,jdbcType=INTEGER},
|
||||
created_at = #{createdAt,jdbcType=TIMESTAMP},
|
||||
created_by = #{createdBy,jdbcType=VARCHAR},
|
||||
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
|
||||
updated_by = #{updatedBy,jdbcType=VARCHAR},
|
||||
admin = #{admin,jdbcType=VARCHAR},
|
||||
admin_org = #{adminOrg,jdbcType=VARCHAR},
|
||||
is_open = #{isOpen,jdbcType=INTEGER},
|
||||
viewer = #{viewer,jdbcType=VARCHAR},
|
||||
view_org = #{viewOrg,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
||||
@@ -1,338 +1,316 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<!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.MetricDOMapper">
|
||||
<resultMap id="BaseResultMap"
|
||||
type="com.tencent.supersonic.semantic.model.domain.dataobject.MetricDO">
|
||||
<id column="id" jdbcType="BIGINT" property="id"/>
|
||||
<result column="model_id" jdbcType="BIGINT" property="modelId"/>
|
||||
<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="data_format_type" jdbcType="VARCHAR" property="dataFormatType"/>
|
||||
<result column="data_format" jdbcType="VARCHAR" property="dataFormat"/>
|
||||
<result column="alias" jdbcType="VARCHAR" property="alias"/>
|
||||
</resultMap>
|
||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs"
|
||||
type="com.tencent.supersonic.semantic.model.domain.dataobject.MetricDO">
|
||||
<result column="type_params" jdbcType="LONGVARCHAR" property="typeParams"/>
|
||||
</resultMap>
|
||||
<sql id="Example_Where_Clause">
|
||||
<where>
|
||||
<foreach collection="oredCriteria" item="criteria" separator="or">
|
||||
<if test="criteria.valid">
|
||||
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||
<foreach collection="criteria.criteria" item="criterion">
|
||||
<choose>
|
||||
<when test="criterion.noValue">
|
||||
and ${criterion.condition}
|
||||
</when>
|
||||
<when test="criterion.singleValue">
|
||||
and ${criterion.condition} #{criterion.value}
|
||||
</when>
|
||||
<when test="criterion.betweenValue">
|
||||
and ${criterion.condition} #{criterion.value} and
|
||||
#{criterion.secondValue}
|
||||
</when>
|
||||
<when test="criterion.listValue">
|
||||
and ${criterion.condition}
|
||||
<foreach close=")" collection="criterion.value" item="listItem"
|
||||
open="(" separator=",">
|
||||
#{listItem}
|
||||
</foreach>
|
||||
</when>
|
||||
</choose>
|
||||
</foreach>
|
||||
</trim>
|
||||
</if>
|
||||
<resultMap id="BaseResultMap" type="com.tencent.supersonic.semantic.model.domain.dataobject.MetricDO">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="model_id" jdbcType="BIGINT" property="modelId" />
|
||||
<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="data_format_type" jdbcType="VARCHAR" property="dataFormatType" />
|
||||
<result column="data_format" jdbcType="VARCHAR" property="dataFormat" />
|
||||
<result column="alias" jdbcType="VARCHAR" property="alias" />
|
||||
</resultMap>
|
||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.tencent.supersonic.semantic.model.domain.dataobject.MetricDO">
|
||||
<result column="type_params" jdbcType="LONGVARCHAR" property="typeParams" />
|
||||
</resultMap>
|
||||
<sql id="Example_Where_Clause">
|
||||
<where>
|
||||
<foreach collection="oredCriteria" item="criteria" separator="or">
|
||||
<if test="criteria.valid">
|
||||
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||
<foreach collection="criteria.criteria" item="criterion">
|
||||
<choose>
|
||||
<when test="criterion.noValue">
|
||||
and ${criterion.condition}
|
||||
</when>
|
||||
<when test="criterion.singleValue">
|
||||
and ${criterion.condition} #{criterion.value}
|
||||
</when>
|
||||
<when test="criterion.betweenValue">
|
||||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||
</when>
|
||||
<when test="criterion.listValue">
|
||||
and ${criterion.condition}
|
||||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
||||
#{listItem}
|
||||
</foreach>
|
||||
</when>
|
||||
</choose>
|
||||
</foreach>
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Base_Column_List">
|
||||
id
|
||||
, model_id, name, biz_name, description, status, sensitive_level, type, created_at,
|
||||
</trim>
|
||||
</if>
|
||||
</foreach>
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Base_Column_List">
|
||||
id, model_id, name, biz_name, description, status, sensitive_level, type, created_at,
|
||||
created_by, updated_at, updated_by, data_format_type, data_format, alias
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
type_params
|
||||
</sql>
|
||||
<select id="selectByExampleWithBLOBs"
|
||||
parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.MetricDOExample"
|
||||
resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List"/>
|
||||
,
|
||||
<include refid="Blob_Column_List"/>
|
||||
from s2_metric
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause"/>
|
||||
</if>
|
||||
<if test="orderByClause != null">
|
||||
order by ${orderByClause}
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectByExample"
|
||||
parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.MetricDOExample"
|
||||
resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List"/>
|
||||
from s2_metric
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause"/>
|
||||
</if>
|
||||
<if test="orderByClause != null">
|
||||
order by ${orderByClause}
|
||||
</if>
|
||||
<if test="limitStart != null and limitStart>=0">
|
||||
limit #{limitStart} , #{limitEnd}
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
,
|
||||
<include refid="Blob_Column_List"/>
|
||||
from s2_metric
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete
|
||||
from s2_metric
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<insert id="insert"
|
||||
parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.MetricDO">
|
||||
insert into s2_metric (id, model_id, name,
|
||||
biz_name, description, status,
|
||||
sensitive_level, type, created_at,
|
||||
created_by, updated_at, updated_by,
|
||||
data_format_type, data_format, alias,
|
||||
type_params)
|
||||
values (#{id,jdbcType=BIGINT}, #{modelId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR},
|
||||
#{bizName,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR},
|
||||
#{status,jdbcType=INTEGER},
|
||||
#{sensitiveLevel,jdbcType=INTEGER}, #{type,jdbcType=VARCHAR},
|
||||
#{createdAt,jdbcType=TIMESTAMP},
|
||||
#{createdBy,jdbcType=VARCHAR}, #{updatedAt,jdbcType=TIMESTAMP},
|
||||
#{updatedBy,jdbcType=VARCHAR},
|
||||
#{dataFormatType,jdbcType=VARCHAR}, #{dataFormat,jdbcType=VARCHAR},
|
||||
#{alias,jdbcType=VARCHAR},
|
||||
#{typeParams,jdbcType=LONGVARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective"
|
||||
parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.MetricDO">
|
||||
insert into s2_metric
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
id,
|
||||
</if>
|
||||
<if test="modelId != null">
|
||||
model_id,
|
||||
</if>
|
||||
<if test="name != null">
|
||||
name,
|
||||
</if>
|
||||
<if test="bizName != null">
|
||||
biz_name,
|
||||
</if>
|
||||
<if test="description != null">
|
||||
description,
|
||||
</if>
|
||||
<if test="status != null">
|
||||
status,
|
||||
</if>
|
||||
<if test="sensitiveLevel != null">
|
||||
sensitive_level,
|
||||
</if>
|
||||
<if test="type != null">
|
||||
type,
|
||||
</if>
|
||||
<if test="createdAt != null">
|
||||
created_at,
|
||||
</if>
|
||||
<if test="createdBy != null">
|
||||
created_by,
|
||||
</if>
|
||||
<if test="updatedAt != null">
|
||||
updated_at,
|
||||
</if>
|
||||
<if test="updatedBy != null">
|
||||
updated_by,
|
||||
</if>
|
||||
<if test="dataFormatType != null">
|
||||
data_format_type,
|
||||
</if>
|
||||
<if test="dataFormat != null">
|
||||
data_format,
|
||||
</if>
|
||||
<if test="alias != null">
|
||||
alias,
|
||||
</if>
|
||||
<if test="typeParams != null">
|
||||
type_params,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
#{id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="modelId != null">
|
||||
#{modelId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
#{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="bizName != null">
|
||||
#{bizName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="description != null">
|
||||
#{description,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
#{status,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="sensitiveLevel != null">
|
||||
#{sensitiveLevel,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="type != null">
|
||||
#{type,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createdAt != null">
|
||||
#{createdAt,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="createdBy != null">
|
||||
#{createdBy,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="updatedAt != null">
|
||||
#{updatedAt,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="updatedBy != null">
|
||||
#{updatedBy,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="dataFormatType != null">
|
||||
#{dataFormatType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="dataFormat != null">
|
||||
#{dataFormat,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="alias != null">
|
||||
#{alias,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="typeParams != null">
|
||||
#{typeParams,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample"
|
||||
parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.MetricDOExample"
|
||||
resultType="java.lang.Long">
|
||||
select count(*) from s2_metric
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause"/>
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByPrimaryKeySelective"
|
||||
parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.MetricDO">
|
||||
update s2_metric
|
||||
<set>
|
||||
<if test="modelId != null">
|
||||
model_id = #{modelId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
name = #{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="bizName != null">
|
||||
biz_name = #{bizName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="description != null">
|
||||
description = #{description,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
status = #{status,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="sensitiveLevel != null">
|
||||
sensitive_level = #{sensitiveLevel,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="type != null">
|
||||
type = #{type,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createdAt != null">
|
||||
created_at = #{createdAt,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="createdBy != null">
|
||||
created_by = #{createdBy,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="updatedAt != null">
|
||||
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="updatedBy != null">
|
||||
updated_by = #{updatedBy,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="dataFormatType != null">
|
||||
data_format_type = #{dataFormatType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="dataFormat != null">
|
||||
data_format = #{dataFormat,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="alias != null">
|
||||
alias = #{alias,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="typeParams != null">
|
||||
type_params = #{typeParams,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKeyWithBLOBs"
|
||||
parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.MetricDO">
|
||||
update s2_metric
|
||||
set model_id = #{modelId,jdbcType=BIGINT},
|
||||
name = #{name,jdbcType=VARCHAR},
|
||||
biz_name = #{bizName,jdbcType=VARCHAR},
|
||||
description = #{description,jdbcType=VARCHAR},
|
||||
status = #{status,jdbcType=INTEGER},
|
||||
sensitive_level = #{sensitiveLevel,jdbcType=INTEGER},
|
||||
type = #{type,jdbcType=VARCHAR},
|
||||
created_at = #{createdAt,jdbcType=TIMESTAMP},
|
||||
created_by = #{createdBy,jdbcType=VARCHAR},
|
||||
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
|
||||
updated_by = #{updatedBy,jdbcType=VARCHAR},
|
||||
data_format_type = #{dataFormatType,jdbcType=VARCHAR},
|
||||
data_format = #{dataFormat,jdbcType=VARCHAR},
|
||||
alias = #{alias,jdbcType=VARCHAR},
|
||||
type_params = #{typeParams,jdbcType=LONGVARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey"
|
||||
parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.MetricDO">
|
||||
update s2_metric
|
||||
set model_id = #{modelId,jdbcType=BIGINT},
|
||||
name = #{name,jdbcType=VARCHAR},
|
||||
biz_name = #{bizName,jdbcType=VARCHAR},
|
||||
description = #{description,jdbcType=VARCHAR},
|
||||
status = #{status,jdbcType=INTEGER},
|
||||
sensitive_level = #{sensitiveLevel,jdbcType=INTEGER},
|
||||
type = #{type,jdbcType=VARCHAR},
|
||||
created_at = #{createdAt,jdbcType=TIMESTAMP},
|
||||
created_by = #{createdBy,jdbcType=VARCHAR},
|
||||
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
|
||||
updated_by = #{updatedBy,jdbcType=VARCHAR},
|
||||
data_format_type = #{dataFormatType,jdbcType=VARCHAR},
|
||||
data_format = #{dataFormat,jdbcType=VARCHAR},
|
||||
alias = #{alias,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
type_params
|
||||
</sql>
|
||||
<select id="selectByExampleWithBLOBs" parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.MetricDOExample" resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
,
|
||||
<include refid="Blob_Column_List" />
|
||||
from s2_metric
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
<if test="orderByClause != null">
|
||||
order by ${orderByClause}
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectByExample" parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.MetricDOExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from s2_metric
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
<if test="orderByClause != null">
|
||||
order by ${orderByClause}
|
||||
</if>
|
||||
<if test="limitStart != null and limitStart>=0">
|
||||
limit #{limitStart} , #{limitEnd}
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
,
|
||||
<include refid="Blob_Column_List" />
|
||||
from s2_metric
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from s2_metric
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.MetricDO">
|
||||
insert into s2_metric (id, model_id, name,
|
||||
biz_name, description, status,
|
||||
sensitive_level, type, created_at,
|
||||
created_by, updated_at, updated_by,
|
||||
data_format_type, data_format, alias,
|
||||
type_params)
|
||||
values (#{id,jdbcType=BIGINT}, #{modelId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR},
|
||||
#{bizName,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER},
|
||||
#{sensitiveLevel,jdbcType=INTEGER}, #{type,jdbcType=VARCHAR}, #{createdAt,jdbcType=TIMESTAMP},
|
||||
#{createdBy,jdbcType=VARCHAR}, #{updatedAt,jdbcType=TIMESTAMP}, #{updatedBy,jdbcType=VARCHAR},
|
||||
#{dataFormatType,jdbcType=VARCHAR}, #{dataFormat,jdbcType=VARCHAR}, #{alias,jdbcType=VARCHAR},
|
||||
#{typeParams,jdbcType=LONGVARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.MetricDO">
|
||||
insert into s2_metric
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
id,
|
||||
</if>
|
||||
<if test="modelId != null">
|
||||
model_id,
|
||||
</if>
|
||||
<if test="name != null">
|
||||
name,
|
||||
</if>
|
||||
<if test="bizName != null">
|
||||
biz_name,
|
||||
</if>
|
||||
<if test="description != null">
|
||||
description,
|
||||
</if>
|
||||
<if test="status != null">
|
||||
status,
|
||||
</if>
|
||||
<if test="sensitiveLevel != null">
|
||||
sensitive_level,
|
||||
</if>
|
||||
<if test="type != null">
|
||||
type,
|
||||
</if>
|
||||
<if test="createdAt != null">
|
||||
created_at,
|
||||
</if>
|
||||
<if test="createdBy != null">
|
||||
created_by,
|
||||
</if>
|
||||
<if test="updatedAt != null">
|
||||
updated_at,
|
||||
</if>
|
||||
<if test="updatedBy != null">
|
||||
updated_by,
|
||||
</if>
|
||||
<if test="dataFormatType != null">
|
||||
data_format_type,
|
||||
</if>
|
||||
<if test="dataFormat != null">
|
||||
data_format,
|
||||
</if>
|
||||
<if test="alias != null">
|
||||
alias,
|
||||
</if>
|
||||
<if test="typeParams != null">
|
||||
type_params,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
#{id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="modelId != null">
|
||||
#{modelId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
#{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="bizName != null">
|
||||
#{bizName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="description != null">
|
||||
#{description,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
#{status,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="sensitiveLevel != null">
|
||||
#{sensitiveLevel,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="type != null">
|
||||
#{type,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createdAt != null">
|
||||
#{createdAt,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="createdBy != null">
|
||||
#{createdBy,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="updatedAt != null">
|
||||
#{updatedAt,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="updatedBy != null">
|
||||
#{updatedBy,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="dataFormatType != null">
|
||||
#{dataFormatType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="dataFormat != null">
|
||||
#{dataFormat,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="alias != null">
|
||||
#{alias,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="typeParams != null">
|
||||
#{typeParams,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.MetricDOExample" resultType="java.lang.Long">
|
||||
select count(*) from s2_metric
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.MetricDO">
|
||||
update s2_metric
|
||||
<set>
|
||||
<if test="modelId != null">
|
||||
model_id = #{modelId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
name = #{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="bizName != null">
|
||||
biz_name = #{bizName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="description != null">
|
||||
description = #{description,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
status = #{status,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="sensitiveLevel != null">
|
||||
sensitive_level = #{sensitiveLevel,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="type != null">
|
||||
type = #{type,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createdAt != null">
|
||||
created_at = #{createdAt,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="createdBy != null">
|
||||
created_by = #{createdBy,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="updatedAt != null">
|
||||
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="updatedBy != null">
|
||||
updated_by = #{updatedBy,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="dataFormatType != null">
|
||||
data_format_type = #{dataFormatType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="dataFormat != null">
|
||||
data_format = #{dataFormat,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="alias != null">
|
||||
alias = #{alias,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="typeParams != null">
|
||||
type_params = #{typeParams,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.MetricDO">
|
||||
update s2_metric
|
||||
set model_id = #{modelId,jdbcType=BIGINT},
|
||||
name = #{name,jdbcType=VARCHAR},
|
||||
biz_name = #{bizName,jdbcType=VARCHAR},
|
||||
description = #{description,jdbcType=VARCHAR},
|
||||
status = #{status,jdbcType=INTEGER},
|
||||
sensitive_level = #{sensitiveLevel,jdbcType=INTEGER},
|
||||
type = #{type,jdbcType=VARCHAR},
|
||||
created_at = #{createdAt,jdbcType=TIMESTAMP},
|
||||
created_by = #{createdBy,jdbcType=VARCHAR},
|
||||
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
|
||||
updated_by = #{updatedBy,jdbcType=VARCHAR},
|
||||
data_format_type = #{dataFormatType,jdbcType=VARCHAR},
|
||||
data_format = #{dataFormat,jdbcType=VARCHAR},
|
||||
alias = #{alias,jdbcType=VARCHAR},
|
||||
type_params = #{typeParams,jdbcType=LONGVARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.MetricDO">
|
||||
update s2_metric
|
||||
set model_id = #{modelId,jdbcType=BIGINT},
|
||||
name = #{name,jdbcType=VARCHAR},
|
||||
biz_name = #{bizName,jdbcType=VARCHAR},
|
||||
description = #{description,jdbcType=VARCHAR},
|
||||
status = #{status,jdbcType=INTEGER},
|
||||
sensitive_level = #{sensitiveLevel,jdbcType=INTEGER},
|
||||
type = #{type,jdbcType=VARCHAR},
|
||||
created_at = #{createdAt,jdbcType=TIMESTAMP},
|
||||
created_by = #{createdBy,jdbcType=VARCHAR},
|
||||
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
|
||||
updated_by = #{updatedBy,jdbcType=VARCHAR},
|
||||
data_format_type = #{dataFormatType,jdbcType=VARCHAR},
|
||||
data_format = #{dataFormat,jdbcType=VARCHAR},
|
||||
alias = #{alias,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
||||
@@ -1,430 +1,408 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<!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.ModelDOMapper">
|
||||
<resultMap id="BaseResultMap"
|
||||
type="com.tencent.supersonic.semantic.model.domain.dataobject.ModelDO">
|
||||
<id column="id" jdbcType="BIGINT" property="id"/>
|
||||
<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="viewer" jdbcType="VARCHAR" property="viewer"/>
|
||||
<result column="view_org" jdbcType="VARCHAR" property="viewOrg"/>
|
||||
<result column="admin" jdbcType="VARCHAR" property="admin"/>
|
||||
<result column="admin_org" jdbcType="VARCHAR" property="adminOrg"/>
|
||||
<result column="is_open" jdbcType="INTEGER" property="isOpen"/>
|
||||
<result column="created_by" jdbcType="VARCHAR" property="createdBy"/>
|
||||
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt"/>
|
||||
<result column="updated_by" jdbcType="VARCHAR" property="updatedBy"/>
|
||||
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt"/>
|
||||
</resultMap>
|
||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs"
|
||||
type="com.tencent.supersonic.semantic.model.domain.dataobject.ModelDO">
|
||||
<result column="entity" jdbcType="LONGVARCHAR" property="entity"/>
|
||||
</resultMap>
|
||||
<sql id="Example_Where_Clause">
|
||||
<where>
|
||||
<foreach collection="oredCriteria" item="criteria" separator="or">
|
||||
<if test="criteria.valid">
|
||||
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||
<foreach collection="criteria.criteria" item="criterion">
|
||||
<choose>
|
||||
<when test="criterion.noValue">
|
||||
and ${criterion.condition}
|
||||
</when>
|
||||
<when test="criterion.singleValue">
|
||||
and ${criterion.condition} #{criterion.value}
|
||||
</when>
|
||||
<when test="criterion.betweenValue">
|
||||
and ${criterion.condition} #{criterion.value} and
|
||||
#{criterion.secondValue}
|
||||
</when>
|
||||
<when test="criterion.listValue">
|
||||
and ${criterion.condition}
|
||||
<foreach close=")" collection="criterion.value" item="listItem"
|
||||
open="(" separator=",">
|
||||
#{listItem}
|
||||
</foreach>
|
||||
</when>
|
||||
</choose>
|
||||
</foreach>
|
||||
</trim>
|
||||
</if>
|
||||
<resultMap id="BaseResultMap" type="com.tencent.supersonic.semantic.model.domain.dataobject.ModelDO">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<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="viewer" jdbcType="VARCHAR" property="viewer" />
|
||||
<result column="view_org" jdbcType="VARCHAR" property="viewOrg" />
|
||||
<result column="admin" jdbcType="VARCHAR" property="admin" />
|
||||
<result column="admin_org" jdbcType="VARCHAR" property="adminOrg" />
|
||||
<result column="is_open" jdbcType="INTEGER" property="isOpen" />
|
||||
<result column="created_by" jdbcType="VARCHAR" property="createdBy" />
|
||||
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" />
|
||||
<result column="updated_by" jdbcType="VARCHAR" property="updatedBy" />
|
||||
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" />
|
||||
</resultMap>
|
||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.tencent.supersonic.semantic.model.domain.dataobject.ModelDO">
|
||||
<result column="entity" jdbcType="LONGVARCHAR" property="entity" />
|
||||
</resultMap>
|
||||
<sql id="Example_Where_Clause">
|
||||
<where>
|
||||
<foreach collection="oredCriteria" item="criteria" separator="or">
|
||||
<if test="criteria.valid">
|
||||
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||
<foreach collection="criteria.criteria" item="criterion">
|
||||
<choose>
|
||||
<when test="criterion.noValue">
|
||||
and ${criterion.condition}
|
||||
</when>
|
||||
<when test="criterion.singleValue">
|
||||
and ${criterion.condition} #{criterion.value}
|
||||
</when>
|
||||
<when test="criterion.betweenValue">
|
||||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||
</when>
|
||||
<when test="criterion.listValue">
|
||||
and ${criterion.condition}
|
||||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
||||
#{listItem}
|
||||
</foreach>
|
||||
</when>
|
||||
</choose>
|
||||
</foreach>
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Update_By_Example_Where_Clause">
|
||||
<where>
|
||||
<foreach collection="example.oredCriteria" item="criteria" separator="or">
|
||||
<if test="criteria.valid">
|
||||
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||
<foreach collection="criteria.criteria" item="criterion">
|
||||
<choose>
|
||||
<when test="criterion.noValue">
|
||||
and ${criterion.condition}
|
||||
</when>
|
||||
<when test="criterion.singleValue">
|
||||
and ${criterion.condition} #{criterion.value}
|
||||
</when>
|
||||
<when test="criterion.betweenValue">
|
||||
and ${criterion.condition} #{criterion.value} and
|
||||
#{criterion.secondValue}
|
||||
</when>
|
||||
<when test="criterion.listValue">
|
||||
and ${criterion.condition}
|
||||
<foreach close=")" collection="criterion.value" item="listItem"
|
||||
open="(" separator=",">
|
||||
#{listItem}
|
||||
</foreach>
|
||||
</when>
|
||||
</choose>
|
||||
</foreach>
|
||||
</trim>
|
||||
</if>
|
||||
</trim>
|
||||
</if>
|
||||
</foreach>
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Update_By_Example_Where_Clause">
|
||||
<where>
|
||||
<foreach collection="example.oredCriteria" item="criteria" separator="or">
|
||||
<if test="criteria.valid">
|
||||
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||
<foreach collection="criteria.criteria" item="criterion">
|
||||
<choose>
|
||||
<when test="criterion.noValue">
|
||||
and ${criterion.condition}
|
||||
</when>
|
||||
<when test="criterion.singleValue">
|
||||
and ${criterion.condition} #{criterion.value}
|
||||
</when>
|
||||
<when test="criterion.betweenValue">
|
||||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||
</when>
|
||||
<when test="criterion.listValue">
|
||||
and ${criterion.condition}
|
||||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
||||
#{listItem}
|
||||
</foreach>
|
||||
</when>
|
||||
</choose>
|
||||
</foreach>
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Base_Column_List">
|
||||
id
|
||||
, name, biz_name, domain_id, viewer, view_org, admin, admin_org, is_open, created_by,
|
||||
</trim>
|
||||
</if>
|
||||
</foreach>
|
||||
</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
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
entity
|
||||
</sql>
|
||||
<select id="selectByExampleWithBLOBs"
|
||||
parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.ModelDOExample"
|
||||
resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List"/>
|
||||
,
|
||||
<include refid="Blob_Column_List"/>
|
||||
from s2_model
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause"/>
|
||||
</if>
|
||||
<if test="orderByClause != null">
|
||||
order by ${orderByClause}
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectByExample"
|
||||
parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.ModelDOExample"
|
||||
resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List"/>
|
||||
from s2_model
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause"/>
|
||||
</if>
|
||||
<if test="orderByClause != null">
|
||||
order by ${orderByClause}
|
||||
</if>
|
||||
<if test="limitStart != null and limitStart>=0">
|
||||
limit #{limitStart} , #{limitEnd}
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
,
|
||||
<include refid="Blob_Column_List"/>
|
||||
from s2_model
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete
|
||||
from s2_model
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</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)
|
||||
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})
|
||||
</insert>
|
||||
<insert id="insertSelective"
|
||||
parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.ModelDO">
|
||||
insert into s2_model
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
id,
|
||||
</if>
|
||||
<if test="name != null">
|
||||
name,
|
||||
</if>
|
||||
<if test="bizName != null">
|
||||
biz_name,
|
||||
</if>
|
||||
<if test="domainId != null">
|
||||
domain_id,
|
||||
</if>
|
||||
<if test="viewer != null">
|
||||
viewer,
|
||||
</if>
|
||||
<if test="viewOrg != null">
|
||||
view_org,
|
||||
</if>
|
||||
<if test="admin != null">
|
||||
admin,
|
||||
</if>
|
||||
<if test="adminOrg != null">
|
||||
admin_org,
|
||||
</if>
|
||||
<if test="isOpen != null">
|
||||
is_open,
|
||||
</if>
|
||||
<if test="createdBy != null">
|
||||
created_by,
|
||||
</if>
|
||||
<if test="createdAt != null">
|
||||
created_at,
|
||||
</if>
|
||||
<if test="updatedBy != null">
|
||||
updated_by,
|
||||
</if>
|
||||
<if test="updatedAt != null">
|
||||
updated_at,
|
||||
</if>
|
||||
<if test="entity != null">
|
||||
entity,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
#{id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
#{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="bizName != null">
|
||||
#{bizName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="domainId != null">
|
||||
#{domainId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="viewer != null">
|
||||
#{viewer,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="viewOrg != null">
|
||||
#{viewOrg,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="admin != null">
|
||||
#{admin,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="adminOrg != null">
|
||||
#{adminOrg,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="isOpen != null">
|
||||
#{isOpen,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="createdBy != null">
|
||||
#{createdBy,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createdAt != null">
|
||||
#{createdAt,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="updatedBy != null">
|
||||
#{updatedBy,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="updatedAt != null">
|
||||
#{updatedAt,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="entity != null">
|
||||
#{entity,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample"
|
||||
parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.ModelDOExample"
|
||||
resultType="java.lang.Long">
|
||||
select count(*) from s2_model
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause"/>
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update s2_model
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.name != null">
|
||||
name = #{record.name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.bizName != null">
|
||||
biz_name = #{record.bizName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.domainId != null">
|
||||
domain_id = #{record.domainId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.viewer != null">
|
||||
viewer = #{record.viewer,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.viewOrg != null">
|
||||
view_org = #{record.viewOrg,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.admin != null">
|
||||
admin = #{record.admin,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.adminOrg != null">
|
||||
admin_org = #{record.adminOrg,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.isOpen != null">
|
||||
is_open = #{record.isOpen,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.createdBy != null">
|
||||
created_by = #{record.createdBy,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.createdAt != null">
|
||||
created_at = #{record.createdAt,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="record.updatedBy != null">
|
||||
updated_by = #{record.updatedBy,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.updatedAt != null">
|
||||
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="record.entity != null">
|
||||
entity = #{record.entity,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause"/>
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExampleWithBLOBs" parameterType="map">
|
||||
update s2_model
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
entity
|
||||
</sql>
|
||||
<select id="selectByExampleWithBLOBs" parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.ModelDOExample" resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
,
|
||||
<include refid="Blob_Column_List" />
|
||||
from s2_model
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
<if test="orderByClause != null">
|
||||
order by ${orderByClause}
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectByExample" parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.ModelDOExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from s2_model
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
<if test="orderByClause != null">
|
||||
order by ${orderByClause}
|
||||
</if>
|
||||
<if test="limitStart != null and limitStart>=0">
|
||||
limit #{limitStart} , #{limitEnd}
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
,
|
||||
<include refid="Blob_Column_List" />
|
||||
from s2_model
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from s2_model
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</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)
|
||||
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})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.ModelDO">
|
||||
insert into s2_model
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
id,
|
||||
</if>
|
||||
<if test="name != null">
|
||||
name,
|
||||
</if>
|
||||
<if test="bizName != null">
|
||||
biz_name,
|
||||
</if>
|
||||
<if test="domainId != null">
|
||||
domain_id,
|
||||
</if>
|
||||
<if test="viewer != null">
|
||||
viewer,
|
||||
</if>
|
||||
<if test="viewOrg != null">
|
||||
view_org,
|
||||
</if>
|
||||
<if test="admin != null">
|
||||
admin,
|
||||
</if>
|
||||
<if test="adminOrg != null">
|
||||
admin_org,
|
||||
</if>
|
||||
<if test="isOpen != null">
|
||||
is_open,
|
||||
</if>
|
||||
<if test="createdBy != null">
|
||||
created_by,
|
||||
</if>
|
||||
<if test="createdAt != null">
|
||||
created_at,
|
||||
</if>
|
||||
<if test="updatedBy != null">
|
||||
updated_by,
|
||||
</if>
|
||||
<if test="updatedAt != null">
|
||||
updated_at,
|
||||
</if>
|
||||
<if test="entity != null">
|
||||
entity,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
#{id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
#{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="bizName != null">
|
||||
#{bizName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="domainId != null">
|
||||
#{domainId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="viewer != null">
|
||||
#{viewer,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="viewOrg != null">
|
||||
#{viewOrg,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="admin != null">
|
||||
#{admin,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="adminOrg != null">
|
||||
#{adminOrg,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="isOpen != null">
|
||||
#{isOpen,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="createdBy != null">
|
||||
#{createdBy,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createdAt != null">
|
||||
#{createdAt,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="updatedBy != null">
|
||||
#{updatedBy,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="updatedAt != null">
|
||||
#{updatedAt,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="entity != null">
|
||||
#{entity,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.ModelDOExample" resultType="java.lang.Long">
|
||||
select count(*) from s2_model
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update s2_model
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.name != null">
|
||||
name = #{record.name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.bizName != null">
|
||||
biz_name = #{record.bizName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.domainId != null">
|
||||
domain_id = #{record.domainId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.viewer != null">
|
||||
viewer = #{record.viewer,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.viewOrg != null">
|
||||
view_org = #{record.viewOrg,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.admin != null">
|
||||
admin = #{record.admin,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.adminOrg != null">
|
||||
admin_org = #{record.adminOrg,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.isOpen != null">
|
||||
is_open = #{record.isOpen,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.createdBy != null">
|
||||
created_by = #{record.createdBy,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.createdAt != null">
|
||||
created_at = #{record.createdAt,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="record.updatedBy != null">
|
||||
updated_by = #{record.updatedBy,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.updatedAt != null">
|
||||
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
|
||||
entity = #{record.entity,jdbcType=LONGVARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause"/>
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update s2_model
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
name = #{record.name,jdbcType=VARCHAR},
|
||||
biz_name = #{record.bizName,jdbcType=VARCHAR},
|
||||
domain_id = #{record.domainId,jdbcType=BIGINT},
|
||||
viewer = #{record.viewer,jdbcType=VARCHAR},
|
||||
view_org = #{record.viewOrg,jdbcType=VARCHAR},
|
||||
admin = #{record.admin,jdbcType=VARCHAR},
|
||||
admin_org = #{record.adminOrg,jdbcType=VARCHAR},
|
||||
is_open = #{record.isOpen,jdbcType=INTEGER},
|
||||
created_by = #{record.createdBy,jdbcType=VARCHAR},
|
||||
created_at = #{record.createdAt,jdbcType=TIMESTAMP},
|
||||
updated_by = #{record.updatedBy,jdbcType=VARCHAR},
|
||||
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause"/>
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective"
|
||||
parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.ModelDO">
|
||||
update s2_model
|
||||
<set>
|
||||
<if test="name != null">
|
||||
name = #{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="bizName != null">
|
||||
biz_name = #{bizName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="domainId != null">
|
||||
domain_id = #{domainId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="viewer != null">
|
||||
viewer = #{viewer,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="viewOrg != null">
|
||||
view_org = #{viewOrg,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="admin != null">
|
||||
admin = #{admin,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="adminOrg != null">
|
||||
admin_org = #{adminOrg,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="isOpen != null">
|
||||
is_open = #{isOpen,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="createdBy != null">
|
||||
created_by = #{createdBy,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createdAt != null">
|
||||
created_at = #{createdAt,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="updatedBy != null">
|
||||
updated_by = #{updatedBy,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="updatedAt != null">
|
||||
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="entity != null">
|
||||
entity = #{entity,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKeyWithBLOBs"
|
||||
parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.ModelDO">
|
||||
update s2_model
|
||||
set name = #{name,jdbcType=VARCHAR},
|
||||
biz_name = #{bizName,jdbcType=VARCHAR},
|
||||
domain_id = #{domainId,jdbcType=BIGINT},
|
||||
viewer = #{viewer,jdbcType=VARCHAR},
|
||||
view_org = #{viewOrg,jdbcType=VARCHAR},
|
||||
admin = #{admin,jdbcType=VARCHAR},
|
||||
admin_org = #{adminOrg,jdbcType=VARCHAR},
|
||||
is_open = #{isOpen,jdbcType=INTEGER},
|
||||
created_by = #{createdBy,jdbcType=VARCHAR},
|
||||
created_at = #{createdAt,jdbcType=TIMESTAMP},
|
||||
updated_by = #{updatedBy,jdbcType=VARCHAR},
|
||||
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
|
||||
entity = #{entity,jdbcType=LONGVARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey"
|
||||
parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.ModelDO">
|
||||
update s2_model
|
||||
set name = #{name,jdbcType=VARCHAR},
|
||||
biz_name = #{bizName,jdbcType=VARCHAR},
|
||||
domain_id = #{domainId,jdbcType=BIGINT},
|
||||
viewer = #{viewer,jdbcType=VARCHAR},
|
||||
view_org = #{viewOrg,jdbcType=VARCHAR},
|
||||
admin = #{admin,jdbcType=VARCHAR},
|
||||
admin_org = #{adminOrg,jdbcType=VARCHAR},
|
||||
is_open = #{isOpen,jdbcType=INTEGER},
|
||||
created_by = #{createdBy,jdbcType=VARCHAR},
|
||||
created_at = #{createdAt,jdbcType=TIMESTAMP},
|
||||
updated_by = #{updatedBy,jdbcType=VARCHAR},
|
||||
updated_at = #{updatedAt,jdbcType=TIMESTAMP}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</if>
|
||||
<if test="record.entity != null">
|
||||
entity = #{record.entity,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExampleWithBLOBs" parameterType="map">
|
||||
update s2_model
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
name = #{record.name,jdbcType=VARCHAR},
|
||||
biz_name = #{record.bizName,jdbcType=VARCHAR},
|
||||
domain_id = #{record.domainId,jdbcType=BIGINT},
|
||||
viewer = #{record.viewer,jdbcType=VARCHAR},
|
||||
view_org = #{record.viewOrg,jdbcType=VARCHAR},
|
||||
admin = #{record.admin,jdbcType=VARCHAR},
|
||||
admin_org = #{record.adminOrg,jdbcType=VARCHAR},
|
||||
is_open = #{record.isOpen,jdbcType=INTEGER},
|
||||
created_by = #{record.createdBy,jdbcType=VARCHAR},
|
||||
created_at = #{record.createdAt,jdbcType=TIMESTAMP},
|
||||
updated_by = #{record.updatedBy,jdbcType=VARCHAR},
|
||||
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
|
||||
entity = #{record.entity,jdbcType=LONGVARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update s2_model
|
||||
set id = #{record.id,jdbcType=BIGINT},
|
||||
name = #{record.name,jdbcType=VARCHAR},
|
||||
biz_name = #{record.bizName,jdbcType=VARCHAR},
|
||||
domain_id = #{record.domainId,jdbcType=BIGINT},
|
||||
viewer = #{record.viewer,jdbcType=VARCHAR},
|
||||
view_org = #{record.viewOrg,jdbcType=VARCHAR},
|
||||
admin = #{record.admin,jdbcType=VARCHAR},
|
||||
admin_org = #{record.adminOrg,jdbcType=VARCHAR},
|
||||
is_open = #{record.isOpen,jdbcType=INTEGER},
|
||||
created_by = #{record.createdBy,jdbcType=VARCHAR},
|
||||
created_at = #{record.createdAt,jdbcType=TIMESTAMP},
|
||||
updated_by = #{record.updatedBy,jdbcType=VARCHAR},
|
||||
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.ModelDO">
|
||||
update s2_model
|
||||
<set>
|
||||
<if test="name != null">
|
||||
name = #{name,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="bizName != null">
|
||||
biz_name = #{bizName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="domainId != null">
|
||||
domain_id = #{domainId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="viewer != null">
|
||||
viewer = #{viewer,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="viewOrg != null">
|
||||
view_org = #{viewOrg,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="admin != null">
|
||||
admin = #{admin,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="adminOrg != null">
|
||||
admin_org = #{adminOrg,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="isOpen != null">
|
||||
is_open = #{isOpen,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="createdBy != null">
|
||||
created_by = #{createdBy,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createdAt != null">
|
||||
created_at = #{createdAt,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="updatedBy != null">
|
||||
updated_by = #{updatedBy,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="updatedAt != null">
|
||||
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="entity != null">
|
||||
entity = #{entity,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.ModelDO">
|
||||
update s2_model
|
||||
set name = #{name,jdbcType=VARCHAR},
|
||||
biz_name = #{bizName,jdbcType=VARCHAR},
|
||||
domain_id = #{domainId,jdbcType=BIGINT},
|
||||
viewer = #{viewer,jdbcType=VARCHAR},
|
||||
view_org = #{viewOrg,jdbcType=VARCHAR},
|
||||
admin = #{admin,jdbcType=VARCHAR},
|
||||
admin_org = #{adminOrg,jdbcType=VARCHAR},
|
||||
is_open = #{isOpen,jdbcType=INTEGER},
|
||||
created_by = #{createdBy,jdbcType=VARCHAR},
|
||||
created_at = #{createdAt,jdbcType=TIMESTAMP},
|
||||
updated_by = #{updatedBy,jdbcType=VARCHAR},
|
||||
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
|
||||
entity = #{entity,jdbcType=LONGVARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.ModelDO">
|
||||
update s2_model
|
||||
set name = #{name,jdbcType=VARCHAR},
|
||||
biz_name = #{bizName,jdbcType=VARCHAR},
|
||||
domain_id = #{domainId,jdbcType=BIGINT},
|
||||
viewer = #{viewer,jdbcType=VARCHAR},
|
||||
view_org = #{viewOrg,jdbcType=VARCHAR},
|
||||
admin = #{admin,jdbcType=VARCHAR},
|
||||
admin_org = #{adminOrg,jdbcType=VARCHAR},
|
||||
is_open = #{isOpen,jdbcType=INTEGER},
|
||||
created_by = #{createdBy,jdbcType=VARCHAR},
|
||||
created_at = #{createdAt,jdbcType=TIMESTAMP},
|
||||
updated_by = #{updatedBy,jdbcType=VARCHAR},
|
||||
updated_at = #{updatedAt,jdbcType=TIMESTAMP}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
||||
@@ -1,232 +1,213 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<!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.ViewInfoDOMapper">
|
||||
<resultMap id="BaseResultMap"
|
||||
type="com.tencent.supersonic.semantic.model.domain.dataobject.ViewInfoDO">
|
||||
<id column="id" jdbcType="BIGINT" property="id"/>
|
||||
<result column="model_id" jdbcType="BIGINT" property="modelId"/>
|
||||
<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"/>
|
||||
</resultMap>
|
||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs"
|
||||
type="com.tencent.supersonic.semantic.model.domain.dataobject.ViewInfoDO">
|
||||
<result column="config" jdbcType="LONGVARCHAR" property="config"/>
|
||||
</resultMap>
|
||||
<sql id="Example_Where_Clause">
|
||||
<where>
|
||||
<foreach collection="oredCriteria" item="criteria" separator="or">
|
||||
<if test="criteria.valid">
|
||||
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||
<foreach collection="criteria.criteria" item="criterion">
|
||||
<choose>
|
||||
<when test="criterion.noValue">
|
||||
and ${criterion.condition}
|
||||
</when>
|
||||
<when test="criterion.singleValue">
|
||||
and ${criterion.condition} #{criterion.value}
|
||||
</when>
|
||||
<when test="criterion.betweenValue">
|
||||
and ${criterion.condition} #{criterion.value} and
|
||||
#{criterion.secondValue}
|
||||
</when>
|
||||
<when test="criterion.listValue">
|
||||
and ${criterion.condition}
|
||||
<foreach close=")" collection="criterion.value" item="listItem"
|
||||
open="(" separator=",">
|
||||
#{listItem}
|
||||
</foreach>
|
||||
</when>
|
||||
</choose>
|
||||
</foreach>
|
||||
</trim>
|
||||
</if>
|
||||
<resultMap id="BaseResultMap" type="com.tencent.supersonic.semantic.model.domain.dataobject.ViewInfoDO">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="model_id" jdbcType="BIGINT" property="modelId" />
|
||||
<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" />
|
||||
</resultMap>
|
||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.tencent.supersonic.semantic.model.domain.dataobject.ViewInfoDO">
|
||||
<result column="config" jdbcType="LONGVARCHAR" property="config" />
|
||||
</resultMap>
|
||||
<sql id="Example_Where_Clause">
|
||||
<where>
|
||||
<foreach collection="oredCriteria" item="criteria" separator="or">
|
||||
<if test="criteria.valid">
|
||||
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||
<foreach collection="criteria.criteria" item="criterion">
|
||||
<choose>
|
||||
<when test="criterion.noValue">
|
||||
and ${criterion.condition}
|
||||
</when>
|
||||
<when test="criterion.singleValue">
|
||||
and ${criterion.condition} #{criterion.value}
|
||||
</when>
|
||||
<when test="criterion.betweenValue">
|
||||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||
</when>
|
||||
<when test="criterion.listValue">
|
||||
and ${criterion.condition}
|
||||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
||||
#{listItem}
|
||||
</foreach>
|
||||
</when>
|
||||
</choose>
|
||||
</foreach>
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Base_Column_List">
|
||||
id
|
||||
, model_id, type, created_at, created_by, updated_at, updated_by
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
config
|
||||
</sql>
|
||||
<select id="selectByExampleWithBLOBs"
|
||||
parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.ViewInfoDOExample"
|
||||
resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</trim>
|
||||
</if>
|
||||
<include refid="Base_Column_List"/>
|
||||
,
|
||||
<include refid="Blob_Column_List"/>
|
||||
from s2_view_info
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause"/>
|
||||
</if>
|
||||
<if test="orderByClause != null">
|
||||
order by ${orderByClause}
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectByExample"
|
||||
parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.ViewInfoDOExample"
|
||||
resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List"/>
|
||||
from s2_view_info
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause"/>
|
||||
</if>
|
||||
<if test="orderByClause != null">
|
||||
order by ${orderByClause}
|
||||
</if>
|
||||
<if test="limitStart != null and limitStart>=0">
|
||||
limit #{limitStart} , #{limitEnd}
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
,
|
||||
<include refid="Blob_Column_List"/>
|
||||
from s2_view_info
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete
|
||||
from s2_view_info
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<insert id="insert"
|
||||
parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.ViewInfoDO">
|
||||
insert into s2_view_info (id, model_id, type,
|
||||
created_at, created_by, updated_at,
|
||||
updated_by, config)
|
||||
values (#{id,jdbcType=BIGINT}, #{modelId,jdbcType=BIGINT}, #{type,jdbcType=VARCHAR},
|
||||
#{createdAt,jdbcType=TIMESTAMP}, #{createdBy,jdbcType=VARCHAR},
|
||||
#{updatedAt,jdbcType=TIMESTAMP},
|
||||
#{updatedBy,jdbcType=VARCHAR}, #{config,jdbcType=LONGVARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective"
|
||||
parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.ViewInfoDO">
|
||||
insert into s2_view_info
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
id,
|
||||
</if>
|
||||
<if test="modelId != null">
|
||||
model_id,
|
||||
</if>
|
||||
<if test="type != null">
|
||||
type,
|
||||
</if>
|
||||
<if test="createdAt != null">
|
||||
created_at,
|
||||
</if>
|
||||
<if test="createdBy != null">
|
||||
created_by,
|
||||
</if>
|
||||
<if test="updatedAt != null">
|
||||
updated_at,
|
||||
</if>
|
||||
<if test="updatedBy != null">
|
||||
updated_by,
|
||||
</if>
|
||||
<if test="config != null">
|
||||
config,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
#{id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="modelId != null">
|
||||
#{modelId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="type != null">
|
||||
#{type,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createdAt != null">
|
||||
#{createdAt,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="createdBy != null">
|
||||
#{createdBy,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="updatedAt != null">
|
||||
#{updatedAt,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="updatedBy != null">
|
||||
#{updatedBy,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="config != null">
|
||||
#{config,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample"
|
||||
parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.ViewInfoDOExample"
|
||||
resultType="java.lang.Long">
|
||||
select count(*) from s2_view_info
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause"/>
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByPrimaryKeySelective"
|
||||
parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.ViewInfoDO">
|
||||
update s2_view_info
|
||||
<set>
|
||||
<if test="modelId != null">
|
||||
model_id = #{modelId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="type != null">
|
||||
type = #{type,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createdAt != null">
|
||||
created_at = #{createdAt,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="createdBy != null">
|
||||
created_by = #{createdBy,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="updatedAt != null">
|
||||
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="updatedBy != null">
|
||||
updated_by = #{updatedBy,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="config != null">
|
||||
config = #{config,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKeyWithBLOBs"
|
||||
parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.ViewInfoDO">
|
||||
update s2_view_info
|
||||
set model_id = #{modelId,jdbcType=BIGINT},
|
||||
type = #{type,jdbcType=VARCHAR},
|
||||
created_at = #{createdAt,jdbcType=TIMESTAMP},
|
||||
created_by = #{createdBy,jdbcType=VARCHAR},
|
||||
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
|
||||
updated_by = #{updatedBy,jdbcType=VARCHAR},
|
||||
config = #{config,jdbcType=LONGVARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey"
|
||||
parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.ViewInfoDO">
|
||||
update s2_view_info
|
||||
set model_id = #{modelId,jdbcType=BIGINT},
|
||||
type = #{type,jdbcType=VARCHAR},
|
||||
created_at = #{createdAt,jdbcType=TIMESTAMP},
|
||||
created_by = #{createdBy,jdbcType=VARCHAR},
|
||||
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
|
||||
updated_by = #{updatedBy,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</foreach>
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Base_Column_List">
|
||||
id, model_id, type, created_at, created_by, updated_at, updated_by
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
config
|
||||
</sql>
|
||||
<select id="selectByExampleWithBLOBs" parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.ViewInfoDOExample" resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
,
|
||||
<include refid="Blob_Column_List" />
|
||||
from s2_view_info
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
<if test="orderByClause != null">
|
||||
order by ${orderByClause}
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectByExample" parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.ViewInfoDOExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from s2_view_info
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
<if test="orderByClause != null">
|
||||
order by ${orderByClause}
|
||||
</if>
|
||||
<if test="limitStart != null and limitStart>=0">
|
||||
limit #{limitStart} , #{limitEnd}
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
,
|
||||
<include refid="Blob_Column_List" />
|
||||
from s2_view_info
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from s2_view_info
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.ViewInfoDO">
|
||||
insert into s2_view_info (id, model_id, type,
|
||||
created_at, created_by, updated_at,
|
||||
updated_by, config)
|
||||
values (#{id,jdbcType=BIGINT}, #{modelId,jdbcType=BIGINT}, #{type,jdbcType=VARCHAR},
|
||||
#{createdAt,jdbcType=TIMESTAMP}, #{createdBy,jdbcType=VARCHAR}, #{updatedAt,jdbcType=TIMESTAMP},
|
||||
#{updatedBy,jdbcType=VARCHAR}, #{config,jdbcType=LONGVARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.ViewInfoDO">
|
||||
insert into s2_view_info
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
id,
|
||||
</if>
|
||||
<if test="modelId != null">
|
||||
model_id,
|
||||
</if>
|
||||
<if test="type != null">
|
||||
type,
|
||||
</if>
|
||||
<if test="createdAt != null">
|
||||
created_at,
|
||||
</if>
|
||||
<if test="createdBy != null">
|
||||
created_by,
|
||||
</if>
|
||||
<if test="updatedAt != null">
|
||||
updated_at,
|
||||
</if>
|
||||
<if test="updatedBy != null">
|
||||
updated_by,
|
||||
</if>
|
||||
<if test="config != null">
|
||||
config,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
#{id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="modelId != null">
|
||||
#{modelId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="type != null">
|
||||
#{type,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createdAt != null">
|
||||
#{createdAt,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="createdBy != null">
|
||||
#{createdBy,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="updatedAt != null">
|
||||
#{updatedAt,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="updatedBy != null">
|
||||
#{updatedBy,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="config != null">
|
||||
#{config,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.ViewInfoDOExample" resultType="java.lang.Long">
|
||||
select count(*) from s2_view_info
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.ViewInfoDO">
|
||||
update s2_view_info
|
||||
<set>
|
||||
<if test="modelId != null">
|
||||
model_id = #{modelId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="type != null">
|
||||
type = #{type,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createdAt != null">
|
||||
created_at = #{createdAt,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="createdBy != null">
|
||||
created_by = #{createdBy,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="updatedAt != null">
|
||||
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="updatedBy != null">
|
||||
updated_by = #{updatedBy,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="config != null">
|
||||
config = #{config,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.ViewInfoDO">
|
||||
update s2_view_info
|
||||
set model_id = #{modelId,jdbcType=BIGINT},
|
||||
type = #{type,jdbcType=VARCHAR},
|
||||
created_at = #{createdAt,jdbcType=TIMESTAMP},
|
||||
created_by = #{createdBy,jdbcType=VARCHAR},
|
||||
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
|
||||
updated_by = #{updatedBy,jdbcType=VARCHAR},
|
||||
config = #{config,jdbcType=LONGVARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.tencent.supersonic.semantic.model.domain.dataobject.ViewInfoDO">
|
||||
update s2_view_info
|
||||
set model_id = #{modelId,jdbcType=BIGINT},
|
||||
type = #{type,jdbcType=VARCHAR},
|
||||
created_at = #{createdAt,jdbcType=TIMESTAMP},
|
||||
created_by = #{createdBy,jdbcType=VARCHAR},
|
||||
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
|
||||
updated_by = #{updatedBy,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
||||
@@ -20,7 +20,7 @@
|
||||
<insert id="upsertDateInfo">
|
||||
insert into s2_available_date_info
|
||||
(`type`, item_id, date_format, start_date, end_date, unavailable_date, created_by,
|
||||
updated_by, date_period)
|
||||
updated_by,date_period)
|
||||
values (#{type}, #{itemId}, #{dateFormat}, #{startDate}, #{endDate}, #{unavailableDateList},
|
||||
#{createdBy}, #{updatedBy}, #{datePeriod}) ON DUPLICATE KEY
|
||||
UPDATE
|
||||
@@ -44,7 +44,7 @@
|
||||
<if test="itemIds != null and itemIds.size >0">
|
||||
and item_id in
|
||||
<foreach collection="itemIds" index="index" item="item" open="(" close=")"
|
||||
separator=",">
|
||||
separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
@@ -98,9 +98,9 @@
|
||||
</update>
|
||||
|
||||
<select id="query" resultMap="ResultMapWithBLOBs">
|
||||
select *
|
||||
from s2_metric
|
||||
where 1=1
|
||||
select *
|
||||
from s2_metric
|
||||
where 1=1
|
||||
<if test="type != null and type != ''">
|
||||
and type = #{type}
|
||||
</if>
|
||||
@@ -125,7 +125,7 @@
|
||||
<if test="modelIds != null and modelIds.size >0">
|
||||
and model_id in
|
||||
<foreach collection="modelIds" index="index" item="model" open="(" close=")"
|
||||
separator=",">
|
||||
separator=",">
|
||||
#{model}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
@@ -4,7 +4,7 @@ CREATE TABLE `s2_database`
|
||||
`domain_id` bigint(20) NOT NULL COMMENT '主题域ID',
|
||||
`name` varchar(255) NOT NULL COMMENT '名称',
|
||||
`description` varchar(500) DEFAULT NULL COMMENT '描述',
|
||||
`version` varchar(64) DEFAULT NULL COMMENT '版本',
|
||||
`version` varchar(64) DEFAULT NULL COMMENT '版本',
|
||||
`type` varchar(20) NOT NULL COMMENT '类型 mysql,clickhouse,tdw',
|
||||
`config` text NOT NULL COMMENT '配置信息',
|
||||
`created_at` datetime NOT NULL COMMENT '创建时间',
|
||||
|
||||
Reference in New Issue
Block a user