mirror of
https://gitee.com/dromara/mayfly-go
synced 2025-11-04 00:10:25 +08:00
fix: 遗漏sql补充
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package entity
|
||||
|
||||
import (
|
||||
"mayfly-go/internal/common/utils"
|
||||
"mayfly-go/pkg/model"
|
||||
"time"
|
||||
)
|
||||
@@ -26,6 +27,17 @@ func (a *Account) IsEnable() bool {
|
||||
return a.Status == AccountEnableStatus
|
||||
}
|
||||
|
||||
func (a *Account) OtpSecretEncrypt() {
|
||||
a.OtpSecret = utils.PwdAesEncrypt(a.OtpSecret)
|
||||
}
|
||||
|
||||
func (a *Account) OtpSecretDecrypt() {
|
||||
if a.OtpSecret == "-" {
|
||||
return
|
||||
}
|
||||
a.OtpSecret = utils.PwdAesDecrypt(a.OtpSecret)
|
||||
}
|
||||
|
||||
const (
|
||||
AccountEnableStatus int8 = 1 // 启用状态
|
||||
AccountDisableStatus int8 = -1 // 禁用状态
|
||||
|
||||
Reference in New Issue
Block a user