<?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.stylefeng.guns.modular.shunfeng.dao.AppComplaintsMapper">
|
|
<!-- 通用查询映射结果 -->
|
<resultMap id="BaseResultMap" type="com.stylefeng.guns.modular.shunfeng.model.AppComplaints">
|
<id column="id" property="id" />
|
<result column="addTime" property="addTime" />
|
<result column="userId" property="userId" />
|
<result column="context" property="content" />
|
<result column="reMark" property="reMark" />
|
<result column="phone" property="phone" />
|
</resultMap>
|
|
<!-- 通用查询结果列 -->
|
<sql id="Base_Column_List">
|
id, addTime, userId, context, reMark, phone
|
</sql>
|
<!--获取投诉列表(出租车)-->
|
<select id="getAppComplaintsTaxi" resultType="map">
|
select c.*,d.`name` as driverName,d.phone as driverPhone_ ,u.nickName ,u.phone as userPhone_ from app_complaints c
|
left join app_driver_taxi d on c.driverId =d.id
|
left join app_user_info u on c.userId=u.id
|
<where>
|
<if test="type!=null">
|
and c.type=2
|
</if>
|
<if test="beginTime != null and beginTime != ''">
|
and c.addTime >= CONCAT(#{beginTime},' 00:00:00')
|
</if>
|
<if test=" endTime != null and endTime != ''">
|
and c.addTime <= CONCAT(#{endTime},' 23:59:59')
|
</if>
|
<if test="userName!=null and userName!=''">
|
and (u.nickName like '%${userName}%' or u.phone like '%${userName}%')
|
</if>
|
<if test="driverName!=null and driverName!=''">
|
and (d.name like '%${driverName}%' or d.phone like '%${driverName}%')
|
</if>
|
</where>
|
order by c.addTime desc
|
</select>
|
<!--顺风车投诉-->
|
<select id="getAppComplaintsRide" resultType="map">
|
select c.*,u1.realName as driverName,u1.phone as driverPhone_ ,u.nickName ,u.phone as userPhone_ from app_complaints c
|
left join app_user_info u1 on u1.driverId=c.driverId
|
left join app_user_info u on c.userId=u.id
|
<where>
|
<if test="type!=null">
|
and c.type=#{type}
|
</if>
|
<if test="beginTime != null and beginTime != ''">
|
and c.addTime >= CONCAT(#{beginTime},' 00:00:00')
|
</if>
|
<if test=" endTime != null and endTime != ''">
|
and c.addTime <= CONCAT(#{endTime},' 23:59:59')
|
</if>
|
<if test="userName!=null and userName!=''">
|
and (u.nickName like '%${userName}%' or u.phone like '%${userName}%')
|
</if>
|
<if test="driverName!=null and driverName!=''">
|
and (u1.realName like '%${driverName}%' or u1.phone like '%${driverName}%')
|
</if>
|
</where>
|
order by c.addTime desc
|
</select>
|
</mapper>
|