moonsflyer 8 ماه پیش
والد
کامیت
f77dabcbef
1فایلهای تغییر یافته به همراه15 افزوده شده و 0 حذف شده
  1. 15 0
      app/common/logic/PayNotifyLogic.php

+ 15 - 0
app/common/logic/PayNotifyLogic.php

@@ -110,6 +110,21 @@ class PayNotifyLogic extends BaseLogic
             $user_service_info->status = 1;
             $user_service_info->expiration_time = time() + 365*24*60*60;
             $user_service_info->save();
+
+            $type = $user_service_info['type'];
+            switch ($type){
+                case 1:
+                    $updateData['agricultural_status']=2;
+                    break;
+                case 2:
+                    $updateData['bake_status']=2;
+                    break;
+                case  3:
+                    $updateData['air_status']=2;
+                    break;
+            }
+            $updateWhere['id'] = $user_service_info['user_id'];
+            $ret = User::where($updateWhere)->update($updateData);
         }
     }
 }