WorkspaceGoodsInfo.go 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. package handler
  2. //import (
  3. // "youngee_b_api/consts"
  4. // "youngee_b_api/entity/http_model"
  5. // "youngee_b_api/service"
  6. // "youngee_b_api/util"
  7. //
  8. // "github.com/gin-gonic/gin"
  9. // "github.com/sirupsen/logrus"
  10. // log "github.com/sirupsen/logrus"
  11. //)
  12. //
  13. //func WrapWorkspaceGoodsInfoHandler(ctx *gin.Context) {
  14. // handler := newWorkspaceGoodsInfoHandler(ctx)
  15. // baseRun(handler)
  16. //}
  17. //
  18. //func newWorkspaceGoodsInfoHandler(ctx *gin.Context) *FindProductHandler {
  19. // return &FindProductHandler{
  20. // req: http_model.NewWorkspaceGoodsInfoRequest(),
  21. // resp: http_model.NewWorkspaceGoodsInfoResponse(),
  22. // ctx: ctx,
  23. // }
  24. //}
  25. //
  26. //type WorkspaceGoodsInfoHandler struct {
  27. // req *http_model.WorkspaceGoodsInfoRequest
  28. // resp *http_model.CommonResponse
  29. // ctx *gin.Context
  30. //}
  31. //
  32. //func (h *WorkspaceGoodsInfoHandler) getRequest() interface{} {
  33. // return h.req
  34. //}
  35. //func (h *WorkspaceGoodsInfoHandler) getContext() *gin.Context {
  36. // return h.ctx
  37. //}
  38. //func (h *WorkspaceGoodsInfoHandler) getResponse() interface{} {
  39. // return h.resp
  40. //}
  41. //func (h *WorkspaceGoodsInfoHandler) run() {
  42. // data := *&http_model.WorkspaceGoodsInfoRequest{}
  43. // data = *h.req
  44. // res, err := service.Product.FindByID(h.ctx, data)
  45. // if err != nil {
  46. // // 数据库查询失败,返回5001
  47. // logrus.Errorf("[FindProductHandler] call FindByID err:%+v\n", err)
  48. // util.HandlerPackErrorResp(h.resp, consts.ErrorInternal, "")
  49. // log.Info("FindProduct fail,req:%+v", h.req)
  50. // return
  51. // }
  52. // h.resp.Data = res
  53. //}
  54. //func (h *WorkspaceGoodsInfoHandler) checkParam() error {
  55. // return nil
  56. //}