소스 검색

gift no activity

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

+ 8 - 6
app/Http/Controllers/Wap/Pay/OrdersController.php

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