修改:养殖收益 仅统计已结算收益
This commit is contained in:
parent
10d0801176
commit
0bd65f2142
|
|
@ -49,9 +49,9 @@ class IndexController extends ApiController{
|
|||
$allIncome = (float)Income::uniacid()->where('member_id', $uid)->sum('amount');
|
||||
// 可提现
|
||||
$withdrawal = (float)Income::uniacid()->where('member_id', $uid)->where('status', 0)->sum('amount');
|
||||
// 返利收益
|
||||
$rebate = Rebate::where('uid',$uid)->whereNotIn('status', [3,4])->sum('money');
|
||||
// 推荐奖收益
|
||||
// 养殖收益 统计已结算收益
|
||||
$rebate = Rebate::where('uid',$uid)->where('status',2)->sum('money');
|
||||
// 合作养殖补助
|
||||
$recommend = TeamDividendModel::uniacid()->where('member_id',$uid)->whereIn('type',[7,8])->sum('dividend_amount');
|
||||
// 平级奖
|
||||
$levelGive = TeamDividendModel::uniacid()->where('member_id',$uid)->where('type',1)->sum('dividend_amount');
|
||||
|
|
@ -301,15 +301,15 @@ class IndexController extends ApiController{
|
|||
->paginate(20)
|
||||
->toArray();
|
||||
break;
|
||||
// 返利收益
|
||||
// 养殖收益 统计已结算收益
|
||||
case 'rebate':
|
||||
$result = Rebate::where('uid',$uid)
|
||||
->selectRaw('id,uid as member_id,money as amount,status,created_at')
|
||||
->whereNotIn('status', [3,4])
|
||||
->where('status', 2)
|
||||
->paginate(20)
|
||||
->toArray();
|
||||
break;
|
||||
// 推荐奖收益
|
||||
// 合作养殖补助
|
||||
case 'recommend':
|
||||
$result = TeamDividendModel::uniacid()
|
||||
->select(['id','member_id','dividend_amount','status','created_at','type'])
|
||||
|
|
|
|||
Loading…
Reference in New Issue