wesmiler il y a 3 mois
Parent
commit
ed7d5cd043

+ 8 - 8
app/Services/Api/AccountService.php

@@ -71,10 +71,7 @@ class AccountService extends BaseService
                 if(empty($item['type_text'])){
                     $item['type_text'] = isset($accountTypes[$type])? $accountTypes[$type] : '收支明细';
                 }
-                $item['change_type'] = 1;
-                if(in_array($type,[3,4])){
-                    $item['change_type'] = 2;
-                }
+
             }
         }
 
@@ -88,11 +85,7 @@ class AccountService extends BaseService
     public function getQuery($params)
     {
         $where = ['a.mark' => 1];
-        $status = isset($params['status'])? $params['status'] : 0;
         $type = isset($params['type'])? $params['type'] : 0;
-        if($status>0){
-            $where['a.status'] = $status;
-        }
         if($type>0){
             $where['a.type'] = $type;
         }
@@ -107,6 +100,13 @@ class AccountService extends BaseService
                     $query->where('a.user_id',$userId);
                 }
 
+                $status = isset($params['status'])? $params['status'] : 0;
+                if($status){
+                    $query->where('a.status',$status);
+                }else{
+                    $query->whereNotIn('a.status',[2]);
+                }
+
                 if ($keyword) {
                     $query->where(function($query) use($keyword){
                         $query->where('b.nickname','like',"%{$keyword}%")

+ 1 - 1
app/Services/Api/BalanceLogService.php

@@ -256,7 +256,7 @@ class BalanceLogService extends BaseService
             'user_id' => $userId,
             'source_order_no' => $orderNo,
             'type' => 4,
-            'money' => $money,
+            'money' => -$money,
             'before_money' => $balance,
             'date'=> date('Y-m-d'),
             'create_time' => time(),

+ 8 - 4
config/payment.php

@@ -1,11 +1,15 @@
 <?php
 return [
     'accountTypes'=>[
-        1=>'订单收入',
-        2=>'充值保证金',
-        3=>'退保申请',
-        4=>'收入提现',
+        1=>'商城消费',
+        2=>'充值缴费',
+        3=>'退',
+        4=>'佣金提现',
         5=>'提现驳回',
+        6=>'平台入款',
+        7=>'商家佣金',
+        8=>'代理收益',
+        9=>'推广收益',
     ],
     'kdCodes'=>[
         'jd'=>'京东快递',