新增 用户反馈信息表

This commit is contained in:
Lemon
2025-06-30 14:09:47 +08:00
parent fd527e0467
commit 0f2f25ef0b
16 changed files with 690 additions and 579 deletions

View File

@@ -0,0 +1,126 @@
<?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.jsowell.pile.mapper.MemberFeedbackInfoMapper">
<resultMap type="com.jsowell.pile.domain.MemberFeedbackInfo" id="MemberFeedbackInfoResult">
<result property="id" column="id" />
<result property="feedbackCode" column="feedback_code" />
<result property="memberId" column="member_id" />
<result property="nickName" column="nick_name" />
<result property="phoneNumber" column="phone_number" />
<result property="feedbackType" column="feedback_type" />
<result property="feedbackContent" column="feedback_content" />
<result property="status" column="status" />
<result property="replyContent" column="reply_content" />
<result property="replyTime" column="reply_time" />
<result property="createTime" column="create_time" />
<result property="updateTime" column="update_time" />
<result property="delFlag" column="del_flag" />
</resultMap>
<sql id="selectMemberFeedbackInfoVo">
select id, feedback_code, member_id, nick_name, phone_number, feedback_type, feedback_content, status, reply_content, reply_time, create_time, update_time, del_flag from member_feedback_info
</sql>
<sql id="Base_Column_List">
id, feedback_code, member_id, nick_name, phone_number, feedback_type, feedback_content, status, reply_content, reply_time, create_time, update_time, del_flag
</sql>
<select id="selectMemberFeedbackInfoList" parameterType="com.jsowell.pile.domain.MemberFeedbackInfo" resultMap="MemberFeedbackInfoResult">
<include refid="selectMemberFeedbackInfoVo"/>
<where>
<if test="feedbackCode != null and feedbackCode != ''"> and feedback_code = #{feedbackCode}</if>
<if test="memberId != null and memberId != ''"> and member_id = #{memberId}</if>
<if test="nickName != null and nickName != ''"> and nick_name like concat('%', #{nickName}, '%')</if>
<if test="phoneNumber != null and phoneNumber != ''"> and phone_number = #{phoneNumber}</if>
<if test="feedbackType != null and feedbackType != ''"> and feedback_type = #{feedbackType}</if>
<if test="feedbackContent != null and feedbackContent != ''"> and feedback_content = #{feedbackContent}</if>
<if test="status != null and status != ''"> and status = #{status}</if>
<if test="replyContent != null and replyContent != ''"> and reply_content = #{replyContent}</if>
<if test="replyTime != null "> and reply_time = #{replyTime}</if>
</where>
</select>
<select id="selectMemberFeedbackInfoById" parameterType="Long" resultMap="MemberFeedbackInfoResult">
<include refid="selectMemberFeedbackInfoVo"/>
where id = #{id}
</select>
<insert id="insertMemberFeedbackInfo" parameterType="com.jsowell.pile.domain.MemberFeedbackInfo" useGeneratedKeys="true" keyProperty="id">
insert into member_feedback_info
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="feedbackCode != null and feedbackCode != ''">feedback_code,</if>
<if test="memberId != null and memberId != ''">member_id,</if>
<if test="nickName != null and nickName != ''">nick_name,</if>
<if test="phoneNumber != null">phone_number,</if>
<if test="feedbackType != null and feedbackType != ''">feedback_type,</if>
<if test="feedbackContent != null and feedbackContent != ''">feedback_content,</if>
<if test="status != null and status != ''">status,</if>
<if test="replyContent != null">reply_content,</if>
<if test="replyTime != null">reply_time,</if>
<if test="createTime != null">create_time,</if>
<if test="updateTime != null">update_time,</if>
<if test="delFlag != null">del_flag,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="feedbackCode != null and feedbackCode != ''">#{feedbackCode},</if>
<if test="memberId != null and memberId != ''">#{memberId},</if>
<if test="nickName != null and nickName != ''">#{nickName},</if>
<if test="phoneNumber != null">#{phoneNumber},</if>
<if test="feedbackType != null and feedbackType != ''">#{feedbackType},</if>
<if test="feedbackContent != null and feedbackContent != ''">#{feedbackContent},</if>
<if test="status != null and status != ''">#{status},</if>
<if test="replyContent != null">#{replyContent},</if>
<if test="replyTime != null">#{replyTime},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="delFlag != null">#{delFlag},</if>
</trim>
</insert>
<update id="updateMemberFeedbackInfo" parameterType="com.jsowell.pile.domain.MemberFeedbackInfo">
update member_feedback_info
<trim prefix="SET" suffixOverrides=",">
<if test="feedbackCode != null and feedbackCode != ''">feedback_code = #{feedbackCode},</if>
<if test="memberId != null and memberId != ''">member_id = #{memberId},</if>
<if test="nickName != null and nickName != ''">nick_name = #{nickName},</if>
<if test="phoneNumber != null">phone_number = #{phoneNumber},</if>
<if test="feedbackType != null and feedbackType != ''">feedback_type = #{feedbackType},</if>
<if test="feedbackContent != null and feedbackContent != ''">feedback_content = #{feedbackContent},</if>
<if test="status != null and status != ''">status = #{status},</if>
<if test="replyContent != null">reply_content = #{replyContent},</if>
<if test="replyTime != null">reply_time = #{replyTime},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="delFlag != null">del_flag = #{delFlag},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteMemberFeedbackInfoById" parameterType="Long">
delete from member_feedback_info where id = #{id}
</delete>
<delete id="deleteMemberFeedbackInfoByIds" parameterType="String">
delete from member_feedback_info where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
<select id="getInfoListByMemberId" resultType="com.jsowell.pile.vo.uniapp.customer.MemberFeedbackInfoVO">
SELECT
<include refid="Base_Column_List"/>
FROM member_feedback_info
WHERE member_id = #{memberId,jdbcType=VARCHAR}
</select>
<select id="getMemberFeedbackDetailByCode" resultType="com.jsowell.pile.vo.uniapp.customer.MemberFeedbackInfoVO">
select
<include refid="Base_Column_List"/>
from member_feedback_info
where feedback_code = #{feedbackCode,jdbcType=VARCHAR}
</select>
</mapper>

View File

@@ -1,206 +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.jsowell.pile.mapper.MemberFeedbackMapper">
<resultMap type="com.jsowell.pile.domain.MemberFeedback" id="MemberFeedbackResultMap">
<result property="id" column="id"/>
<result property="memberId" column="member_id"/>
<result property="memberName" column="member_name"/>
<result property="contactInfo" column="contact_info"/>
<result property="feedbackType" column="feedback_type"/>
<result property="feedbackContent" column="feedback_content"/>
<result property="status" column="status"/>
<result property="createTime" column="create_time"/>
<result property="updateTime" column="update_time"/>
<result property="replyContent" column="reply_content"/>
<result property="replyTime" column="reply_time"/>
<result property="delFlag" column="del_flag"/>
</resultMap>
<sql id="selectCarCouponRecordVo">
select id,
member_id,
member_name,
contact_info,
feedback_type,
feedback_content,
status,
create_time,
update_time,
reply_content,
reply_time,
del_flag
from member_feedback
</sql>
<insert id="insertMemberFeedback" parameterType="com.jsowell.pile.domain.MemberFeedback">
insert into member_feedback
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="memberId != null">
member_id,
</if>
<if test="memberName != null">
member_name,
</if>
<if test="contactInfo != null">
contact_info,
</if>
<if test="feedbackType != null">
feedback_type,
</if>
<if test="feedbackContent != null">
feedback_content,
</if>
<if test="status != null">
status,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="replyContent != null">
reply_content,
</if>
<if test="replyTime != null">
reply_time,
</if>
<if test="delFlag != null">
del_flag,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id},
</if>
<if test="memberId != null">
#{memberId},
</if>
<if test="memberName != null">
#{memberName},
</if>
<if test="contactInfo != null">
#{contactInfo},
</if>
<if test="feedbackType != null">
#{feedbackType},
</if>
<if test="feedbackContent != null">
#{feedbackContent},
</if>
<if test="status != null">
#{status},
</if>
<if test="createTime != null">
#{createTime},
</if>
<if test="updateTime != null">
#{updateTime},
</if>
<if test="replyContent != null">
#{replyContent},
</if>
<if test="replyTime != null">
#{replyTime},
</if>
<if test="delFlag != null">
#{delFlag},
</if>
</trim>
</insert>
<update id="updateFeedback">
UPDATE member_feedback
<set>
<if test="status != null">
status = #{status},
</if>
<if test="replyContent != null">
reply_content = #{replyContent},
</if>
<if test="replyTime != null">
reply_time = #{replyTime},
</if>
</set>
WHERE id = #{id}
</update>
<delete id="deleteMemberFeedbackById">
DELETE
FROM member_feedback
WHERE id = #{id}
</delete>
<select id="selectMemberFeedbackList" resultType="com.jsowell.pile.vo.uniapp.customer.MemberFeedbackVO">
SELECT member_id,
member_name,
contact_info,
feedback_type,
feedback_content,
status,
create_time,
update_time,
reply_content,
reply_time
FROM member_feedback
WHERE member_id = #{memberId}
AND del_flag = '0'
ORDER BY create_time DESC
</select>
<select id="getFeedbackList" resultType="com.jsowell.pile.vo.uniapp.customer.MemberFeedbackVO">
SELECT
id,
member_id,
member_name,
contact_info,
feedback_type,
feedback_content,
status,
create_time,
update_time,
reply_content,
reply_time
FROM member_feedback
<where>
del_flag = '0'
<if test="memberId != null and memberId != ''">
AND member_id = #{memberId}
</if>
<if test="memberName != null and memberName != ''">
AND member_name = #{memberName}
</if>
<if test="feedbackType != null and feedbackType != ''">
AND feedback_type = #{feedbackType}
</if>
<if test="status != null and status != ''">
AND status = #{status}
</if>
</where>
ORDER BY create_time DESC
</select>
<select id="getFeedbackById" resultType="com.jsowell.pile.vo.uniapp.customer.MemberFeedbackVO">
SELECT id,
member_id,
member_name,
contact_info,
feedback_type,
feedback_content,
status,
create_time,
update_time,
reply_content,
reply_time
FROM member_feedback
WHERE id = #{id}
AND del_flag = '0'
</select>
</mapper>