package handler import ( "github.com/gin-gonic/gin" "youngee_b_api/model/http_model" "youngee_b_api/service" ) func WrapCreateWithdrawPaymentInfoHandler(ctx *gin.Context) { handler := newCreateWithdrawPaymentInfoHandler(ctx) baseRun(handler) } func newCreateWithdrawPaymentInfoHandler(ctx *gin.Context) *CreateWithdrawPaymentInfoHandler { return &CreateWithdrawPaymentInfoHandler{ req: http_model.NewCreateWithdrawPaymentInfoRequest(), resp: http_model.NewCreateWithdrawPaymentInfoResponse(), ctx: ctx, } } type CreateWithdrawPaymentInfoHandler struct { req *http_model.CreateWithdrawPaymentInfoRequest resp *http_model.CommonResponse ctx *gin.Context } func (h *CreateWithdrawPaymentInfoHandler) getRequest() interface{} { return h.req } func (h *CreateWithdrawPaymentInfoHandler) getContext() *gin.Context { return h.ctx } func (h *CreateWithdrawPaymentInfoHandler) getResponse() interface{} { return h.resp } func (h *CreateWithdrawPaymentInfoHandler) run() { err := service.Supplier.CreateWithdrawPaymentInfo(h.ctx, h.req) if err != nil { h.resp.Status = 40000 h.resp.Message = err.Error() return } h.resp.Message = "ok" } func (h *CreateWithdrawPaymentInfoHandler) checkParam() error { return nil }