Initial commit
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
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(¶m); 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)
|
||||
}
|
||||
Reference in New Issue
Block a user