解决竞争问题

This commit is contained in:
wsczx
2022-10-17 18:05:06 +08:00
parent d277f1084f
commit 42f60a4d9d
2 changed files with 5 additions and 3 deletions

View File

@@ -135,9 +135,6 @@ func checkLocalUser(name, pwd, group string) error {
// 用户过期时间到达后,更新用户状态,并返回一个状态为过期的用户切片
func CheckUserlimittime() []interface{} {
//初始化xorm时区
xdb.DatabaseTZ = time.Local
xdb.TZLocation = time.Local
u := &User{Status: 2}
xdb.Where("limittime <= ?", time.Now()).And("status = ?", 1).Update(u)
user := make(map[int64]User)