新增用户活动日志

This commit is contained in:
lanrenwo
2022-11-04 15:15:58 +08:00
parent 45ed1c34f9
commit eb8d55040c
15 changed files with 947 additions and 281 deletions

View File

@@ -14,6 +14,7 @@ type SearchCon struct {
AccessProto string `json:"access_proto"`
Date []string `json:"date"`
Info string `json:"info"`
Sort int `json:"sort"`
}
func GetAuditSession(search string) *xorm.Session {
@@ -47,6 +48,11 @@ func GetAuditSession(search string) *xorm.Session {
if searchData.Info != "" {
session.And("info LIKE ?", "%"+searchData.Info+"%")
}
if searchData.Sort == 1 {
session.OrderBy("id desc")
} else {
session.OrderBy("id asc")
}
return session
}