|
|
@@ -556,9 +556,9 @@ class User extends BaseModel
|
|
|
$model = $model->order($orderBy);
|
|
|
$model = $model->page($page, $limit);
|
|
|
$list = $model->select()->each(function ($item) {
|
|
|
- $item['mining'] = UserMiningMachine::where('status', 'in', [0, 1])->where('mining_start_time', '<=', time())
|
|
|
+ $item['mining'] = UserMiningMachine::where('uid', $item['uid'])->where('status', 'in', [0, 1])->where('mining_start_time', '<=', time())
|
|
|
->where('mining_end_time', '>', time())->where('paid', 1)->sum('num');
|
|
|
- $item['wait_mining'] = UserMiningMachine::where('status', 'in', [0, 1])->where('mining_start_time', '>', time())
|
|
|
+ $item['wait_mining'] = UserMiningMachine::where('uid', $item['uid'])->where('status', 'in', [0, 1])->where('mining_start_time', '>', time())
|
|
|
->where('mining_end_time', '>', time())->where('paid', 1)->sum('num');
|
|
|
});
|
|
|
if ($list) return $list->toArray();
|