用户列表返回订单数量
This commit is contained in:
parent
1f23043b12
commit
43d9b5f661
|
|
@ -11,4 +11,5 @@ import lombok.EqualsAndHashCode;
|
|||
@Data
|
||||
public class ShopUserDTO extends ShopUser {
|
||||
private Long couponNum;
|
||||
private Long orderNumber;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -50,11 +50,12 @@
|
|||
</select>
|
||||
<select id="selectPageByKeyAndIsVip" resultType="com.czg.account.dto.shopuser.ShopUserDTO">
|
||||
SELECT
|
||||
a.*, count(c.id) couponNum
|
||||
a.*, count(c.id) couponNum, count(d.id) orderNumber
|
||||
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
|
||||
|
||||
where a.shop_id=#{shopId}
|
||||
<if test="isVip != null">
|
||||
|
|
|
|||
Loading…
Reference in New Issue