zz преди 6 години
родител
ревизия
41656bfdab

+ 2 - 2
app/Http/Controllers/Wap/Pay/OrdersController.php

@@ -1509,8 +1509,8 @@ class OrdersController extends Controller
         $gxhp = ReadRecordService::getByField($uid,'gxhp');
         if($gxhp){
             OrderParamService::create($order_id,$gxhp);
-        }
-    }
+}
+}
 
     private function substituteOrderPrice($order_id,$prize_fee=500)
     {

+ 1 - 1
app/Modules/Subscribe/Models/OrderParam.php

@@ -7,5 +7,5 @@ use Illuminate\Database\Eloquent\Model;
 class OrderParam extends Model
 {
     protected $table = 'order_params';
-    protected $fillable = ['order_id','gxhp'];
+    protected $fillable = ['order_id','gxhp','appid','bid','data_hour_key','times'];
 }

+ 6 - 1
app/Modules/Subscribe/Services/OrderParamService.php

@@ -14,7 +14,12 @@ class OrderParamService
 {
     public static function create($order_id,$gxhp){
         try{
-            OrderParam::create(compact('order_id','gxhp'));
+            $other_param = explode('_',$gxhp);
+            $appid = isset($other_param[0])?$other_param[0]:0;
+            $data_hour_key = isset($other_param[1])?$other_param[1]:'';
+            $bid = isset($other_param[2])?$other_param[2]:0;
+            $times = isset($other_param[3])?$other_param[3]:0;
+            OrderParam::create(compact('order_id','gxhp','appid','data_hour_key','bid','times'));
         }catch (\Exception $e){}
     }
 }