zz 6 년 전
부모
커밋
f91da16eae
1개의 변경된 파일7개의 추가작업 그리고 5개의 파일을 삭제
  1. 7 5
      app/Http/Controllers/Wap/Pay/OrdersController.php

+ 7 - 5
app/Http/Controllers/Wap/Pay/OrdersController.php

@@ -877,7 +877,7 @@ class OrdersController extends Controller
                 ];
                 UserService::PushUserActionToQueue($action_type, $distribution_channel_id, $param);
                 //用户属性
-                $this->userProperty($uid);
+                $this->userProperty($uid,$price,$product->type);
                 return true;
             } catch (\Exception $e) {
                 DB::rollback();
@@ -1023,7 +1023,7 @@ class OrdersController extends Controller
                     $this->successPayPushMsg($uid, $product, $order->id);
                     $this->orderStatistical($order);
                     DB::commit();
-                    $this->userProperty($uid);
+                    $this->userProperty($uid,$price,$product->type);
                     $this->huaweiActivity($order->activity_id,$uid,$product_id);
                     //redis 删除未支付的uid
                     try {
@@ -1134,7 +1134,7 @@ class OrdersController extends Controller
                 $this->successPayPushMsg($uid, $product, $order->id);
                 $this->orderStatistical($order);
                 DB::commit();
-                $this->userProperty($uid);
+                $this->userProperty($uid,$price,$product->type);
                 $this->huaweiActivity($order->activity_id,$uid,$product_id);
                 //redis 删除未支付的uid
                 $key = 'leyuee:to_send_not_pay_uid:distribution_channel_id' . $distribution_channel_id;
@@ -1271,7 +1271,7 @@ class OrdersController extends Controller
                     ];
                     UserService::PushUserActionToQueue($action_type, $distribution_channel_id, $param);
 
-                    $this->userProperty($uid);
+                    $this->userProperty($uid,$price,$product->type);
                     $this->huaweiActivity($order->activity_id,$uid,$product_id);
 
                 }
@@ -1711,11 +1711,13 @@ class OrdersController extends Controller
         return 0;
     }
 
-    private function userProperty($uid){
+    private function userProperty($uid,$price,$charge_type){
         try{
             $userproperty = UserDivisionCpcPropertyService::getUserSubscribeAndChargeInfoByUid($uid);
             if(!$userproperty) return ;
             UserDivisionCpcPropertyService::createorUpdate($userproperty);
+            //chargeGiveGift
+            $this->chargeGiveGift($uid,$userproperty,$price,$charge_type);
         }catch (\Exception $e){}
 
     }