<?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.nova.sankuai.infra.mapper.RechargeRecordMapper">
|
|
<select id="pageModel" resultType="com.nova.sankuai.domain.vo.RechargeRecordVo">
|
select
|
re.id as id,
|
su.user_phone as phone,
|
re.mechanism_id as mechanismId,
|
re.recharge_amount as rechargeAmount,
|
re.use_amount as useAmount,
|
re.creation_date as creationDate,
|
su.company_name as mechanismName,
|
re.status as status,
|
re.memo as memo
|
from recharge_record re
|
left join sys_user su on re.mechanism_id = su.id
|
<where>
|
su.delete_flag = 0
|
<if test="pageDto.mechanismId != null">
|
and re.mechanism_id = #{pageDto.mechanismId}
|
</if>
|
<if test="pageDto.mechanismName != null and pageDto.mechanismName !=''">
|
and su.company_name like concat('%',#{pageDto.mechanismName},'%')
|
</if>
|
<if test="pageDto.phone != null and pageDto.phone !=''">
|
and su.user_phone like concat('%',#{pageDto.phone},'%')
|
</if>
|
<if test="pageDto.startDate != null">
|
and re.creation_date >= #{pageDto.startDate}
|
</if>
|
<if test="pageDto.endDate != null">
|
and re.creation_date <= #{pageDto.endDate}
|
</if>
|
<if test="pageDto.status != null">
|
and re.status = #{pageDto.status}
|
</if>
|
</where>
|
order by re.creation_date desc
|
</select>
|
|
</mapper>
|