소스 검색

wesmiler 报恩寺项目提交

wesmiler 4 년 전
부모
커밋
2483dc2e08
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      app/Services/TradeService.php

+ 1 - 1
app/Services/TradeService.php

@@ -108,7 +108,7 @@ class TradeService extends BaseService
             ->orderBy('a.create_time', 'desc');
 
         $countModel = $model;
-        $totals = $countModel->groupBy('a.change_type')->sum('a.money as total');
+        $totals = $countModel->groupBy('a.change_type')->sum('a.money');
         $moneyInc = isset($totals[0])? $totals[0] : 0;
         $moneyDesc = isset($totals[1])? $totals[1] : 0;
         $totalMoney = moneyFormat($moneyInc-$moneyDesc);