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

@@ -31,6 +31,15 @@ func GetPageParam(g *gin.Context) *model.PageParam {
return &model.PageParam{PageNum: QueryInt(g, "pageNum", 1), PageSize: QueryInt(g, "pageSize", 10)}
}
// 获取查询参数,不存在则返回默认值
func Query(g *gin.Context, qm string, defaultStr string) string {
qv := g.Query(qm)
if qv == "" {
return defaultStr
}
return qv
}
// 获取查询参数中指定参数值并转为int
func QueryInt(g *gin.Context, qm string, defaultInt int) int {
qv := g.Query(qm)