WIN-2308041133\Administrator 7 月之前
父節點
當前提交
10b9dd06b8
共有 1 個文件被更改,包括 5 次插入0 次删除
  1. 5 0
      application/api/controller/Pay.php

+ 5 - 0
application/api/controller/Pay.php

@@ -780,6 +780,9 @@ class Pay extends Api
                 'pm' => 0,
             ];
             $id = Db::name('VideoContributionRecord')->insertGetId($up);
+            $share = $user['share'] + $order['num'];
+//          添加版权和贡献值
+            $res = Db::name('video_user')->where('uid', $user['id'])->where('vid', $order['vid'])->update(['contribution' => $contribution,'share'=>$share]);
         }
     }
     public function shareyuepay($money, $user_id, $id)//版权余额支付
@@ -800,6 +803,8 @@ class Pay extends Api
                     //写入日志
                     MoneyLog::create(['user_id' => $user_id, 'money' => $money, 'before' => $before, 'after' => $after, 'memo' => '用户消费']);
                     Db::name('video_share')->where('id', $id)->update(['type' => 2, 'paytype' => '余额', 'pay_time' => time()]);
+
+
                     $this->share_record($id);//添加贡献值记录
                     $this->yongjin($id, $user_id, $money, '级消费佣金结算');//佣金结算
                     $this->dailiyongjin($id, $data['vid'], 0, $user_id, $money, '佣金结算');//后台代理佣金结算