|
|
@@ -17,8 +17,7 @@ import java.util.Date;
|
|
|
*/
|
|
|
@Getter
|
|
|
@Setter
|
|
|
-@SearchBean(tables = "yh_shop ys left join yh_shop_user_distribute_shared us on us.shop_user_id = ys.user_id" +
|
|
|
- " left join order_don od on od.yhs_id = ys.id and od.status not in ('noPayment', 'close') :time:",
|
|
|
+@SearchBean(tables = "yh_shop ys left join order_don od on od.yhs_id = ys.id and od.status not in ('noPayment', 'close') :time:",
|
|
|
where = "ys.verify_status = 'success'",
|
|
|
groupBy = "ys.id,ys.user_id,ys.business_id,ys.custom_id,ys.status,ys.remark,ys.created_time,ys.update_time")
|
|
|
public class YhShopDistributeView {
|
|
|
@@ -53,13 +52,13 @@ public class YhShopDistributeView {
|
|
|
* 分销人数
|
|
|
* 其中拉新用户购买一单又退款,且无后续下单动作的不算分销用户,不统计在此字段内
|
|
|
*/
|
|
|
- @DbField("count(DISTINCT CASE WHEN od.status != 'refund' THEN us.user_id ELSE null END)")
|
|
|
+ @DbIgnore
|
|
|
private Integer distributeUserNum;
|
|
|
|
|
|
/**
|
|
|
* 邀请人数
|
|
|
*/
|
|
|
- @DbField("count(DISTINCT us.user_id)")
|
|
|
+ @DbField("select count(*) from yh_shop_user_distribute_shared where shop_user_id = ys.user_id")
|
|
|
private Integer inviteNum;
|
|
|
|
|
|
/**
|