<?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.ruoyi.management.mapper.TFeedbackMapper">
|
|
<!-- 通用查询映射结果 -->
|
<resultMap id="BaseResultMap" type="com.ruoyi.management.domain.TFeedback">
|
<id column="id" property="id" />
|
<result column="userId" property="userId" />
|
<result column="img" property="img" />
|
<result column="content" property="content" />
|
<result column="state" property="state" />
|
<result column="insertTime" property="insertTime" />
|
</resultMap>
|
|
<!-- 通用查询结果列 -->
|
<sql id="Base_Column_List">
|
id, userId, img, content, state, insertTime
|
</sql>
|
<select id="listAll" resultType="com.ruoyi.management.vo.FeedbackVO">
|
select t1.*,t2.name as name ,t2.phone as phone
|
from t_feedback t1
|
left join t_user t2 on t1.userId = t2.id
|
where 1=1
|
<if test="null != req.userName and '' != req.userName">
|
and t2.name like CONCAT('%', #{req.userName}, '%')
|
</if>
|
<if test="null != req.phone and '' != req.phone">
|
and t2.phone like CONCAT('%', #{req.phone}, '%')
|
</if>
|
<if test="null != req.state">
|
and t1.state = #{req.state}
|
</if>
|
<if test="null != req.startTime">
|
and t1.insertTime between #{req.startTime} and #{req.endTime}
|
</if>
|
order by t1.state,t1.insertTime desc
|
</select>
|
|
|
</mapper>
|