package backend import ( "cron_admin/app/constants/errorcode" "cron_admin/app/http/controllers" "cron_admin/app/http/entities/backend" "cron_admin/app/services" "cron_admin/app/utils/helper" "cron_admin/app/utils/mapstructure" "github.com/gin-gonic/gin" ) func CronFuncLogsList(c *gin.Context) { request := controllers.GetRequest(c).(*backend.CronFuncLogsListRequest) count, funcLogsList, err := services.CronFuncLogsList(request, request.Page, request.Limit) if err != nil { controllers.HandRes(c, nil, errorcode.ParamError) } else { var funcLogsListResponse []backend.CronFuncLogsListResponse _ = mapstructure.DecodeWithTime(funcLogsList, &funcLogsListResponse, helper.DefaultFormatLayout) // todo 获取当前列表下的CmdName controllers.HandRes(c, gin.H{"data": funcLogsListResponse, "count": count}, err) } }