<?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.system.dao.TAbnormalPayOrderMapper">
|
|
|
<select id="list" resultType="java.util.Map">
|
select o.id,o.createTime, o.orderNum, t2.nickName userName, t2.phone userPhone, o.passengers, o.passengersPhone, o.payStatus, o.payTime, o.payMoney, o.insertTime, o.companyId
|
from t_abnormal_pay_order o left join t_user t2 on o.userId = t2.id
|
where 1=1
|
<if test="beginTime != null and beginTime != '' and endTime != null and endTime != ''">
|
AND (o.insertTime between CONCAT(#{beginTime},' 00:00:00') and CONCAT(#{endTime},' 23:59:59'))
|
</if>
|
<if test="orderNum != null and orderNum != ''">
|
and o.orderNum LIKE CONCAT('%',#{orderNum},'%')
|
</if>
|
<if test="userName != null and userName != ''">
|
and t2.nickName LIKE CONCAT('%',#{userName},'%')
|
</if>
|
<if test="userPhone != null and userPhone != ''">
|
and t2.phone LIKE CONCAT('%',#{userPhone},'%')
|
</if>
|
<if test="passengers != null and passengers != ''">
|
and o.passengers LIKE CONCAT('%',#{passengers},'%')
|
</if>
|
<if test="passengersPhone != null and passengersPhone != ''">
|
and o.passengersPhone LIKE CONCAT('%',#{passengersPhone},'%')
|
</if>
|
<if test="roleType != null and roleType != '' and roleType == 2">
|
and (o.companyId = #{nowUserId} or FIND_IN_SET(o.companyId,(SELECT GROUP_CONCAT(id) as ids FROM t_company where superiorId = #{nowUserId} GROUP BY superiorId)))
|
</if>
|
<if test="roleType != null and roleType != '' and roleType == 3">
|
and o.companyId = #{nowUserId}
|
</if>
|
<if test="null != abnormalStatus">
|
and o.payStatus = #{abnormalStatus}
|
</if>
|
</select>
|
|
</mapper>
|