|
|
@@ -121,6 +121,7 @@ class Platform extends Api
|
|
|
$list = model('VideoShare')->where('endtime','<',time())->where('type',2)->select();
|
|
|
if($list) {
|
|
|
foreach ($list as $k => $v) {
|
|
|
+ @file_put_contents("quanju.txt", json_encode($v) . "-要扣除的版权\r\n", 8);
|
|
|
$video_user = model('VideoUser')->where('uid',$v['uid'])->where('vid',$v['vid'])->find();
|
|
|
if ($video_user){
|
|
|
// 要过期的版权数量也就是贡献值数量
|
|
|
@@ -138,7 +139,7 @@ class Platform extends Api
|
|
|
'createtime' => time(),
|
|
|
'pm' => 1,
|
|
|
];
|
|
|
- $id = Db::name('VideoShareRecord')->insertGetId($up);
|
|
|
+ $id = Db::name('VideoContributionRecord')->insertGetId($up);
|
|
|
$user = model('VideoList')->where('id',$v['vid'])->find();
|
|
|
$user_contribution = $user['share']+$v['num'];
|
|
|
$res2 = model('VideoList')->where('id',$v['vid'])->update(['share'=>$user_contribution]);
|