feat : coupon
This commit is contained in:
@@ -77,7 +77,10 @@ class WxFastLoginService extends LoginBaseService
|
||||
|
||||
$this->addAccount();
|
||||
|
||||
//todo 要不要生成邀请码 有没有注册奖励
|
||||
//todo 邀请过来的 邀请方有没有奖励 被邀请方有没有奖励
|
||||
|
||||
// 有没有注册奖励
|
||||
$this->addCoupon();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -95,19 +98,4 @@ class WxFastLoginService extends LoginBaseService
|
||||
|
||||
if (!$model->save()) throw new ErrException('注册失败-00001');
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加账户
|
||||
* @return void
|
||||
*/
|
||||
private function addAccount(): void
|
||||
{
|
||||
$model = new UserAccount();
|
||||
|
||||
$model->user_id = $this->userId;
|
||||
$model->balance = 0;
|
||||
$model->integral = 0;
|
||||
|
||||
if (!$model->save()) throw new ErrException('注册失败-00002');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user