Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Q
qk_backend
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
quanku
qk_backend
Commits
2baadf77
Commit
2baadf77
authored
Oct 23, 2023
by
shiyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ai会话保存消息记录
parent
0d550166
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
497 additions
and
3 deletions
+497
-3
ch-dao/src/main/resources/com/wwdz/ch/db/mapper/ImRecordMapper.xml
...c/main/resources/com/wwdz/ch/db/mapper/ImRecordMapper.xml
+494
-0
ch-wx-api/src/main/java/com/wwdz/ch/wx/config/WebMvcConfiguration.java
.../main/java/com/wwdz/ch/wx/config/WebMvcConfiguration.java
+3
-3
No files found.
ch-dao/src/main/resources/com/wwdz/ch/db/mapper/ImRecordMapper.xml
0 → 100644
View file @
2baadf77
<?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
ch-wx-api/src/main/java/com/wwdz/ch/wx/config/WebMvcConfiguration.java
View file @
2baadf77
...
...
@@ -40,11 +40,11 @@ public class WebMvcConfiguration implements WebMvcConfigurer {
.
excludePathPatterns
(
"/*.html"
,
"/**/*.html"
,
"/**/*.css"
,
"/**/*.js"
,
"/wx/user/loginByWx"
,
"/wx/user/loginByMobile"
,
"/wx/user/loginRegCaptcha"
,
"/wx/user/updateRegCaptcha"
,
"/wx/user/login"
,
"/wx/user/fillCode"
,
"/officialAccountCallback/**"
,
"/imCallback/**"
,
"/wx/officialAccount/**"
,
"/imCallback/**"
/*
"/wx/officialAccount/**",
"/wx/item/**",
"/wx/aiAssistant/**",
"/wx/im/**"
"/wx/im/**"
*/
);
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment