|
|
@@ -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, '佣金结算');//后台代理佣金结算
|