<?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="cc.mrbird.febs.mall.mapper.MallChargeMapper">
|
|
<select id="selectChargeListInPage" resultType="cc.mrbird.febs.mall.vo.ApiChargeVo">
|
SELECT
|
b.phone account,
|
a.vip_name vipName,
|
a.vip_cnt vipCnt,
|
a.order_no orderNo,
|
a.state state,
|
a.created_time createdTime,
|
a.type type,
|
a.amount amount,
|
a.address address
|
FROM mall_charge a
|
inner join mall_member b on a.member_id = b.id
|
where member_id = #{record.memberId}
|
order by a.created_time desc
|
</select>
|
|
<select id="selectAdminChargeListInPage" resultType="cc.mrbird.febs.mall.entity.MallCharge">
|
SELECT
|
a.id id,
|
a.order_no orderNo,
|
a.state state,
|
a.address address,
|
a.amount amount,
|
a.type type,
|
a.fail_time failTime,
|
a.sys_address sysAddress,
|
a.CREATED_TIME createdTime,
|
a.vip_name vipName,
|
a.vip_cnt vipCnt,
|
b.phone account
|
FROM mall_charge a
|
inner join mall_member b on a.member_id = b.id
|
<where>
|
<if test="record != null" >
|
<if test="record.account!=null and record.account!=''">
|
and b.phone like concat('%', #{record.account},'%')
|
</if>
|
<if test="record.orderNo!=null and record.orderNo!=''">
|
and a.order_no like concat('%', #{record.orderNo},'%')
|
</if>
|
<if test="record.state!=null">
|
and a.state = #{record.state}
|
</if>
|
</if>
|
</where>
|
order by a.created_time desc
|
</select>
|
|
<select id="selectAdminWithdrawListInPage" resultType="cc.mrbird.febs.mall.entity.MallMemberWithdraw">
|
SELECT
|
a.*,
|
b.phone account
|
FROM mall_member_withdraw a
|
inner join mall_member b on a.member_id = b.id
|
<where>
|
<if test="record != null" >
|
<if test="record.account!=null and record.account!=''">
|
and b.phone like concat('%', #{record.account},'%')
|
</if>
|
<if test="record.withdrawNo!=null and record.withdrawNo!=''">
|
and a.withdraw_no like concat('%', #{record.withdrawNo},'%')
|
</if>
|
<if test="record.name!=null and record.name!=''">
|
and a.name like concat('%', #{record.name},'%')
|
</if>
|
<if test="record.status!=null">
|
and a.status = #{record.status}
|
</if>
|
</if>
|
</where>
|
order by a.created_time desc
|
</select>
|
|
</mapper>
|