1.分销推广页我的店铺数量
This commit is contained in:
parent
541b928b1e
commit
a98ad465f0
@ -166,10 +166,29 @@ class DistributionLogic extends Logic
|
||||
['first_leader', '=', $userId],
|
||||
['del', '=', 0]
|
||||
])->count();
|
||||
$shop_fans = Shop::where([
|
||||
['reference_user_id', '=', $userId],
|
||||
['is_freeze', '=', 0]
|
||||
])->count();
|
||||
// $shop_fans = Shop::where([
|
||||
// ['reference_user_id', '=', $userId],
|
||||
// ['is_freeze', '=', 0]
|
||||
// ])->count();
|
||||
$shop_fans = Db::name("shop_apply")
|
||||
->alias("a")
|
||||
->join("user b","a.user_id = b.id","left")
|
||||
->where("b.first_leader",$userId)
|
||||
->where("a.audit_status",2)
|
||||
->where("a.del",0)
|
||||
->where("b.disable",0)
|
||||
->where("b.del",0)
|
||||
->count();
|
||||
$shop_fans1 = Db::name("local_store")
|
||||
->alias("a")
|
||||
->join("user b","a.user_id = b.id","left")
|
||||
->where("b.first_leader",$userId)
|
||||
->where("a.store_state",1)
|
||||
->where("a.is_delete",0)
|
||||
->where("b.disable",0)
|
||||
->where("b.del",0)
|
||||
->count();
|
||||
$shop_fans = $shop_fans+$shop_fans1;
|
||||
//今天的预估收益(待返佣)
|
||||
$today_earnings = DistributionOrderGoods::whereDay('create_time')
|
||||
->where(['status' => 1, 'user_id' => $userId])
|
||||
|
||||
Loading…
Reference in New Issue
Block a user