Browse Source

Merge branch 'test' of qk:zy_duanju/duanju_manage into test

admin 1 year ago
parent
commit
9f59a922e2

+ 3 - 1
modules/Channel/Http/Controllers/PayTemplateController.php

@@ -235,6 +235,8 @@ class PayTemplateController extends CatchController
         $name = $request->post('name');
         $name = $request->post('name');
         $status = $request->post('status',-1);
         $status = $request->post('status',-1);
         $options = $request->post('options');
         $options = $request->post('options');
+        // 1-首充模板,2-非首充模板
+        $type = $request->input('type');
         $uid = $this->getLoginUser()->id;
         $uid = $this->getLoginUser()->id;
         if(UserService::userHasRole($uid,'administrator')){
         if(UserService::userHasRole($uid,'administrator')){
             $uid = 0;
             $uid = 0;
@@ -254,7 +256,7 @@ class PayTemplateController extends CatchController
         }
         }
 
 
         if($status == 1){
         if($status == 1){
-            $this->payTemplate->where('uid',$uid)->update(['status'=>0]);
+            $this->payTemplate->where('uid',$uid)->where('type', $type)->update(['status'=>0]);
             $this->payTemplate->where('id',$id)->update(['status'=>1]);
             $this->payTemplate->where('id',$id)->update(['status'=>1]);
         }
         }
         if($template_info_update){
         if($template_info_update){

+ 2 - 2
modules/Tuiguang/Http/Controllers/PromotionController.php

@@ -52,9 +52,9 @@ class PromotionController extends CatchController
                 return $query->where('promotions.created_at', '<=', $endTime . ' 23:59:59');
                 return $query->where('promotions.created_at', '<=', $endTime . ' 23:59:59');
             })->orderBy('created_at', 'desc')
             })->orderBy('created_at', 'desc')
             ->select('promotions.id', 'promotions.name', 'promotions.created_at',
             ->select('promotions.id', 'promotions.name', 'promotions.created_at',
-            'videos.name as video_name', 'promotions.series_sequence', 'promotions.callback_type',
+                'videos.name as video_name', 'promotions.series_sequence', 'promotions.callback_type',
                 'promotions.callback_config_id', 'promotions.video_id', 'promotions.remark', 'promotions.status',
                 'promotions.callback_config_id', 'promotions.video_id', 'promotions.remark', 'promotions.status',
-            'promotions.first_charge_template_id', 'promotions.not_first_charge_template_id')
+                'promotions.first_charge_template_id', 'promotions.not_first_charge_template_id')
             ->paginate($request->input('limit', 15));
             ->paginate($request->input('limit', 15));
         $chargeTemplateIds = $result->pluck('first_charge_template_id')->merge($result->pluck('not_first_charge_template_id'))->unique();
         $chargeTemplateIds = $result->pluck('first_charge_template_id')->merge($result->pluck('not_first_charge_template_id'))->unique();