|
@@ -76,8 +76,9 @@ class MiningController
|
|
$all = UserMiningMachine::where('get_money_type', 'in', 'XCH')->where('uid', $request->uid())->sum('num');
|
|
$all = UserMiningMachine::where('get_money_type', 'in', 'XCH')->where('uid', $request->uid())->sum('num');
|
|
$doing = UserMiningMachine::where('get_money_type', 'in', 'XCH')->where('uid', $request->uid())->where('status', 'in', [1, 2])->sum('num');
|
|
$doing = UserMiningMachine::where('get_money_type', 'in', 'XCH')->where('uid', $request->uid())->where('status', 'in', [1, 2])->sum('num');
|
|
$stand = UserMiningMachine::where('get_money_type', 'in', 'XCH')->where('uid', $request->uid())->where('status', 0)->sum('num');
|
|
$stand = UserMiningMachine::where('get_money_type', 'in', 'XCH')->where('uid', $request->uid())->where('status', 0)->sum('num');
|
|
- $all_mining = UserMining::where('get_money_type', 'in', 'XCH')->where('uid', $request->uid())->sum('get_money');
|
|
+ $umids = UserMiningMachine::where('uid', $request->uid())->column('umid');
|
|
- $all_lock = UserMining::where('get_money_type', 'in', 'XCH')->where('uid', $request->uid())->sum('lock_money');
|
|
+ $all_mining = UserMining::where('get_money_type', 'in', 'XCH')->where('umid', 'in', $umids)->sum('get_money');
|
|
|
|
+ $all_lock = UserMining::where('get_money_type', 'in', 'XCH')->where('umid', 'in', $umids)->sum('lock_money');
|
|
return app('json')->success('ok', compact('all', 'doing', 'stand', 'all_mining', 'all_lock'));
|
|
return app('json')->success('ok', compact('all', 'doing', 'stand', 'all_mining', 'all_lock'));
|
|
}
|
|
}
|
|
|
|
|