feat: redis支持zset、redis数据操作界面优化

This commit is contained in:
meilin.huang
2023-04-16 00:50:36 +08:00
parent 1d858118d5
commit af55193591
40 changed files with 2362 additions and 1332 deletions

View File

@@ -83,7 +83,7 @@ func GetByIdIn(model interface{}, list interface{}, ids []uint64, orderBy ...str
global.Db.Model(model).Where("id in (?)", ids).Order(orderByStr).Find(list)
}
// 根据id列表查询
// 根据map指定条件查询列表
func SelectByMap(model interface{}, list interface{}, where map[string]interface{}, orderBy ...string) {
var orderByStr string
if orderBy == nil {
@@ -94,7 +94,7 @@ func SelectByMap(model interface{}, list interface{}, where map[string]interface
global.Db.Model(model).Where(where).Order(orderByStr).Find(list)
}
// 根据id列表查询
// 根据model指定条件统计数量
func CountBy(model interface{}) int64 {
var count int64
global.Db.Model(model).Where(model).Count(&count)