fix: 遗漏sql补充

This commit is contained in:
meilin.huang
2023-06-21 15:18:43 +08:00
parent 414de9f2eb
commit 4709edcd1c
8 changed files with 33 additions and 12 deletions

View File

@@ -89,6 +89,7 @@ func (a *Account) Login(rc *req.Ctx) {
accessToken := req.CreateToken(account.Id, username)
// 若系统配置中设置开启otp双因素校验则进行otp校验
if accountLoginSecurity.UseOtp {
account.OtpSecretDecrypt()
otpSecret := account.OtpSecret
// 修改状态为已注册
otpStatus = OtpStatusReg
@@ -164,6 +165,7 @@ func (a *Account) OtpVerify(rc *req.Ctx) {
if otpStatus == OtpStatusNoReg {
update := &entity.Account{OtpSecret: otpSecret}
update.Id = accountId
update.OtpSecretEncrypt()
a.AccountApp.Update(update)
}

View File

@@ -11,6 +11,7 @@ type AccountManageVO struct {
Username string `json:"username"`
Status int `json:"status"`
LastLoginTime *time.Time `json:"lastLoginTime"`
OtpSecret string `json:"otpSecret"`
}
// 账号角色信息