bp.go 537 B

123456789101112131415161718192021222324252627
  1. package http
  2. import (
  3. "go-common/app/service/main/vip/model"
  4. "go-common/library/log"
  5. bm "go-common/library/net/http/blademaster"
  6. )
  7. func bpList(c *bm.Context) {
  8. var (
  9. err error
  10. res *model.BcoinSalaryResp
  11. )
  12. arg := new(struct {
  13. Mid int64 `form:"mid" validate:"required"`
  14. })
  15. if err = c.Bind(arg); err != nil {
  16. log.Error("c.Bind err(%+v)", err)
  17. return
  18. }
  19. if res, err = vipSvc.BcoinGive(c, arg.Mid); err != nil {
  20. log.Error(" BcoinGive mid(%d), err(%+v)", arg.Mid, err)
  21. c.JSON(nil, err)
  22. return
  23. }
  24. c.JSON(res, nil)
  25. }