feat : coupon

This commit is contained in:
2025-02-27 15:32:36 +08:00
parent 81bc1d5456
commit d046b34cea
11 changed files with 338 additions and 17 deletions

View File

@@ -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');
}
}