|
@@ -238,6 +238,20 @@ class User extends BaseController
|
|
|
'category' => 'award_integral'
|
|
'category' => 'award_integral'
|
|
|
], $this->request->uid(), $page, $limit));
|
|
], $this->request->uid(), $page, $limit));
|
|
|
}
|
|
}
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 用户分红积分提现
|
|
|
|
|
+ * @return \think\response\Json
|
|
|
|
|
+ */
|
|
|
|
|
+ public function award_create()
|
|
|
|
|
+ {
|
|
|
|
|
+ $user = $this->request->userInfo();
|
|
|
|
|
+ $where= $this->request->params(['num']);
|
|
|
|
|
+ if ($where['num'] <= $user['award_integral']){
|
|
|
|
|
+ throw new \Exception('提现积分不能大于可拥有积分');
|
|
|
|
|
+ }
|
|
|
|
|
+ app()->make(UserRepository::class)->extractIntegral($user['uid'],$where['num']);
|
|
|
|
|
+ return app('json')->success('已提现至佣金');
|
|
|
|
|
+ }
|
|
|
/**
|
|
/**
|
|
|
* @return mixed
|
|
* @return mixed
|
|
|
* @throws DataNotFoundException
|
|
* @throws DataNotFoundException
|