|
|
@@ -1514,14 +1514,24 @@ class User extends BaseController
|
|
1514
|
1514
|
[$page, $limit] = $this->getPage();
|
|
1515
|
1515
|
$nickname = request()->param('nickname','');
|
|
1516
|
1516
|
$account = request()->param('account','');
|
|
|
1517
|
+ $user_lianc_id = request()->param('user_lianc_id', '');
|
|
|
1518
|
+ $dateRange = request()->param('dateRange', []);
|
|
1517
|
1519
|
$where = [];
|
|
|
1520
|
+
|
|
|
1521
|
+ if (!empty($dateRange)) {
|
|
|
1522
|
+ $where[] = ['o.create_time', 'between', [strtotime($dateRange[0]), strtotime($dateRange[1])]];
|
|
|
1523
|
+ }
|
|
1518
|
1524
|
if($nickname) $where[] = ['u.nickname','like','%'.$nickname.'%'];
|
|
1519
|
1525
|
if($account) $where[] = ['u.account','=',$account];
|
|
|
1526
|
+ if ($user_lianc_id) $where[] = ['o.user_lianc_id', '=', $user_lianc_id];
|
|
|
1527
|
+
|
|
1520
|
1528
|
$query = Db::name('old_user_originator')->alias('o')
|
|
1521
|
1529
|
->leftJoin('user u','o.user_id=u.uid')
|
|
1522
|
1530
|
->leftJoin('old_user_lianc lianc','lianc.id=o.user_lianc_id')
|
|
1523
|
|
- ->field('o.*,u.uid,u.real_name,u.nickname,lianc.title')
|
|
|
1531
|
+ ->field('o.*,u.uid,u.real_name,u.nickname,u.account,lianc.title, lianc.number')
|
|
1524
|
1532
|
->where($where);
|
|
|
1533
|
+ $query1 = clone($query);
|
|
|
1534
|
+ $originator_dividend_payout_money = $query1->sum('money');
|
|
1525
|
1535
|
|
|
1526
|
1536
|
$data = $query->page($page)
|
|
1527
|
1537
|
->limit($limit)
|
|
|
@@ -1536,6 +1546,7 @@ class User extends BaseController
|
|
1536
|
1546
|
}
|
|
1537
|
1547
|
$return_data['list'] = $data;
|
|
1538
|
1548
|
$return_data['count'] = $count;
|
|
|
1549
|
+ $return_data['originator_dividend_payout_money'] = $originator_dividend_payout_money;
|
|
1539
|
1550
|
return app('json')->success($return_data);
|
|
1540
|
1551
|
}
|
|
1541
|
1552
|
|