<?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="cn.cecep.talroad.mapper.BMainSysFeedbackMapper">

    <select id="selectSysFeedbackList" resultType="cn.cecep.talroad.vo.BMainSysFeedbackVo">
        SELECT
            t1.id,
            t1.type,
            t1.content,
            t1.feedback_user,
            t1.phone,
            t1.status,
            t1.create_by_name,
            t1.create_time
        FROM b_main_sys_feedback t1
        <where>
            <if test="searchVo.type != null and searchVo.type != ''">
                AND t1.type = #{searchVo.type}
            </if>
            <if test="searchVo.content != null and searchVo.content != ''">
                AND t1.content LIKE CONCAT('%', #{searchVo.content}, '%')
            </if>
            <if test="searchVo.status != null and searchVo.status != ''">
                AND t1.status = #{searchVo.status}
            </if>
        </where>
        ORDER BY t1.create_time DESC, id
    </select>

</mapper>
