update
This commit is contained in:
parent
a7c5bd3390
commit
e56acef076
@ -165,7 +165,7 @@ class UserController extends BaseApiController
|
||||
public function getCurrCycleWithdraw()
|
||||
{
|
||||
$userInfo = User::find(['id' => $this->userId]);
|
||||
// 数据字典 提前周期 单位:天数
|
||||
// 数据字典 提现周期 单位:天数
|
||||
$dictData = ConfigLogic::getDictByType('withdraw_cycle');
|
||||
$endCycle = strtotime(date('Y-m-d', strtotime("-{$dictData['withdraw_cycle'][0]['value']} day")));
|
||||
// 计算公司周期内所有用户已完成的 变动类型为任务收益金额增加 动作为增加的 未提现状态 的变动金额之和
|
||||
@ -175,6 +175,9 @@ class UserController extends BaseApiController
|
||||
public function withdraw()
|
||||
{
|
||||
$params = $this->request->param();
|
||||
if(!isset($params['amount'])) {
|
||||
return $this->fail('参数错误');
|
||||
}
|
||||
$params['user_id'] = $this->userId;
|
||||
$result = UserLogic::withdraw($params);
|
||||
if ($result) {
|
||||
|
@ -302,6 +302,7 @@ class UserLogic extends BaseLogic
|
||||
Db::startTrans();
|
||||
try {
|
||||
$user = User::findOrEmpty($params['user_id']);
|
||||
|
||||
if ($user->isEmpty()) {
|
||||
throw new DataNotFoundException('用户不存在');
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user