Files
jsowell-charger-web/jsowell-pile/src/main/resources/mapper/pile/MemberFeedBackInfoMapper.xml
2025-06-30 14:09:47 +08:00

126 lines
7.2 KiB
XML

<?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>