Browse Source

卡完成

gorden 3 months ago
parent
commit
c1e5ab7940
1 changed files with 4 additions and 4 deletions
  1. 4 4
      app/admin/service/member/MemberService.php

+ 4 - 4
app/admin/service/member/MemberService.php

@@ -2222,14 +2222,12 @@ class MemberService
      */
     public static function accountToDone($accountId,$surplus,$added)
     {
-        dump($accountId);
         try{
             $account = MemberAccount::where('member_account_id',$accountId)
                 ->where('member_account_classify','CARD')
                 ->first();
-                dump($account);
                 if (!empty($account) && $surplus <= 0 && $added <= 0){
-                    dump("处理卡");
+                    // 卡已完成
                     $card = Card::where('join_card_member_account_id', $accountId)->first();
                     $cardExtendJson = [];
                     if (!empty($card->card_extend_json)){
@@ -2239,8 +2237,10 @@ class MemberService
                     $card->card_status = 'DONE';
                     $card->card_extend_json = json_encode($cardExtendJson);
                     $card->save();
+                    // 卡账户已完成
+                    $account->member_account_status = 'DONE';
+                    $account->save();
                 }
-                dump("处理完成");
         }catch (\Exception $e){
             Log::error("卡完成状态处理失败");
         }