|
|
@@ -494,23 +494,23 @@ |
|
|
</select> |
|
|
</select> |
|
|
|
|
|
|
|
|
<select id="userTradeDetailList" parameterType="com.iformall.domain.po.WxMerchant" resultType="com.iformall.domain.vo.WxMerchantTradeDetailVo"> |
|
|
<select id="userTradeDetailList" parameterType="com.iformall.domain.po.WxMerchant" resultType="com.iformall.domain.vo.WxMerchantTradeDetailVo"> |
|
|
select mb.`name` 'userName',mb.`phone`,co.title couponName,co.`sale_price` couponSale ,co.price couponPrice, co.price tradeAmt,o.create_date tradeDate |
|
|
|
|
|
|
|
|
select cb.`name` 'userName',cb.`phone`,co.title couponName,co.`sale_price` couponSale ,co.price couponPrice, |
|
|
|
|
|
co.price tradeAmt,o.create_date tradeDate |
|
|
from wx_coupon_order o |
|
|
from wx_coupon_order o |
|
|
left join wx_coupon co on(o.`coupon_id`=co.id) |
|
|
left join wx_coupon co on(o.`coupon_id`=co.id) |
|
|
left join wx_coupon_merchant cm on(cm.product_id=co.id) |
|
|
left join wx_coupon_merchant cm on(cm.product_id=co.id) |
|
|
inner join wx_merchant_b_user mb on(mb.id=o.b_user_id) |
|
|
|
|
|
|
|
|
left join wx_c_user_basic_info cb on o.c_user_id=cb.id |
|
|
where o.coupon_order_status=1 |
|
|
where o.coupon_order_status=1 |
|
|
and o.tenant_id=#{tenantId} |
|
|
and o.tenant_id=#{tenantId} |
|
|
<if test=" null != id "> |
|
|
<if test=" null != id "> |
|
|
and cm.`merchant_id` = #{id} |
|
|
and cm.`merchant_id` = #{id} |
|
|
and mb.merchant_id = #{id} |
|
|
|
|
|
</if> |
|
|
</if> |
|
|
|
|
|
|
|
|
<if test=" null != userName "> |
|
|
<if test=" null != userName "> |
|
|
and mb.`name` like concat('%', #{userName},'%') |
|
|
|
|
|
|
|
|
and cb.`name` like concat('%', #{userName},'%') |
|
|
</if> |
|
|
</if> |
|
|
<if test=" null != phone "> |
|
|
<if test=" null != phone "> |
|
|
and mb.`phone` like concat('%', #{phone},'%') |
|
|
|
|
|
|
|
|
and cb.`phone` like concat('%', #{phone},'%') |
|
|
</if> |
|
|
</if> |
|
|
<if test=" null != couponName "> |
|
|
<if test=" null != couponName "> |
|
|
and co.`title` like concat('%', #{couponName},'%') |
|
|
and co.`title` like concat('%', #{couponName},'%') |
|
|
|