wesmiler 2 년 전
부모
커밋
515b3b4273
2개의 변경된 파일16개의 추가작업 그리고 16개의 파일을 삭제
  1. 13 13
      app/Services/Api/AccountLogService.php
  2. 3 3
      app/Services/Api/MemberService.php

+ 13 - 13
app/Services/Api/AccountLogService.php

@@ -140,27 +140,27 @@ class AccountLogService extends BaseService
     /**
      * 分类账户统计
      * @param $userId 用户ID
-     * @param int $cointype 币种类型
+     * @param int $coinType 币种类型
      * @param int $userType 用户账户类型
      * @return \float[][]
      */
-    public function getCountsByType($userId, $cointype = 1, $userType = 1)
+    public function getCountsByType($userId, $coinType = 1, $userType = 1)
     {
         $datas = [
             'counts' => [
-                'today' => $this->getCountDataByDate($userId, $cointype, $userType,1),
-                'yestday' => $this->getCountDataByDate($userId, $cointype, $userType,2),
-                'total' => $this->getCountDataByDate($userId, $cointype, $userType,0)
+                'today' => $this->getCountDataByDate($userId, $coinType, $userType,1),
+                'yestday' => $this->getCountDataByDate($userId, $coinType, $userType,2),
+                'total' => $this->getCountDataByDate($userId, $coinType, $userType,0)
             ],
             'tables' => [
-                'gl_burn' => $this->getCountDataByType($userId, $cointype, $userType,98),
-                'level_burn' => $this->getCountDataByType($userId, $cointype, $userType,97),
-                'live' => $this->getCountDataByType($userId, $cointype, $userType,1),
-                'tip' => $this->getCountDataByType($userId, $cointype, $userType,11),
-                'global' => $this->getCountDataByType($userId, $cointype, $userType,15),
-                'gl' => $this->getCountDataByType($userId, $cointype, $userType,13),
-                'point' => $this->getCountDataByType($userId, $cointype, $userType,14),
-                'invite' => $this->getCountDataByType($userId, $cointype, $userType,12),
+                'gl_burn' => $this->getCountDataByType($userId, $coinType, $userType,98),
+                'level_burn' => $this->getCountDataByType($userId, $coinType, $userType,97),
+                'live' => $this->getCountDataByType($userId, $coinType, $userType,1),
+                'tip' => $this->getCountDataByType($userId, $coinType, $userType,11),
+                'global' => $this->getCountDataByType($userId, $coinType, $userType,15),
+                'gl' => $this->getCountDataByType($userId, $coinType, $userType,13),
+                'point' => $this->getCountDataByType($userId, $coinType, $userType,14),
+                'invite' => $this->getCountDataByType($userId, $coinType, $userType,12),
             ]
         ];
 

+ 3 - 3
app/Services/Api/MemberService.php

@@ -1079,7 +1079,7 @@ class MemberService extends BaseService
         if($coinType == 2){
             $xdPrice = ConfigService::make()->getConfigByCode('xd_price',100);
             $xdPrice = $xdPrice>0 && $xdPrice <=10000? $xdPrice : 100;
-            $money = moneyFormat($xdPrice * $usdt, 2);
+            $money = round($xdPrice * $usdt,2);
 
             if($usdt > $userUsdt){
                 $this->error = 2035;
@@ -1148,8 +1148,8 @@ class MemberService extends BaseService
             'user_type'=> 1,
             'type'=> 5,
             'coin_type'=> 1,
-            'money'=> $usdt,
-            'actual_money'=> $usdt,
+            'money'=> -$usdt,
+            'actual_money'=> -$usdt,
             'balance'=> $userUsdt,
             'date'=> date('Y-m-d'),
             'create_time'=> time(),