mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-31 14:28:27 +08:00
[improvement][project] supersonic 0.7.2 version backend update (#28)
Co-authored-by: jipengli <jipengli@tencent.com>
This commit is contained in:
@@ -6,9 +6,9 @@
|
||||
<mapper namespace="com.tencent.supersonic.chat.persistence.mapper.ChatConfigMapper">
|
||||
|
||||
<resultMap id="chaConfigDO"
|
||||
type="com.tencent.supersonic.chat.persistence.dataobject.ChatConfigDO">
|
||||
type="com.tencent.supersonic.chat.persistence.dataobject.ChatConfigDO">
|
||||
<id column="id" property="id"/>
|
||||
<result column="domain_id" property="domainId"/>
|
||||
<result column="model_id" property="modelId"/>
|
||||
<result column="chat_detail_config" property="chatDetailConfig"/>
|
||||
<result column="chat_agg_config" property="chatAggConfig"/>
|
||||
<result column="recommended_questions" property="recommendedQuestions"/>
|
||||
@@ -22,14 +22,11 @@
|
||||
<insert id="addConfig"
|
||||
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, recommended_questions, status, created_by, updated_by, created_at, updated_at
|
||||
)
|
||||
values
|
||||
(
|
||||
#{domainId}, #{chatDetailConfig}, #{chatAggConfig}, #{recommendedQuestions}, #{status}, #{createdBy}, #{updatedBy}, #{createdAt}, #{updatedAt}
|
||||
)
|
||||
insert into s2_chat_config
|
||||
(model_id, `chat_detail_config`, chat_agg_config, recommended_questions, status, created_by,
|
||||
updated_by, created_at, updated_at)
|
||||
values (#{modelId}, #{chatDetailConfig}, #{chatAggConfig}, #{recommendedQuestions},
|
||||
#{status}, #{createdBy}, #{updatedBy}, #{createdAt}, #{updatedAt})
|
||||
</insert>
|
||||
|
||||
|
||||
@@ -58,8 +55,8 @@
|
||||
<if test="id != null and id != ''">
|
||||
id = #{id}
|
||||
</if>
|
||||
<if test="domainId != null and domainId != ''">
|
||||
and domain_id = #{domainId}
|
||||
<if test="modelId != null and modelId != ''">
|
||||
and model_id = #{modelId}
|
||||
</if>
|
||||
</where>
|
||||
</update>
|
||||
@@ -71,8 +68,8 @@
|
||||
<if test="id != null and id != ''">
|
||||
id = #{id}
|
||||
</if>
|
||||
<if test="domainId != null and domainId != ''">
|
||||
and domain_id = #{domainId}
|
||||
<if test="modelId != null and modelId != ''">
|
||||
and model_id = #{modelId}
|
||||
</if>
|
||||
<if test="status != null and status != ''">
|
||||
and status = #{status}
|
||||
@@ -81,13 +78,13 @@
|
||||
|
||||
</select>
|
||||
|
||||
<select id="fetchConfigByDomainId" resultMap="chaConfigDO">
|
||||
<select id="fetchConfigByModelId" resultMap="chaConfigDO">
|
||||
select *
|
||||
from s2_chat_config
|
||||
where domain_id = #{domainId}
|
||||
and status != 3
|
||||
where model_id = #{modelId}
|
||||
and status != 3
|
||||
order by updated_at desc
|
||||
limit 1
|
||||
limit 1
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<mapper namespace="com.tencent.supersonic.chat.persistence.mapper.ChatContextMapper">
|
||||
|
||||
<resultMap id="ChatContextDO"
|
||||
type="com.tencent.supersonic.chat.persistence.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"/>
|
||||
@@ -15,16 +15,22 @@
|
||||
<!--<result column="ext_data" property="extData"/>-->
|
||||
</resultMap>
|
||||
|
||||
<select id="getContextByChatId" resultMap="ChatContextDO">
|
||||
<select id="getContextByChatId" resultMap="ChatContextDO">
|
||||
select *
|
||||
from s2_chat_context where chat_id=#{chatId} limit 1
|
||||
from s2_chat_context
|
||||
where chat_id = #{chatId} limit 1
|
||||
</select>
|
||||
|
||||
<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 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">
|
||||
update s2_chat_context set query_text=#{queryText},semantic_parse=#{semanticParse} where chat_id=#{chatId}
|
||||
update s2_chat_context
|
||||
set query_text=#{queryText},
|
||||
semantic_parse=#{semanticParse}
|
||||
where chat_id = #{chatId}
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
@@ -5,7 +5,8 @@
|
||||
|
||||
<mapper namespace="com.tencent.supersonic.chat.persistence.mapper.ChatMapper">
|
||||
|
||||
<resultMap id="IntelligentConversion" type="com.tencent.supersonic.chat.persistence.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"/>
|
||||
@@ -41,14 +42,16 @@
|
||||
<update id="updateLastQuestion">
|
||||
update s2_chat
|
||||
set last_question = #{lastQuestion},
|
||||
last_time = #{lastTime}
|
||||
last_time = #{lastTime}
|
||||
where chat_id = #{chatId}
|
||||
</update>
|
||||
|
||||
<insert id="createChat" parameterType="com.tencent.supersonic.chat.persistence.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})
|
||||
values (#{chatName}, #{createTime}, #{lastTime}, #{creator}, #{lastQuestion}, #{isDelete},
|
||||
#{isTop})
|
||||
</insert>
|
||||
|
||||
<update id="deleteChat">
|
||||
@@ -59,7 +62,8 @@
|
||||
</update>
|
||||
|
||||
|
||||
<resultMap id="IntelligentQuery" type="com.tencent.supersonic.chat.persistence.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,22 +87,29 @@
|
||||
<result column="chat_id" property="chatId"/>
|
||||
</resultMap>
|
||||
|
||||
<update id="updateFeedback" parameterType="com.tencent.supersonic.chat.persistence.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.persistence.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,
|
||||
is_deleted, module, chat_id, aggregator, top_num, start_time, end_time, query_sql, columns, main_entity, score,
|
||||
(question_id, create_time, user_name, question, query_result, time, state, data_content,
|
||||
name, query_type,
|
||||
is_deleted, module, chat_id, aggregator, top_num, start_time, end_time, query_sql, columns,
|
||||
main_entity, score,
|
||||
feedback)
|
||||
values (#{questionId}, #{createTime}, #{userName}, #{question}, #{queryResults}, #{time}, #{state},
|
||||
#{dataContent}, #{name}, #{queryType}, #{isDeleted}, #{module}, #{chatId}, #{aggregator}, #{topNum},
|
||||
#{startTime}, #{endTime}, #{querySql}, #{QueryColumn}, #{EntityInfo}, #{score}, #{feedback})
|
||||
values (#{questionId}, #{createTime}, #{userName}, #{question}, #{queryResults}, #{time},
|
||||
#{state},
|
||||
#{dataContent}, #{name}, #{queryType}, #{isDeleted}, #{module}, #{chatId},
|
||||
#{aggregator}, #{topNum},
|
||||
#{startTime}, #{endTime}, #{querySql}, #{QueryColumn}, #{EntityInfo}, #{score},
|
||||
#{feedback})
|
||||
|
||||
</insert>
|
||||
|
||||
|
||||
@@ -1,226 +1,246 @@
|
||||
<?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.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" />
|
||||
<result column="query_state" jdbcType="INTEGER" property="queryState" />
|
||||
<result column="chat_id" jdbcType="BIGINT" property="chatId" />
|
||||
<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.persistence.dataobject.ChatQueryDO">
|
||||
<result column="query_text" jdbcType="LONGVARCHAR" property="queryText" />
|
||||
<result column="query_response" jdbcType="LONGVARCHAR" property="queryResult" />
|
||||
</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>
|
||||
<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"/>
|
||||
<result column="query_state" jdbcType="INTEGER" property="queryState"/>
|
||||
<result column="chat_id" jdbcType="BIGINT" property="chatId"/>
|
||||
<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.persistence.dataobject.ChatQueryDO">
|
||||
<result column="query_text" jdbcType="LONGVARCHAR" property="queryText"/>
|
||||
<result column="query_response" jdbcType="LONGVARCHAR" property="queryResult"/>
|
||||
</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>
|
||||
</trim>
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Base_Column_List">
|
||||
question_id
|
||||
, create_time, user_name, query_state, chat_id, score, feedback
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
query_text
|
||||
, query_response
|
||||
</sql>
|
||||
<select id="selectByExampleWithBLOBs"
|
||||
parameterType="com.tencent.supersonic.chat.persistence.dataobject.ChatQueryDOExample"
|
||||
resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
</foreach>
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Base_Column_List">
|
||||
question_id, create_time, user_name, query_state, chat_id, score, feedback
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
query_text, query_response
|
||||
</sql>
|
||||
<select id="selectByExampleWithBLOBs" parameterType="com.tencent.supersonic.chat.persistence.dataobject.ChatQueryDOExample" resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
,
|
||||
<include refid="Blob_Column_List" />
|
||||
from s2_chat_query
|
||||
<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.ChatQueryDOExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from s2_chat_query
|
||||
<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_chat_query
|
||||
where question_id = #{questionId,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from s2_chat_query
|
||||
where question_id = #{questionId,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<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}, #{queryResult,jdbcType=LONGVARCHAR}
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.tencent.supersonic.chat.persistence.dataobject.ChatQueryDO">
|
||||
insert into s2_chat_query
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="questionId != null">
|
||||
question_id,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="userName != null">
|
||||
user_name,
|
||||
</if>
|
||||
<if test="queryState != null">
|
||||
query_state,
|
||||
</if>
|
||||
<if test="chatId != null">
|
||||
chat_id,
|
||||
</if>
|
||||
<if test="score != null">
|
||||
score,
|
||||
</if>
|
||||
<if test="feedback != null">
|
||||
feedback,
|
||||
</if>
|
||||
<if test="queryText != null">
|
||||
query_text,
|
||||
</if>
|
||||
<if test="queryResult != null">
|
||||
query_response,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="questionId != null">
|
||||
#{questionId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="userName != null">
|
||||
#{userName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="queryState != null">
|
||||
#{queryState,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="chatId != null">
|
||||
#{chatId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="score != null">
|
||||
#{score,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="feedback != null">
|
||||
#{feedback,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="queryText != null">
|
||||
#{queryText,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="queryResult != null">
|
||||
#{queryResult,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<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.persistence.dataobject.ChatQueryDO">
|
||||
update s2_chat_query
|
||||
<set>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="userName != null">
|
||||
user_name = #{userName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="queryState != null">
|
||||
query_state = #{queryState,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="chatId != null">
|
||||
chat_id = #{chatId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="score != null">
|
||||
score = #{score,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="feedback != null">
|
||||
feedback = #{feedback,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="queryText != null">
|
||||
query_text = #{queryText,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<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.persistence.dataobject.ChatQueryDO">
|
||||
update s2_chat_query
|
||||
set create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
user_name = #{userName,jdbcType=VARCHAR},
|
||||
query_state = #{queryState,jdbcType=INTEGER},
|
||||
chat_id = #{chatId,jdbcType=BIGINT},
|
||||
score = #{score,jdbcType=INTEGER},
|
||||
feedback = #{feedback,jdbcType=VARCHAR},
|
||||
query_text = #{queryText,jdbcType=LONGVARCHAR},
|
||||
query_response = #{queryResult,jdbcType=LONGVARCHAR}
|
||||
where question_id = #{questionId,jdbcType=BIGINT}
|
||||
</update>
|
||||
<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},
|
||||
query_state = #{queryState,jdbcType=INTEGER},
|
||||
chat_id = #{chatId,jdbcType=BIGINT},
|
||||
score = #{score,jdbcType=INTEGER},
|
||||
feedback = #{feedback,jdbcType=VARCHAR}
|
||||
where question_id = #{questionId,jdbcType=BIGINT}
|
||||
</update>
|
||||
<include refid="Base_Column_List"/>
|
||||
,
|
||||
<include refid="Blob_Column_List"/>
|
||||
from s2_chat_query
|
||||
<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.ChatQueryDOExample"
|
||||
resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List"/>
|
||||
from s2_chat_query
|
||||
<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_chat_query
|
||||
where question_id = #{questionId,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete
|
||||
from s2_chat_query
|
||||
where question_id = #{questionId,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<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},
|
||||
#{queryResult,jdbcType=LONGVARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective"
|
||||
parameterType="com.tencent.supersonic.chat.persistence.dataobject.ChatQueryDO">
|
||||
insert into s2_chat_query
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="questionId != null">
|
||||
question_id,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="userName != null">
|
||||
user_name,
|
||||
</if>
|
||||
<if test="queryState != null">
|
||||
query_state,
|
||||
</if>
|
||||
<if test="chatId != null">
|
||||
chat_id,
|
||||
</if>
|
||||
<if test="score != null">
|
||||
score,
|
||||
</if>
|
||||
<if test="feedback != null">
|
||||
feedback,
|
||||
</if>
|
||||
<if test="queryText != null">
|
||||
query_text,
|
||||
</if>
|
||||
<if test="queryResult != null">
|
||||
query_response,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="questionId != null">
|
||||
#{questionId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="userName != null">
|
||||
#{userName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="queryState != null">
|
||||
#{queryState,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="chatId != null">
|
||||
#{chatId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="score != null">
|
||||
#{score,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="feedback != null">
|
||||
#{feedback,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="queryText != null">
|
||||
#{queryText,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="queryResult != null">
|
||||
#{queryResult,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<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.persistence.dataobject.ChatQueryDO">
|
||||
update s2_chat_query
|
||||
<set>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="userName != null">
|
||||
user_name = #{userName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="queryState != null">
|
||||
query_state = #{queryState,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="chatId != null">
|
||||
chat_id = #{chatId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="score != null">
|
||||
score = #{score,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="feedback != null">
|
||||
feedback = #{feedback,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="queryText != null">
|
||||
query_text = #{queryText,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<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.persistence.dataobject.ChatQueryDO">
|
||||
update s2_chat_query
|
||||
set create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
user_name = #{userName,jdbcType=VARCHAR},
|
||||
query_state = #{queryState,jdbcType=INTEGER},
|
||||
chat_id = #{chatId,jdbcType=BIGINT},
|
||||
score = #{score,jdbcType=INTEGER},
|
||||
feedback = #{feedback,jdbcType=VARCHAR},
|
||||
query_text = #{queryText,jdbcType=LONGVARCHAR},
|
||||
query_response = #{queryResult,jdbcType=LONGVARCHAR}
|
||||
where question_id = #{questionId,jdbcType=BIGINT}
|
||||
</update>
|
||||
<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},
|
||||
query_state = #{queryState,jdbcType=INTEGER},
|
||||
chat_id = #{chatId,jdbcType=BIGINT},
|
||||
score = #{score,jdbcType=INTEGER},
|
||||
feedback = #{feedback,jdbcType=VARCHAR}
|
||||
where question_id = #{questionId,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
||||
@@ -1,276 +1,297 @@
|
||||
<?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.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="parse_mode_config" jdbcType="LONGVARCHAR" property="parseModeConfig" />
|
||||
<result column="config" jdbcType="LONGVARCHAR" property="config" />
|
||||
<result column="comment" jdbcType="LONGVARCHAR" property="comment" />
|
||||
</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>
|
||||
<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="model" jdbcType="VARCHAR" property="model"/>
|
||||
<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="parse_mode_config" jdbcType="LONGVARCHAR" property="parseModeConfig"/>
|
||||
<result column="config" jdbcType="LONGVARCHAR" property="config"/>
|
||||
<result column="comment" jdbcType="LONGVARCHAR" property="comment"/>
|
||||
</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>
|
||||
</trim>
|
||||
</if>
|
||||
</foreach>
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Base_Column_List">
|
||||
id, type, domain, pattern, parse_mode, name, created_at, created_by, updated_at,
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Base_Column_List">
|
||||
id
|
||||
, type, model, pattern, parse_mode, name, created_at, created_by, updated_at,
|
||||
updated_by
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
parse_mode_config, config, comment
|
||||
</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, parse_mode_config, config,
|
||||
comment)
|
||||
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}, #{parseModeConfig,jdbcType=LONGVARCHAR}, #{config,jdbcType=LONGVARCHAR},
|
||||
#{comment,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="parseModeConfig != null">
|
||||
parse_mode_config,
|
||||
</if>
|
||||
<if test="config != null">
|
||||
config,
|
||||
</if>
|
||||
<if test="comment != null">
|
||||
comment,
|
||||
</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="parseModeConfig != null">
|
||||
#{parseModeConfig,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="config != null">
|
||||
#{config,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="comment != null">
|
||||
#{comment,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="parseModeConfig != null">
|
||||
parse_mode_config = #{parseModeConfig,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="config != null">
|
||||
config = #{config,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="comment != null">
|
||||
comment = #{comment,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},
|
||||
parse_mode_config = #{parseModeConfig,jdbcType=LONGVARCHAR},
|
||||
config = #{config,jdbcType=LONGVARCHAR},
|
||||
comment = #{comment,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>
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
parse_mode_config
|
||||
, config, comment
|
||||
</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, model,
|
||||
pattern, parse_mode, name,
|
||||
created_at, created_by, updated_at,
|
||||
updated_by, parse_mode_config, config,
|
||||
comment)
|
||||
values (#{id,jdbcType=BIGINT}, #{type,jdbcType=VARCHAR}, #{model,jdbcType=VARCHAR},
|
||||
#{pattern,jdbcType=VARCHAR}, #{parseMode,jdbcType=VARCHAR},
|
||||
#{name,jdbcType=VARCHAR},
|
||||
#{createdAt,jdbcType=TIMESTAMP}, #{createdBy,jdbcType=VARCHAR},
|
||||
#{updatedAt,jdbcType=TIMESTAMP},
|
||||
#{updatedBy,jdbcType=VARCHAR}, #{parseModeConfig,jdbcType=LONGVARCHAR},
|
||||
#{config,jdbcType=LONGVARCHAR},
|
||||
#{comment,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="model != null">
|
||||
model,
|
||||
</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="parseModeConfig != null">
|
||||
parse_mode_config,
|
||||
</if>
|
||||
<if test="config != null">
|
||||
config,
|
||||
</if>
|
||||
<if test="comment != null">
|
||||
comment,
|
||||
</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="model != null">
|
||||
#{model,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="parseModeConfig != null">
|
||||
#{parseModeConfig,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="config != null">
|
||||
#{config,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="comment != null">
|
||||
#{comment,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="model != null">
|
||||
model = #{model,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="parseModeConfig != null">
|
||||
parse_mode_config = #{parseModeConfig,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="config != null">
|
||||
config = #{config,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="comment != null">
|
||||
comment = #{comment,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},
|
||||
model = #{model,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},
|
||||
parse_mode_config = #{parseModeConfig,jdbcType=LONGVARCHAR},
|
||||
config = #{config,jdbcType=LONGVARCHAR},
|
||||
comment = #{comment,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},
|
||||
model = #{model,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