|
|
@@ -58,12 +58,13 @@ class UserController
|
|
|
$info['commissionCount'] = bcsub($info['brokerage_price'], $info['broken_commission'], 2);
|
|
|
if ($info['commissionCount'] < 0)
|
|
|
$info['commissionCount'] = 0;
|
|
|
- $buy = AuctionOrder::where([['status', '=', 3], ['uid', '=', $request->uid()]])->sum('price');// 购买商品总额
|
|
|
- $sell = AuctionOrder::where([['status', '=', 3], ['collection_id', '=', $request->uid()]])->sum('price');// 出售商品总额
|
|
|
+// $buy = AuctionOrder::where([['status', '=', 3], ['uid', '=', $request->uid()]])->sum('price');// 购买商品总额
|
|
|
+// $sell = AuctionOrder::where([['status', '=', 3], ['collection_id', '=', $request->uid()]])->sum('price');// 出售商品总额
|
|
|
+ $sell = UserBill::where('uid', $info['uid'])->where('type', 'gs_integral')->sum('number');
|
|
|
$level = UserLevel::where('id', $info['level'])->find();
|
|
|
$info['level_name'] = $level['name']? $level['name'] : '会员';
|
|
|
if ($sell){
|
|
|
- $info['profit'] = (bcmul($sell, 0.005, 2)+bcmul($sell, 0.005, 2));
|
|
|
+ $info['profit'] = bcmul($sell, 2, 2);
|
|
|
}else{
|
|
|
$info['profit'] = 0; // 收益
|
|
|
}
|