This commit is contained in:
2025-06-17 15:56:05 +08:00
parent 417d0671de
commit b171122a32
8 changed files with 40 additions and 41 deletions

View File

@@ -29,11 +29,11 @@ func (a *app) list(w http.ResponseWriter, r *http.Request) {
a.render.Render(ctx, w, auditlog.List(ctx))
case http.MethodPost:
var q dto.SearchDto
q.SearchTimeBegin, q.SearchTimeEnd = convertor.DefaultStartTimeAndEndTime(r.PostFormValue("timeBegin"), r.PostFormValue("timeEnd"))
q.SearchTimeBegin, q.SearchTimeEnd = convertor.DefaultTime(r.PostFormValue("timeBegin"), r.PostFormValue("timeEnd"))
q.SearchName = r.PostFormValue("name")
q.SearchEmail = r.PostFormValue("email")
q.Page = convertor.ConvertInt(r.PostFormValue("page"), 1)
q.Rows = convertor.ConvertInt(r.PostFormValue("rows"), 10)
q.Page = convertor.Int(r.PostFormValue("page"), 1)
q.Rows = convertor.Int(r.PostFormValue("rows"), 10)
res, count, err := a.auditLogService.List(r.Context(), q)
if err != nil {
a.render.JSONErr(w, err.Error())