From d28815a491eac43ad9153b7a83f27ce72d64a47e Mon Sep 17 00:00:00 2001
From: zhangqian <zhangqian@123.com>
Date: 星期二, 06 二月 2024 14:47:29 +0800
Subject: [PATCH] 兼容
---
service/lru.go | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/service/lru.go b/service/lru.go
index 4a9f173..888aba5 100644
--- a/service/lru.go
+++ b/service/lru.go
@@ -16,7 +16,7 @@
func init() {
//make cache with 5 minutes TTL and 100 max keys
- userCache = expirable.NewLRU[string, *UserBaseInfo](100, nil, time.Minute*5)
+ userCache = expirable.NewLRU[string, *UserBaseInfo](100, nil, time.Minute*1) //todo zq 鏆傛椂鏀规垚 1鍒嗛挓
}
func GetUserBaseCache(adminUserId string) *UserBaseInfo {
@@ -28,7 +28,7 @@
return nil
}
var subIds []int
- if len(userRecord.SubUserIds) > 0 {
+ if userRecord.SubUserIds != "" {
subIds, _, err = userService.UUID2CrmUserId(strings.Split(userRecord.SubUserIds, ","))
if err != nil {
return nil
--
Gitblit v1.8.0