go-common/app/admin/main/reply/http/log.go

26 lines
434 B
Go
Raw Normal View History

2019-04-22 10:49:16 +00:00
package http
import (
"go-common/library/log"
bm "go-common/library/net/http/blademaster"
)
func logByRpID(c *bm.Context) {
var (
err error
v = new(struct {
RpID int64 `form:"rpid" validate:"required"`
})
)
if err = c.Bind(v); err != nil {
return
}
list, err := rpSvc.LogsByRpID(c, v.RpID)
if err != nil {
log.Error("svc.ActionInfo(%+v) error(%v)", v, err)
c.JSON(nil, err)
return
}
c.JSON(list, nil)
}