Browse Source

完善功能

gorden 10 months ago
parent
commit
6fa6de7820
1 changed files with 3 additions and 9 deletions
  1. 3 9
      app/admin/service/member/MemberService.php

+ 3 - 9
app/admin/service/member/MemberService.php

@@ -146,19 +146,17 @@ class MemberService
             } else {
                 $item['balance_type'] = 'cut';
             }
-            dump(1);
             if ($key == 0 && $item['pay_category'] == 'RECHARGE') {
-                dump(2);
                 if (!empty($item['pay_extend_json'])) {
-                    dump(3);
                     $extendJson = json_decode($item['pay_extend_json'], true);
+                    if (!isset($extendJson['added_amount'])){
+                        $extendJson['added_amount'] = 0;
+                    }
                     // 计划任务还没跑
                     if ($item['pay_category'] == 'RECHARGE' && (!isset($extendJson['notify']) || $extendJson['notify'] != 'success')) {
                         continue;
                     }
-                    dump(4);
                     if (isset($extendJson['added_amount']) && $extendJson['added_amount'] > 0) {
-                        dump(5);
                         $data[] = [
                             'join_pay_member_id' => $item['join_pay_member_id'],
                             'pay_addtimes' => $item['pay_addtimes'],
@@ -168,13 +166,9 @@ class MemberService
                             'balance_type' => 'add',
                         ];
                     }
-                    dump(6);
-                    dump($balance,$extendJson['added_amount']);
                     $balance = $balance - $extendJson['added_amount'];
-                    dump(7);
                 }
 
-                dump(8);
                 $item['balance'] = number_format($balance, 2, '.', '');
                 $balance = $balance - $item['pay_amount'];
                 $data[] = $item;