会员列表返回充值金额
This commit is contained in:
@@ -4,12 +4,24 @@ import com.czg.account.entity.ShopUser;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* @author Administrator
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class ShopUserDTO extends ShopUser {
|
||||
/**
|
||||
* 优惠券数量
|
||||
*/
|
||||
private Long couponNum;
|
||||
/**
|
||||
* 订单数量
|
||||
*/
|
||||
private Long orderNumber;
|
||||
/**
|
||||
* 充值金额
|
||||
*/
|
||||
private BigDecimal rechargeAmount;
|
||||
}
|
||||
|
||||
@@ -50,12 +50,13 @@
|
||||
</select>
|
||||
<select id="selectPageByKeyAndIsVip" resultType="com.czg.account.dto.shopuser.ShopUserDTO">
|
||||
SELECT
|
||||
a.*, count(c.id) couponNum, count(d.id) orderNumber
|
||||
a.*, count(c.id) couponNum, count(d.id) orderNumber, IFNULL(sum(f.amount), 0) rechargeAmount
|
||||
FROM
|
||||
tb_shop_user a
|
||||
LEFT JOIN tb_user_info b ON b.id = a.user_id
|
||||
left join tb_shop_activate_coupon_record c on c.shop_user_id=a.id and c.`status`=0
|
||||
left join tb_order_info as d on d.user_id=a.user_id
|
||||
left join tb_order_info as d on d.user_id=a.user_id and d.shop_id=a.shop_id
|
||||
left join tb_shop_user_flow as f on f.user_id=a.user_id and f.shop_id=a.shop_id and f.biz_code in ('cashIn', 'wechatIn', 'alipayIn')
|
||||
|
||||
where a.shop_id=#{shopId}
|
||||
<if test="isVip != null">
|
||||
|
||||
Reference in New Issue
Block a user