|
|
@@ -38,7 +38,7 @@ class Platform extends Api
|
|
|
public function test(){
|
|
|
$this->success('请求成功');
|
|
|
}
|
|
|
-
|
|
|
+// 用户版权购买订单和版权统计
|
|
|
public function user_share_order(){
|
|
|
$map = []; // 初始化$map数组,避免未定义时的错误
|
|
|
if(input('uid', 0) > 0){
|
|
|
@@ -208,5 +208,48 @@ class Platform extends Api
|
|
|
// }
|
|
|
$this->success('分红完成');
|
|
|
}
|
|
|
-
|
|
|
+// 用户贡献值变动记录
|
|
|
+ public function user_contribution(){
|
|
|
+ $map = []; // 初始化$map数组,避免未定义时的错误
|
|
|
+ if(input('uid', 0) > 0){
|
|
|
+ // 明确指定uid所属的表(假设主表为video_share)
|
|
|
+ $map['video_contribution_record.uid'] = input('uid');
|
|
|
+ }
|
|
|
+ list($where, $sort, $order, $offset, $limit) = $this->buildparams();
|
|
|
+ $config = $this->config();
|
|
|
+ $list = model('VideoContributionRecord')
|
|
|
+ ->with('videolist,user')
|
|
|
+ ->where($map)
|
|
|
+ ->limit($offset, $limit)
|
|
|
+ ->select();
|
|
|
+ $total = model('VideoContributionRecord')
|
|
|
+ ->with('videolist,users')
|
|
|
+ ->where($map)
|
|
|
+ ->count();
|
|
|
+// var_dump(model('VideoShare')->getLastSql());die();
|
|
|
+ $data = ['config' => $config, 'doctor' => $list,'total'=>$total];
|
|
|
+ $this->success('请求成功', $data);
|
|
|
+ }
|
|
|
+ // 用户贡献值列表
|
|
|
+ public function user_contribution_list(){
|
|
|
+ $map = []; // 初始化$map数组,避免未定义时的错误
|
|
|
+ if(input('uid', 0) > 0){
|
|
|
+ // 明确指定uid所属的表(假设主表为video_share)
|
|
|
+ $map['video_user.uid'] = input('uid');
|
|
|
+ }
|
|
|
+ list($where, $sort, $order, $offset, $limit) = $this->buildparams();
|
|
|
+ $config = $this->config();
|
|
|
+ $list = model('VideoUser')
|
|
|
+ ->with('videolist,user')
|
|
|
+ ->where($map)
|
|
|
+ ->limit($offset, $limit)
|
|
|
+ ->select();
|
|
|
+ $total = model('VideoUser')
|
|
|
+ ->with('videolist,users')
|
|
|
+ ->where($map)
|
|
|
+ ->count();
|
|
|
+// var_dump(model('VideoShare')->getLastSql());die();
|
|
|
+ $data = ['config' => $config, 'doctor' => $list,'total'=>$total];
|
|
|
+ $this->success('请求成功', $data);
|
|
|
+ }
|
|
|
}
|