create_contact_info.go 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. package handler
  2. import (
  3. "github.com/gin-gonic/gin"
  4. "youngee_b_api/model/http_model"
  5. )
  6. func WrapCreateContactInfoHandler(ctx *gin.Context) {
  7. handler := newCreateContactInfoHandler(ctx)
  8. baseRun(handler)
  9. }
  10. func newCreateContactInfoHandler(ctx *gin.Context) *CreateContactInfoHandler {
  11. return &CreateContactInfoHandler{
  12. req: http_model.NewCreateContactInfoRequest(),
  13. resp: http_model.NewCreateContactInfoResponse(),
  14. ctx: ctx,
  15. }
  16. }
  17. type CreateContactInfoHandler struct {
  18. req *http_model.CreateContactInfoRequest
  19. resp *http_model.CommonResponse
  20. ctx *gin.Context
  21. }
  22. func (h *CreateContactInfoHandler) getRequest() interface{} {
  23. return h.req
  24. }
  25. func (h *CreateContactInfoHandler) getContext() *gin.Context {
  26. return h.ctx
  27. }
  28. func (h *CreateContactInfoHandler) getResponse() interface{} {
  29. return h.resp
  30. }
  31. func (h *CreateContactInfoHandler) run() {
  32. //data, err := service.Supplier.GetSupplierContactInfo(h.ctx, h.req)
  33. //if err != nil {
  34. // logrus.Errorf("[FindSubAccountByEnterpriseId] call SetSession err:%+v\n", err)
  35. // util.HandlerPackErrorResp(h.resp, consts.ErrorInternal, err.Error())
  36. // log.Info("FindSubAccountByEnterpriseId fail,req:%+v", h.req)
  37. // h.resp.Message = err.Error()
  38. // h.resp.Status = 40000
  39. // return
  40. //}
  41. //h.resp.Data = data
  42. //h.resp.Status = 20000
  43. //h.resp.Message = "ok"
  44. }
  45. func (h *CreateContactInfoHandler) checkParam() error {
  46. return nil
  47. }