refactor: pool get options支持不创建连接

This commit is contained in:
meilin.huang
2025-05-29 20:24:48 +08:00
parent 42fbfd3c47
commit 7a17042276
15 changed files with 59 additions and 59 deletions

View File

@@ -174,8 +174,7 @@ func (r *redisAppImpl) Delete(ctx context.Context, id uint64) error {
}
// 如果存在连接,则关闭所有库连接信息
for _, dbStr := range strings.Split(re.Db, ",") {
db, _ := strconv.Atoi(dbStr)
rdm.CloseConn(re.Id, db)
rdm.CloseConn(re.Id, cast.ToInt(dbStr))
}
return r.Tx(ctx, func(ctx context.Context) error {