From 7c711e54b5c2f9297d70c51ee2d42e5fc296021d Mon Sep 17 00:00:00 2001 From: huanghai <10402852@qq.com> Date: Thu, 9 Jul 2020 07:52:08 +0800 Subject: [PATCH] 'commit' --- dsSso/Dao/DaoCache/DaoCache.go | 30 ------------------------------ 1 file changed, 30 deletions(-) diff --git a/dsSso/Dao/DaoCache/DaoCache.go b/dsSso/Dao/DaoCache/DaoCache.go index 9f0dfcb7..0957d452 100644 --- a/dsSso/Dao/DaoCache/DaoCache.go +++ b/dsSso/Dao/DaoCache/DaoCache.go @@ -38,20 +38,6 @@ func GetListByIds(ids []string, m Model.Selector) []map[string]interface{} { return list } -/** -功能:删除指定ID的缓存 -作者:黄海 -时间:2020-02-21 -*/ -func DeleteCacheByIds(ids []string, m Model.Selector) { - prefix := m.RedisPrefix - for i := 0; i < len(ids); i++ { - id := ids[i] - key := prefix + id - RedisUtil.DEL(key) - } -} - /*===================以下为内部函数,用于扩展从REDIS缓存中查询===========================*/ func fromDb(ids []string, m Model.Selector) []map[string]interface{} { tableName := m.TableName @@ -135,22 +121,6 @@ func batchReadRedis(ids []string, prefix string) ([]map[string]interface{}, []st return existList, notExistsIds } -/** -功能:对于简单表提供分页的通用SQL组装方法,返回通用分页的SQL语句和获取查询总数的SQL语句 -作者:黄海 -时间:2020-02-21 -*/ -func count(baseSql string) (int32, error) { - countSql := "SELECT count(*) as count from (" + baseSql + ") as t100" - var count int32 - _, err := db.SQL(countSql).Get(&count) - if err != nil { - LogUtil.Error(ErrorConst.SqlQueryError, err.Error()) - return 0, err - } - return count, nil -} - /** 功能:将指定的SQL语句计算分页的SQL 作者:黄海