mirror of
https://github.com/tencentmusic/supersonic.git
synced 2026-01-02 15:28:42 +08:00
[improvement][project] supersonic 0.7.0 version backend update (#20)
Co-authored-by: kanedai <kanedai@tencent.com>
This commit is contained in:
@@ -3,14 +3,15 @@
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
|
||||
<mapper namespace="com.tencent.supersonic.chat.infrastructure.mapper.ChatConfigMapper">
|
||||
<mapper namespace="com.tencent.supersonic.chat.persistence.mapper.ChatConfigMapper">
|
||||
|
||||
<resultMap id="chaConfigDO"
|
||||
type="com.tencent.supersonic.chat.domain.dataobject.ChatConfigDO">
|
||||
type="com.tencent.supersonic.chat.persistence.dataobject.ChatConfigDO">
|
||||
<id column="id" property="id"/>
|
||||
<result column="domain_id" property="domainId"/>
|
||||
<result column="chat_detail_config" property="chatDetailConfig"/>
|
||||
<result column="chat_agg_config" property="chatAggConfig"/>
|
||||
<result column="recommended_questions" property="recommendedQuestions"/>
|
||||
<result column="status" property="status"/>
|
||||
<result column="created_by" property="createdBy"/>
|
||||
<result column="updated_by" property="updatedBy"/>
|
||||
@@ -19,15 +20,15 @@
|
||||
</resultMap>
|
||||
|
||||
<insert id="addConfig"
|
||||
parameterType="com.tencent.supersonic.chat.domain.dataobject.ChatConfigDO"
|
||||
parameterType="com.tencent.supersonic.chat.persistence.dataobject.ChatConfigDO"
|
||||
useGeneratedKeys="true" keyProperty="id">
|
||||
insert into s2_chat_config
|
||||
(
|
||||
domain_id, `chat_detail_config`, chat_agg_config, status, created_by, updated_by, created_at, updated_at
|
||||
domain_id, `chat_detail_config`, chat_agg_config, recommended_questions, status, created_by, updated_by, created_at, updated_at
|
||||
)
|
||||
values
|
||||
(
|
||||
#{domainId}, #{chatDetailConfig}, #{chatAggConfig}, #{status}, #{createdBy}, #{updatedBy}, #{createdAt}, #{updatedAt}
|
||||
#{domainId}, #{chatDetailConfig}, #{chatAggConfig}, #{recommendedQuestions}, #{status}, #{createdBy}, #{updatedBy}, #{createdAt}, #{updatedAt}
|
||||
)
|
||||
</insert>
|
||||
|
||||
@@ -42,6 +43,9 @@
|
||||
<if test="chatAggConfig != null and chatAggConfig != ''">
|
||||
chat_agg_config = #{chatAggConfig} ,
|
||||
</if>
|
||||
<if test="recommendedQuestions != null and recommendedQuestions != ''">
|
||||
recommended_questions = #{recommendedQuestions} ,
|
||||
</if>
|
||||
<if test="status != null and status != ''">
|
||||
status = #{status} ,
|
||||
</if>
|
||||
|
||||
@@ -3,10 +3,10 @@
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
|
||||
<mapper namespace="com.tencent.supersonic.chat.infrastructure.mapper.ChatContextMapper">
|
||||
<mapper namespace="com.tencent.supersonic.chat.persistence.mapper.ChatContextMapper">
|
||||
|
||||
<resultMap id="ChatContextDO"
|
||||
type="com.tencent.supersonic.chat.domain.dataobject.ChatContextDO">
|
||||
type="com.tencent.supersonic.chat.persistence.dataobject.ChatContextDO">
|
||||
<id column="chat_id" property="chatId"/>
|
||||
<result column="modified_at" property="modifiedAt"/>
|
||||
<result column="user" property="user"/>
|
||||
@@ -20,7 +20,7 @@
|
||||
from s2_chat_context where chat_id=#{chatId} limit 1
|
||||
</select>
|
||||
|
||||
<insert id="addContext" parameterType="com.tencent.supersonic.chat.domain.dataobject.ChatContextDO" >
|
||||
<insert id="addContext" parameterType="com.tencent.supersonic.chat.persistence.dataobject.ChatContextDO" >
|
||||
insert into s2_chat_context (chat_id,user,query_text,semantic_parse) values (#{chatId}, #{user},#{queryText}, #{semanticParse})
|
||||
</insert>
|
||||
<update id="updateContext">
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
|
||||
<mapper namespace="com.tencent.supersonic.chat.infrastructure.mapper.ChatMapper">
|
||||
<mapper namespace="com.tencent.supersonic.chat.persistence.mapper.ChatMapper">
|
||||
|
||||
<resultMap id="IntelligentConversion" type="com.tencent.supersonic.chat.domain.dataobject.ChatDO">
|
||||
<resultMap id="IntelligentConversion" type="com.tencent.supersonic.chat.persistence.dataobject.ChatDO">
|
||||
<id column="chat_id" property="chatId"/>
|
||||
<result column="chat_name" property="chatName"/>
|
||||
<result column="create_time" property="createTime"/>
|
||||
@@ -45,7 +45,7 @@
|
||||
where chat_id = #{chatId}
|
||||
</update>
|
||||
|
||||
<insert id="createChat" parameterType="com.tencent.supersonic.chat.domain.dataobject.ChatDO">
|
||||
<insert id="createChat" parameterType="com.tencent.supersonic.chat.persistence.dataobject.ChatDO">
|
||||
insert into s2_chat
|
||||
(chat_name, create_time, last_time, creator, last_question, is_delete, is_top)
|
||||
values (#{chatName}, #{createTime}, #{lastTime}, #{creator}, #{lastQuestion}, #{isDelete}, #{isTop})
|
||||
@@ -59,7 +59,7 @@
|
||||
</update>
|
||||
|
||||
|
||||
<resultMap id="IntelligentQuery" type="com.tencent.supersonic.chat.domain.dataobject.QueryDO">
|
||||
<resultMap id="IntelligentQuery" type="com.tencent.supersonic.chat.persistence.dataobject.QueryDO">
|
||||
<id column="id" property="id"/>
|
||||
<result column="question_id" property="questionId"/>
|
||||
<result column="create_time" property="createTime"/>
|
||||
@@ -83,14 +83,14 @@
|
||||
<result column="chat_id" property="chatId"/>
|
||||
</resultMap>
|
||||
|
||||
<update id="updateFeedback" parameterType="com.tencent.supersonic.chat.domain.dataobject.QueryDO">
|
||||
<update id="updateFeedback" parameterType="com.tencent.supersonic.chat.persistence.dataobject.QueryDO">
|
||||
update s2_chat_query
|
||||
set score=#{score},
|
||||
feedback=#{feedback}
|
||||
where question_id = #{id}
|
||||
</update>
|
||||
|
||||
<insert id="createQuery" parameterType="com.tencent.supersonic.chat.domain.dataobject.QueryDO"
|
||||
<insert id="createQuery" parameterType="com.tencent.supersonic.chat.persistence.dataobject.QueryDO"
|
||||
useGeneratedKeys="true" keyProperty="id">
|
||||
insert into s2_chat_query
|
||||
(question_id, create_time, user_name, question, query_result, time, state, data_content, name, query_type,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?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">
|
||||
<mapper namespace="com.tencent.supersonic.chat.infrastructure.mapper.ChatQueryDOMapper">
|
||||
<resultMap id="BaseResultMap" type="com.tencent.supersonic.chat.domain.dataobject.ChatQueryDO">
|
||||
<mapper namespace="com.tencent.supersonic.chat.persistence.mapper.ChatQueryDOMapper">
|
||||
<resultMap id="BaseResultMap" type="com.tencent.supersonic.chat.persistence.dataobject.ChatQueryDO">
|
||||
<id column="question_id" jdbcType="BIGINT" property="questionId" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="user_name" jdbcType="VARCHAR" property="userName" />
|
||||
@@ -10,9 +10,9 @@
|
||||
<result column="score" jdbcType="INTEGER" property="score" />
|
||||
<result column="feedback" jdbcType="VARCHAR" property="feedback" />
|
||||
</resultMap>
|
||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.tencent.supersonic.chat.domain.dataobject.ChatQueryDO">
|
||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.tencent.supersonic.chat.persistence.dataobject.ChatQueryDO">
|
||||
<result column="query_text" jdbcType="LONGVARCHAR" property="queryText" />
|
||||
<result column="query_response" jdbcType="LONGVARCHAR" property="queryResponse" />
|
||||
<result column="query_response" jdbcType="LONGVARCHAR" property="queryResult" />
|
||||
</resultMap>
|
||||
<sql id="Example_Where_Clause">
|
||||
<where>
|
||||
@@ -49,7 +49,7 @@
|
||||
<sql id="Blob_Column_List">
|
||||
query_text, query_response
|
||||
</sql>
|
||||
<select id="selectByExampleWithBLOBs" parameterType="com.tencent.supersonic.chat.domain.dataobject.ChatQueryDOExample" resultMap="ResultMapWithBLOBs">
|
||||
<select id="selectByExampleWithBLOBs" parameterType="com.tencent.supersonic.chat.persistence.dataobject.ChatQueryDOExample" resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
@@ -65,7 +65,7 @@
|
||||
order by ${orderByClause}
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectByExample" parameterType="com.tencent.supersonic.chat.domain.dataobject.ChatQueryDOExample" resultMap="BaseResultMap">
|
||||
<select id="selectByExample" parameterType="com.tencent.supersonic.chat.persistence.dataobject.ChatQueryDOExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
@@ -94,17 +94,17 @@
|
||||
delete from s2_chat_query
|
||||
where question_id = #{questionId,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.tencent.supersonic.chat.domain.dataobject.ChatQueryDO">
|
||||
<insert id="insert" parameterType="com.tencent.supersonic.chat.persistence.dataobject.ChatQueryDO">
|
||||
insert into s2_chat_query (question_id, create_time, user_name,
|
||||
query_state, chat_id, score,
|
||||
feedback, query_text, query_response
|
||||
)
|
||||
values (#{questionId,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP}, #{userName,jdbcType=VARCHAR},
|
||||
#{queryState,jdbcType=INTEGER}, #{chatId,jdbcType=BIGINT}, #{score,jdbcType=INTEGER},
|
||||
#{feedback,jdbcType=VARCHAR}, #{queryText,jdbcType=LONGVARCHAR}, #{queryResponse,jdbcType=LONGVARCHAR}
|
||||
#{feedback,jdbcType=VARCHAR}, #{queryText,jdbcType=LONGVARCHAR}, #{queryResult,jdbcType=LONGVARCHAR}
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.tencent.supersonic.chat.domain.dataobject.ChatQueryDO">
|
||||
<insert id="insertSelective" parameterType="com.tencent.supersonic.chat.persistence.dataobject.ChatQueryDO">
|
||||
insert into s2_chat_query
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="questionId != null">
|
||||
@@ -131,7 +131,7 @@
|
||||
<if test="queryText != null">
|
||||
query_text,
|
||||
</if>
|
||||
<if test="queryResponse != null">
|
||||
<if test="queryResult != null">
|
||||
query_response,
|
||||
</if>
|
||||
</trim>
|
||||
@@ -160,18 +160,18 @@
|
||||
<if test="queryText != null">
|
||||
#{queryText,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="queryResponse != null">
|
||||
#{queryResponse,jdbcType=LONGVARCHAR},
|
||||
<if test="queryResult != null">
|
||||
#{queryResult,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.tencent.supersonic.chat.domain.dataobject.ChatQueryDOExample" resultType="java.lang.Long">
|
||||
<select id="countByExample" parameterType="com.tencent.supersonic.chat.persistence.dataobject.ChatQueryDOExample" resultType="java.lang.Long">
|
||||
select count(*) from s2_chat_query
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.tencent.supersonic.chat.domain.dataobject.ChatQueryDO">
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.tencent.supersonic.chat.persistence.dataobject.ChatQueryDO">
|
||||
update s2_chat_query
|
||||
<set>
|
||||
<if test="createTime != null">
|
||||
@@ -195,13 +195,13 @@
|
||||
<if test="queryText != null">
|
||||
query_text = #{queryText,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="queryResponse != null">
|
||||
query_response = #{queryResponse,jdbcType=LONGVARCHAR},
|
||||
<if test="queryResult != null">
|
||||
query_response = #{queryResult,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where question_id = #{questionId,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.tencent.supersonic.chat.domain.dataobject.ChatQueryDO">
|
||||
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.tencent.supersonic.chat.persistence.dataobject.ChatQueryDO">
|
||||
update s2_chat_query
|
||||
set create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
user_name = #{userName,jdbcType=VARCHAR},
|
||||
@@ -210,10 +210,10 @@
|
||||
score = #{score,jdbcType=INTEGER},
|
||||
feedback = #{feedback,jdbcType=VARCHAR},
|
||||
query_text = #{queryText,jdbcType=LONGVARCHAR},
|
||||
query_response = #{queryResponse,jdbcType=LONGVARCHAR}
|
||||
query_response = #{queryResult,jdbcType=LONGVARCHAR}
|
||||
where question_id = #{questionId,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.tencent.supersonic.chat.domain.dataobject.ChatQueryDO">
|
||||
<update id="updateByPrimaryKey" parameterType="com.tencent.supersonic.chat.persistence.dataobject.ChatQueryDO">
|
||||
update s2_chat_query
|
||||
set create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
user_name = #{userName,jdbcType=VARCHAR},
|
||||
|
||||
252
chat/core/src/main/resources/mapper/PluginDOMapper.xml
Normal file
252
chat/core/src/main/resources/mapper/PluginDOMapper.xml
Normal file
@@ -0,0 +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">
|
||||
<mapper namespace="com.tencent.supersonic.chat.persistence.mapper.PluginDOMapper">
|
||||
<resultMap id="BaseResultMap" type="com.tencent.supersonic.chat.persistence.dataobject.PluginDO">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="type" jdbcType="VARCHAR" property="type" />
|
||||
<result column="domain" jdbcType="VARCHAR" property="domain" />
|
||||
<result column="pattern" jdbcType="VARCHAR" property="pattern" />
|
||||
<result column="parse_mode" jdbcType="VARCHAR" property="parseMode" />
|
||||
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||
<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.chat.persistence.dataobject.PluginDO">
|
||||
<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>
|
||||
</foreach>
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Base_Column_List">
|
||||
id, type, domain, pattern, parse_mode, name, created_at, created_by, updated_at,
|
||||
updated_by
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
config
|
||||
</sql>
|
||||
<select id="selectByExampleWithBLOBs" parameterType="com.tencent.supersonic.chat.persistence.dataobject.PluginDOExample" resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
,
|
||||
<include refid="Blob_Column_List" />
|
||||
from s2_plugin
|
||||
<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.chat.persistence.dataobject.PluginDOExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from s2_plugin
|
||||
<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_plugin
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from s2_plugin
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.tencent.supersonic.chat.persistence.dataobject.PluginDO">
|
||||
insert into s2_plugin (id, type, domain,
|
||||
pattern, parse_mode, name,
|
||||
created_at, created_by, updated_at,
|
||||
updated_by, config)
|
||||
values (#{id,jdbcType=BIGINT}, #{type,jdbcType=VARCHAR}, #{domain,jdbcType=VARCHAR},
|
||||
#{pattern,jdbcType=VARCHAR}, #{parseMode,jdbcType=VARCHAR}, #{name,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.chat.persistence.dataobject.PluginDO">
|
||||
insert into s2_plugin
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
id,
|
||||
</if>
|
||||
<if test="type != null">
|
||||
type,
|
||||
</if>
|
||||
<if test="domain != null">
|
||||
domain,
|
||||
</if>
|
||||
<if test="pattern != null">
|
||||
pattern,
|
||||
</if>
|
||||
<if test="parseMode != null">
|
||||
parse_mode,
|
||||
</if>
|
||||
<if test="name != null">
|
||||
name,
|
||||
</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="type != null">
|
||||
#{type,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="domain != null">
|
||||
#{domain,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="pattern != null">
|
||||
#{pattern,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="parseMode != null">
|
||||
#{parseMode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
#{name,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.chat.persistence.dataobject.PluginDOExample" resultType="java.lang.Long">
|
||||
select count(*) from s2_plugin
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.tencent.supersonic.chat.persistence.dataobject.PluginDO">
|
||||
update s2_plugin
|
||||
<set>
|
||||
<if test="type != null">
|
||||
type = #{type,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="domain != null">
|
||||
domain = #{domain,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="pattern != null">
|
||||
pattern = #{pattern,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="parseMode != null">
|
||||
parse_mode = #{parseMode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="name != null">
|
||||
name = #{name,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.chat.persistence.dataobject.PluginDO">
|
||||
update s2_plugin
|
||||
set type = #{type,jdbcType=VARCHAR},
|
||||
domain = #{domain,jdbcType=VARCHAR},
|
||||
pattern = #{pattern,jdbcType=VARCHAR},
|
||||
parse_mode = #{parseMode,jdbcType=VARCHAR},
|
||||
name = #{name,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.chat.persistence.dataobject.PluginDO">
|
||||
update s2_plugin
|
||||
set type = #{type,jdbcType=VARCHAR},
|
||||
domain = #{domain,jdbcType=VARCHAR},
|
||||
pattern = #{pattern,jdbcType=VARCHAR},
|
||||
parse_mode = #{parseMode,jdbcType=VARCHAR},
|
||||
name = #{name,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>
|
||||
Reference in New Issue
Block a user