mirror of
				https://gitee.com/dromara/mayfly-go
				synced 2025-11-04 08:20:25 +08:00 
			
		
		
		
	fix: 遗漏sql补充
This commit is contained in:
		@@ -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)
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -11,6 +11,7 @@ type AccountManageVO struct {
 | 
			
		||||
	Username      string     `json:"username"`
 | 
			
		||||
	Status        int        `json:"status"`
 | 
			
		||||
	LastLoginTime *time.Time `json:"lastLoginTime"`
 | 
			
		||||
	OtpSecret     string     `json:"otpSecret"`
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 账号角色信息
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user