更新密码找回uniapp
This commit is contained in:
1 parent
7f9a66da0f
commit
3fdda89833
1304 files changed
+3503
-26132
No files matched your search
@@ -2,8 +2,6 @@ package services
|
||||
|
||||
import "server/models"
|
||||
|
||||
// OperationLogUser 根据操作日志的租户范围解析操作人信息。
|
||||
// tid 为空或为 0 时,日志来自平台管理员;否则来自租户用户。
|
||||
func OperationLogUser(tid *uint64, userID uint64) (account, name string) {
|
||||
if userID == 0 {
|
||||
return "", ""
|
||||
@@ -11,7 +9,6 @@ func OperationLogUser(tid *uint64, userID uint64) (account, name string) {
|
||||
|
||||
if tid != nil && *tid != 0 {
|
||||
var user models.SystemTenantUser
|
||||
// userID 是令牌里的 identity_id,查老表前先换算成老 uid
|
||||
if err := models.Orm.QueryTable(new(models.SystemTenantUser)).
|
||||
Filter("tid", *tid).
|
||||
Filter("uid", ResolveTenantUID(*tid, userID)).
|
||||
@@ -43,9 +40,6 @@ type operationLogUserKey struct {
|
||||
uid uint64
|
||||
}
|
||||
|
||||
// OperationLogUserResolver 请求级缓存的操作人解析器。
|
||||
// 日志列表逐行调用 OperationLogUser 时,同一 (tid,userID) 会重复执行
|
||||
// FindLegacyUID + 用户表查询(N+1),用它按键去重后每个用户只查一次。
|
||||
type OperationLogUserResolver struct {
|
||||
cache map[operationLogUserKey][2]string
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user