Files
stat_center/api/opLogApi/opLog.go
T
2026-05-20 16:13:58 +08:00

36 lines
837 B
Go

package opLogApi
import (
"github.com/gin-gonic/gin"
"stat/api/proto"
"stat/common/stdLog"
"stat/service/opLogSer"
)
// @Tags 操作日志
// @Summary 操作日志列表
// @Description 操作日志列表
// @Accept json
// @Produce json
// @Security ApiKeyAuth
// @Param param body proto.ListOpLogReq true "参数列表"
// @Success 200 {object} proto.ListOpLogRes "成功"
// @Failure 400 {string} string "失败"
// @Security ApiKeyAuth
// @Router /api/stat/opLog/list [POST]
func ListOpLog(ctx *gin.Context) {
param := proto.ListOpLogReq{}
if err := ctx.ShouldBind(&param); err != nil {
stdLog.ServerJSON(ctx, stdLog.ParamError, err.Error())
return
}
code, data, err := opLogSer.GetOpLogList(ctx, param)
if err != nil {
stdLog.ServerJSON(ctx, code, err)
return
}
stdLog.ServerJSON(ctx, stdLog.Success, data)
}