<?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="org.jeecg.modules.system.app.mapper.AppFeedbackMapper">


    <select id="findPage" resultType="org.jeecg.modules.system.app.dto.FindResponseDTO">
        select  f.id,f.feedback_type,f.feedback_described,f.feedback_img,f.reply_status,f.reply_content,f.create_time,su.username,su.phone,su.avatar from nm_feedback f left join  sys_user su on f.user_id =su.id
        where f.del_flag =0
        <if test="findPageRequestDTO.phone != null and findPageRequestDTO.phone != ''">
            and su.phone=#{findPageRequestDTO.phone}
        </if>
        <if test="findPageRequestDTO.feedbackType != null and findPageRequestDTO.feedbackType != ''">
            and f.feedback_type=#{findPageRequestDTO.feedbackType}
        </if>
        <if test="findPageRequestDTO.userId != null and findPageRequestDTO.userId != ''">
            and f.user_id=#{findPageRequestDTO.userId}
        </if>
        order by f.create_time desc
    </select>
</mapper>