log.go 434 B

12345678910111213141516171819202122232425
  1. package http
  2. import (
  3. "go-common/library/log"
  4. bm "go-common/library/net/http/blademaster"
  5. )
  6. func logByRpID(c *bm.Context) {
  7. var (
  8. err error
  9. v = new(struct {
  10. RpID int64 `form:"rpid" validate:"required"`
  11. })
  12. )
  13. if err = c.Bind(v); err != nil {
  14. return
  15. }
  16. list, err := rpSvc.LogsByRpID(c, v.RpID)
  17. if err != nil {
  18. log.Error("svc.ActionInfo(%+v) error(%v)", v, err)
  19. c.JSON(nil, err)
  20. return
  21. }
  22. c.JSON(list, nil)
  23. }