# Conflicts: # Debate_backend/target/classes/application.yml # Debate_backend/target/classes/com/learning/newdemo/Dto/ArgumentDetailDTO.class # Debate_backend/target/classes/com/learning/newdemo/Dto/ConversationDTO.class # Debate_backend/target/classes/com/learning/newdemo/Dto/DebateDetailDTO.class # Debate_backend/target/classes/com/learning/newdemo/Dto/ReviewDetailDTO.class # Debate_backend/target/classes/com/learning/newdemo/controller/WxAIController.class # Debate_backend/target/classes/com/learning/newdemo/controller/WxConversationController.class # Debate_backend/target/classes/com/learning/newdemo/entity/WxArgument.class # Debate_backend/target/classes/com/learning/newdemo/entity/WxConversation.class # Debate_backend/target/classes/com/learning/newdemo/entity/WxDebate.class # Debate_backend/target/classes/com/learning/newdemo/entity/WxReview.class # Debate_backend/target/classes/com/learning/newdemo/service/impl/WxUserServiceImpl.class # Debate_backend/target/classes/com/learning/newdemo/util/JwtUtil.classhot-fix
commit
14f6b2d661
@ -1,6 +1,6 @@
|
||||
package com.learning.newdemo.service;
|
||||
|
||||
public interface WxDebateService {
|
||||
String GetDebate(String history, String userMessage);
|
||||
String GetDebate(Long conversationId, String userMessage);
|
||||
long UpdateDebate(Long conversationId, String content, String userMessage, String token);
|
||||
}
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,45 +0,0 @@
|
||||
<?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.learning.newdemo.mapper.WxArgumentMapper">
|
||||
<!-- 基础结果映射 -->
|
||||
<resultMap id="BaseResultMap" type="com.learning.newdemo.entity.WxArgument">
|
||||
<id column="id" property="id" jdbcType="BIGINT"/>
|
||||
<result column="conversation_id" property="conversationId" jdbcType="BIGINT"/>
|
||||
<result column="topic" property="topic" jdbcType="VARCHAR"/>
|
||||
<result column="stance" property="stance" jdbcType="VARCHAR"/>
|
||||
<result column="content" property="content" jdbcType="LONGVARCHAR"/>
|
||||
<result column="user_message" property="userMessage" jdbcType="LONGVARCHAR"/>
|
||||
<result column="sequence" property="sequence" jdbcType="INTEGER"/>
|
||||
<result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- 可复用的列名列表 -->
|
||||
<sql id="Base_Column_List">
|
||||
id, conversation_id, topic, stance, content, user_message, sequence, create_time
|
||||
</sql>
|
||||
|
||||
<!-- 按 conversationId 查询并按 sequence 排序 -->
|
||||
<select id="selectByConversationId" resultMap="BaseResultMap" parameterType="java.lang.Long">
|
||||
SELECT
|
||||
<include refid="Base_Column_List"/>
|
||||
FROM wx_argument_record
|
||||
WHERE conversation_id = #{conversationId,jdbcType=BIGINT}
|
||||
ORDER BY sequence
|
||||
</select>
|
||||
|
||||
<!-- 插入新记录 -->
|
||||
<insert id="insert" parameterType="com.learning.newdemo.entity.WxArgument" useGeneratedKeys="true" keyProperty="id">
|
||||
INSERT INTO wx_argument_record (
|
||||
conversation_id, topic, stance, content, user_message, sequence, create_time
|
||||
)
|
||||
VALUES (
|
||||
#{conversationId,jdbcType=BIGINT},
|
||||
#{topic,jdbcType=VARCHAR},
|
||||
#{stance,jdbcType=VARCHAR},
|
||||
#{content,jdbcType=LONGVARCHAR},
|
||||
#{userMessage,jdbcType=LONGVARCHAR},
|
||||
#{sequence,jdbcType=INTEGER},
|
||||
#{createTime,jdbcType=TIMESTAMP}
|
||||
)
|
||||
</insert>
|
||||
</mapper>
|
@ -1,49 +0,0 @@
|
||||
<?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.learning.newdemo.mapper.WxConversationMapper">
|
||||
|
||||
<!-- 基础结果映射 -->
|
||||
<resultMap id="BaseResultMap" type="com.learning.newdemo.entity.WxConversation">
|
||||
<id column="id" property="id" jdbcType="BIGINT"/>
|
||||
<result column="user_id" property="userId" jdbcType="BIGINT"/>
|
||||
<result column="type" property="type" jdbcType="VARCHAR"/>
|
||||
<result column="title" property="title" jdbcType="VARCHAR"/>
|
||||
<result column="preview" property="preview" jdbcType="VARCHAR"/>
|
||||
<result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
|
||||
<result column="update_time" property="updateTime" jdbcType="TIMESTAMP"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- 可复用的列名列表 -->
|
||||
<sql id="Base_Column_List">
|
||||
id, user_id, type, title, preview, create_time, update_time
|
||||
</sql>
|
||||
|
||||
<!-- 按用户ID和类型查询对话活动 (用于接口4.1) -->
|
||||
<select id="selectByUserId" resultMap="BaseResultMap">
|
||||
SELECT <include refid="Base_Column_List"/>
|
||||
FROM wx_conversation
|
||||
WHERE user_id = #{userId}
|
||||
ORDER BY update_time DESC
|
||||
</select>
|
||||
|
||||
<!-- 插入新对话活动 (用于接口3.1/3.2/3.3) -->
|
||||
<insert id="insert" parameterType="com.learning.newdemo.entity.WxConversation"
|
||||
useGeneratedKeys="true" keyProperty="id">
|
||||
INSERT INTO wx_conversation (
|
||||
user_id, type, title, preview, create_time, update_time
|
||||
)
|
||||
VALUES (
|
||||
#{userId}, #{type}, #{title}, #{preview}, #{createTime}, #{updateTime}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<!-- 更新对话预览信息 (用于更新最后一次AI回复的预览) -->
|
||||
<update id="updatePreview">
|
||||
UPDATE wx_conversation
|
||||
SET
|
||||
preview = #{preview},
|
||||
update_time = NOW()
|
||||
WHERE id = #{conversationId}
|
||||
</update>
|
||||
|
||||
</mapper>
|
@ -1,38 +0,0 @@
|
||||
<?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.learning.newdemo.mapper.WxDebateMapper">
|
||||
<resultMap id="BaseResultMap" type="com.learning.newdemo.entity.WxDebate">
|
||||
<id column="id" property="id" jdbcType="BIGINT"/>
|
||||
<result column="conversation_id" property="conversationId" jdbcType="BIGINT"/>
|
||||
<result column="content" property="content" jdbcType="LONGVARCHAR"/>
|
||||
<result column="user_message" property="userMessage" jdbcType="LONGVARCHAR"/>
|
||||
<result column="sequence" property="sequence" jdbcType="INTEGER"/>
|
||||
<result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
id, conversation_id, content, user_message, sequence, create_time
|
||||
</sql>
|
||||
|
||||
<select id="selectByConversationId" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from wx_debate_record
|
||||
where conversation_id = #{conversationId}
|
||||
ORDER BY sequence
|
||||
</select>
|
||||
|
||||
<insert id="insert" parameterType="com.learning.newdemo.entity.WxDebate"
|
||||
useGeneratedKeys="true" keyProperty="id">
|
||||
INSERT INTO wx_debate_record (
|
||||
conversation_id, content, user_message, sequence, create_time
|
||||
)
|
||||
VALUES (
|
||||
#{conversationId,jdbcType=BIGINT},
|
||||
#{content,jdbcType=LONGNVARCHAR},
|
||||
#{userMessage,jdbcType=LONGNVARCHAR},
|
||||
#{sequence,jdbcType=INTEGER},
|
||||
#{createTime, jdbcType=TIMESTAMP}
|
||||
)
|
||||
</insert>
|
||||
</mapper>
|
@ -1,38 +0,0 @@
|
||||
<?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.learning.newdemo.mapper.WxReviewMapper">
|
||||
<resultMap id="BaseResultMap" type="com.learning.newdemo.entity.WxReview">
|
||||
<id column="id" property="id" jdbcType="BIGINT"/>
|
||||
<result column="conversation_id" property="conversationId" jdbcType="BIGINT"/>
|
||||
<result column="content" property="content" jdbcType="LONGVARCHAR"/>
|
||||
<result column="user_message" property="userMessage" jdbcType="LONGVARCHAR"/>
|
||||
<result column="sequence" property="sequence" jdbcType="INTEGER"/>
|
||||
<result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
id, conversation_id, content, user_message, sequence, create_time
|
||||
</sql>
|
||||
|
||||
<select id="selectByConversationId" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from wx_review_record
|
||||
where conversation_id = #{conversationId}
|
||||
ORDER BY sequence
|
||||
</select>
|
||||
|
||||
<insert id="insert" parameterType="com.learning.newdemo.entity.WxDebate"
|
||||
useGeneratedKeys="true" keyProperty="id">
|
||||
INSERT INTO wx_review_record (
|
||||
conversation_id, content, user_message, sequence, create_time
|
||||
)
|
||||
VALUES (
|
||||
#{conversationId,jdbcType=BIGINT},
|
||||
#{content,jdbcType=LONGNVARCHAR},
|
||||
#{userMessage,jdbcType=LONGNVARCHAR},
|
||||
#{sequence,jdbcType=INTEGER},
|
||||
#{createTime, jdbcType=TIMESTAMP}
|
||||
)
|
||||
</insert>
|
||||
</mapper>
|
@ -1,58 +0,0 @@
|
||||
<?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.learning.newdemo.mapper.WxUserMapper">
|
||||
<resultMap id="BaseResultMap" type="com.learning.newdemo.entity.WxUser">
|
||||
<id column="id" property="id" jdbcType="INTEGER"/>
|
||||
<result column="openid" property="openid" jdbcType="VARCHAR"/>
|
||||
<result column="nickname" property="nickname" jdbcType="VARCHAR"/>
|
||||
<result column="avatar_url" property="avatarUrl" jdbcType="VARCHAR"/>
|
||||
<result column="gender" property="gender" jdbcType="INTEGER"/>
|
||||
<result column="country" property="country" jdbcType="VARCHAR"/>
|
||||
<result column="province" property="province" jdbcType="VARCHAR"/>
|
||||
<result column="city" property="city" jdbcType="VARCHAR"/>
|
||||
<result column="language" property="language" jdbcType="VARCHAR"/>
|
||||
<result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
|
||||
<result column="update_time" property="updateTime" jdbcType="TIMESTAMP"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
id, openid, nickname, avatar_url, gender, country, province, city, language, create_time, update_time
|
||||
</sql>
|
||||
|
||||
<select id="selectByOpenid" resultMap="BaseResultMap" parameterType="java.lang.String">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from wx_user
|
||||
where openid = #{openid,jdbcType=VARCHAR}
|
||||
</select>
|
||||
|
||||
<insert id="insert" parameterType="com.learning.newdemo.entity.WxUser" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into wx_user (
|
||||
openid, nickname, avatar_url, gender, country, province, city, language, create_time
|
||||
)
|
||||
values (
|
||||
#{openid,jdbcType=VARCHAR},
|
||||
#{nickname,jdbcType=VARCHAR},
|
||||
#{avatarUrl,jdbcType=VARCHAR},
|
||||
#{gender,jdbcType=INTEGER},
|
||||
#{country,jdbcType=VARCHAR},
|
||||
#{province,jdbcType=VARCHAR},
|
||||
#{city,jdbcType=VARCHAR},
|
||||
#{language,jdbcType=VARCHAR},
|
||||
now()
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="updateByPrimaryKey" parameterType="com.learning.newdemo.entity.WxUser">
|
||||
update wx_user
|
||||
set nickname = #{nickname,jdbcType=VARCHAR},
|
||||
avatar_url = #{avatarUrl,jdbcType=VARCHAR},
|
||||
gender = #{gender,jdbcType=INTEGER},
|
||||
country = #{country,jdbcType=VARCHAR},
|
||||
province = #{province,jdbcType=VARCHAR},
|
||||
city = #{city,jdbcType=VARCHAR},
|
||||
language = #{language,jdbcType=VARCHAR},
|
||||
update_time = now()
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
</mapper>
|
Loading…
Reference in new issue