Commit 2baadf77 authored by shiyu's avatar shiyu

ai会话保存消息记录

parent 0d550166
<?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.wwdz.ch.db.mapper.ImRecordMapper">
<resultMap id="BaseResultMap" type="com.wwdz.ch.db.domain.ImRecord">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="from_account" jdbcType="VARCHAR" property="fromAccount" />
<result column="to_account" jdbcType="VARCHAR" property="toAccount" />
<result column="msg_key" jdbcType="VARCHAR" property="msgKey" />
<result column="msg_time" jdbcType="TIMESTAMP" property="msgTime" />
<result column="send_msg_result" jdbcType="INTEGER" property="sendMsgResult" />
<result column="msg_type" jdbcType="INTEGER" property="msgType" />
<result column="online_only_flag" jdbcType="INTEGER" property="onlineOnlyFlag" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="state" jdbcType="INTEGER" property="state" />
</resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.wwdz.ch.db.domain.ImRecord">
<result column="msg_content" jdbcType="LONGVARCHAR" property="msgContent" />
</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="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>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
id, from_account, to_account, msg_key, msg_time, send_msg_result, msg_type, online_only_flag,
create_time, update_time, `state`
</sql>
<sql id="Blob_Column_List">
msg_content
</sql>
<select id="selectByExampleWithBLOBs" parameterType="com.wwdz.ch.db.domain.ImRecordExample" resultMap="ResultMapWithBLOBs">
select
<if test="distinct">
distinct
</if>
'true' as QUERYID,
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from im_record
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByExample" parameterType="com.wwdz.ch.db.domain.ImRecordExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
'true' as QUERYID,
<include refid="Base_Column_List" />
from im_record
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByExampleSelective" parameterType="map" resultMap="ResultMapWithBLOBs">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
select
'true' as QUERYID,
<if test="example.distinct">
distinct
</if>
<choose>
<when test="selective != null and selective.length > 0">
<foreach collection="selective" item="column" separator=",">
${column.escapedColumnName}
</foreach>
</when>
<otherwise>
id, from_account, to_account, msg_key, msg_time, send_msg_result, msg_type, online_only_flag,
create_time, update_time, `state`, msg_content
</otherwise>
</choose>
from im_record
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
<if test="example.orderByClause != null">
order by ${example.orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="ResultMapWithBLOBs">
select
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from im_record
where id = #{id,jdbcType=BIGINT}
</select>
<select id="selectByPrimaryKeySelective" parameterType="map" resultMap="ResultMapWithBLOBs">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
select
<choose>
<when test="selective != null and selective.length > 0">
<foreach collection="selective" item="column" separator=",">
${column.escapedColumnName}
</foreach>
</when>
<otherwise>
id, from_account, to_account, msg_key, msg_time, send_msg_result, msg_type, online_only_flag,
create_time, update_time, `state`, msg_content
</otherwise>
</choose>
from im_record
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from im_record
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.wwdz.ch.db.domain.ImRecordExample">
delete from im_record
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.wwdz.ch.db.domain.ImRecord">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID()
</selectKey>
insert into im_record (from_account, to_account, msg_key,
msg_time, send_msg_result, msg_type,
online_only_flag, create_time, update_time,
`state`, msg_content)
values (#{fromAccount,jdbcType=VARCHAR}, #{toAccount,jdbcType=VARCHAR}, #{msgKey,jdbcType=VARCHAR},
#{msgTime,jdbcType=TIMESTAMP}, #{sendMsgResult,jdbcType=INTEGER}, #{msgType,jdbcType=INTEGER},
#{onlineOnlyFlag,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},
#{state,jdbcType=INTEGER}, #{msgContent,jdbcType=LONGVARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.wwdz.ch.db.domain.ImRecord">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID()
</selectKey>
insert into im_record
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="fromAccount != null">
from_account,
</if>
<if test="toAccount != null">
to_account,
</if>
<if test="msgKey != null">
msg_key,
</if>
<if test="msgTime != null">
msg_time,
</if>
<if test="sendMsgResult != null">
send_msg_result,
</if>
<if test="msgType != null">
msg_type,
</if>
<if test="onlineOnlyFlag != null">
online_only_flag,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="state != null">
`state`,
</if>
<if test="msgContent != null">
msg_content,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="fromAccount != null">
#{fromAccount,jdbcType=VARCHAR},
</if>
<if test="toAccount != null">
#{toAccount,jdbcType=VARCHAR},
</if>
<if test="msgKey != null">
#{msgKey,jdbcType=VARCHAR},
</if>
<if test="msgTime != null">
#{msgTime,jdbcType=TIMESTAMP},
</if>
<if test="sendMsgResult != null">
#{sendMsgResult,jdbcType=INTEGER},
</if>
<if test="msgType != null">
#{msgType,jdbcType=INTEGER},
</if>
<if test="onlineOnlyFlag != null">
#{onlineOnlyFlag,jdbcType=INTEGER},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="state != null">
#{state,jdbcType=INTEGER},
</if>
<if test="msgContent != null">
#{msgContent,jdbcType=LONGVARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.wwdz.ch.db.domain.ImRecordExample" resultType="java.lang.Long">
select count(*) from im_record
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update im_record
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.fromAccount != null">
from_account = #{record.fromAccount,jdbcType=VARCHAR},
</if>
<if test="record.toAccount != null">
to_account = #{record.toAccount,jdbcType=VARCHAR},
</if>
<if test="record.msgKey != null">
msg_key = #{record.msgKey,jdbcType=VARCHAR},
</if>
<if test="record.msgTime != null">
msg_time = #{record.msgTime,jdbcType=TIMESTAMP},
</if>
<if test="record.sendMsgResult != null">
send_msg_result = #{record.sendMsgResult,jdbcType=INTEGER},
</if>
<if test="record.msgType != null">
msg_type = #{record.msgType,jdbcType=INTEGER},
</if>
<if test="record.onlineOnlyFlag != null">
online_only_flag = #{record.onlineOnlyFlag,jdbcType=INTEGER},
</if>
<if test="record.createTime != null">
create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if>
<if test="record.updateTime != null">
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
</if>
<if test="record.state != null">
`state` = #{record.state,jdbcType=INTEGER},
</if>
<if test="record.msgContent != null">
msg_content = #{record.msgContent,jdbcType=LONGVARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExampleWithBLOBs" parameterType="map">
update im_record
set id = #{record.id,jdbcType=BIGINT},
from_account = #{record.fromAccount,jdbcType=VARCHAR},
to_account = #{record.toAccount,jdbcType=VARCHAR},
msg_key = #{record.msgKey,jdbcType=VARCHAR},
msg_time = #{record.msgTime,jdbcType=TIMESTAMP},
send_msg_result = #{record.sendMsgResult,jdbcType=INTEGER},
msg_type = #{record.msgType,jdbcType=INTEGER},
online_only_flag = #{record.onlineOnlyFlag,jdbcType=INTEGER},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
`state` = #{record.state,jdbcType=INTEGER},
msg_content = #{record.msgContent,jdbcType=LONGVARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update im_record
set id = #{record.id,jdbcType=BIGINT},
from_account = #{record.fromAccount,jdbcType=VARCHAR},
to_account = #{record.toAccount,jdbcType=VARCHAR},
msg_key = #{record.msgKey,jdbcType=VARCHAR},
msg_time = #{record.msgTime,jdbcType=TIMESTAMP},
send_msg_result = #{record.sendMsgResult,jdbcType=INTEGER},
msg_type = #{record.msgType,jdbcType=INTEGER},
online_only_flag = #{record.onlineOnlyFlag,jdbcType=INTEGER},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
`state` = #{record.state,jdbcType=INTEGER}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.wwdz.ch.db.domain.ImRecord">
update im_record
<set>
<if test="fromAccount != null">
from_account = #{fromAccount,jdbcType=VARCHAR},
</if>
<if test="toAccount != null">
to_account = #{toAccount,jdbcType=VARCHAR},
</if>
<if test="msgKey != null">
msg_key = #{msgKey,jdbcType=VARCHAR},
</if>
<if test="msgTime != null">
msg_time = #{msgTime,jdbcType=TIMESTAMP},
</if>
<if test="sendMsgResult != null">
send_msg_result = #{sendMsgResult,jdbcType=INTEGER},
</if>
<if test="msgType != null">
msg_type = #{msgType,jdbcType=INTEGER},
</if>
<if test="onlineOnlyFlag != null">
online_only_flag = #{onlineOnlyFlag,jdbcType=INTEGER},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="state != null">
`state` = #{state,jdbcType=INTEGER},
</if>
<if test="msgContent != null">
msg_content = #{msgContent,jdbcType=LONGVARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.wwdz.ch.db.domain.ImRecord">
update im_record
set from_account = #{fromAccount,jdbcType=VARCHAR},
to_account = #{toAccount,jdbcType=VARCHAR},
msg_key = #{msgKey,jdbcType=VARCHAR},
msg_time = #{msgTime,jdbcType=TIMESTAMP},
send_msg_result = #{sendMsgResult,jdbcType=INTEGER},
msg_type = #{msgType,jdbcType=INTEGER},
online_only_flag = #{onlineOnlyFlag,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
`state` = #{state,jdbcType=INTEGER},
msg_content = #{msgContent,jdbcType=LONGVARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.wwdz.ch.db.domain.ImRecord">
update im_record
set from_account = #{fromAccount,jdbcType=VARCHAR},
to_account = #{toAccount,jdbcType=VARCHAR},
msg_key = #{msgKey,jdbcType=VARCHAR},
msg_time = #{msgTime,jdbcType=TIMESTAMP},
send_msg_result = #{sendMsgResult,jdbcType=INTEGER},
msg_type = #{msgType,jdbcType=INTEGER},
online_only_flag = #{onlineOnlyFlag,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
`state` = #{state,jdbcType=INTEGER}
where id = #{id,jdbcType=BIGINT}
</update>
<select id="selectOneByExample" parameterType="com.wwdz.ch.db.domain.ImRecordExample" resultMap="BaseResultMap">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
select
'true' as QUERYID,
<include refid="Base_Column_List" />
from im_record
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
limit 1
</select>
<select id="selectOneByExampleWithBLOBs" parameterType="com.wwdz.ch.db.domain.ImRecordExample" resultMap="ResultMapWithBLOBs">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
select
'true' as QUERYID,
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from im_record
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
limit 1
</select>
<select id="selectOneByExampleSelective" parameterType="map" resultMap="ResultMapWithBLOBs">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
select
'true' as QUERYID,
<choose>
<when test="selective != null and selective.length > 0">
<foreach collection="selective" item="column" separator=",">
${column.escapedColumnName}
</foreach>
</when>
<otherwise>
id, from_account, to_account, msg_key, msg_time, send_msg_result, msg_type, online_only_flag,
create_time, update_time, `state`, msg_content
</otherwise>
</choose>
from im_record
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
<if test="example.orderByClause != null">
order by ${example.orderByClause}
</if>
limit 1
</select>
</mapper>
\ No newline at end of file
...@@ -40,11 +40,11 @@ public class WebMvcConfiguration implements WebMvcConfigurer { ...@@ -40,11 +40,11 @@ public class WebMvcConfiguration implements WebMvcConfigurer {
.excludePathPatterns("/*.html", "/**/*.html", "/**/*.css", "/**/*.js" .excludePathPatterns("/*.html", "/**/*.html", "/**/*.css", "/**/*.js"
, "/wx/user/loginByWx", "/wx/user/loginByMobile", "/wx/user/loginRegCaptcha", "/wx/user/updateRegCaptcha", "/wx/user/login", "/wx/user/fillCode", , "/wx/user/loginByWx", "/wx/user/loginByMobile", "/wx/user/loginRegCaptcha", "/wx/user/updateRegCaptcha", "/wx/user/login", "/wx/user/fillCode",
"/officialAccountCallback/**", "/officialAccountCallback/**",
"/imCallback/**", "/imCallback/**"
"/wx/officialAccount/**", /* "/wx/officialAccount/**",
"/wx/item/**", "/wx/item/**",
"/wx/aiAssistant/**", "/wx/aiAssistant/**",
"/wx/im/**" "/wx/im/**"*/
); );
} }
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment