package handler import ( "github.com/gin-gonic/gin" "youngee_b_api/model/http_model" ) func WrapSendCodeTHandler(ctx *gin.Context) { handler := newSendCodeTHandler(ctx) baseRun(handler) } func newSendCodeTHandler(ctx *gin.Context) *SendCodeTHandler { return &SendCodeTHandler{ req: http_model.NewSendCodeTRequest(), resp: http_model.NewSendCodeTResponse(), ctx: ctx, } } type SendCodeTHandler struct { req *http_model.SendCodeTRequest resp *http_model.CommonResponse ctx *gin.Context } func (h *SendCodeTHandler) getRequest() interface{} { return h.req } func (h *SendCodeTHandler) getContext() *gin.Context { return h.ctx } func (h *SendCodeTHandler) getResponse() interface{} { return h.resp } func (h *SendCodeTHandler) run() { // data, err := service.Supplier.SendCodeT(h.ctx, h.req.Phone) // if err != nil { // logrus.Errorf("[FindSubAccountByEnterpriseId] call SetSession err:%+v\n", err) // util.HandlerPackErrorResp(h.resp, consts.ErrorInternal, err.Error()) // h.resp.Message = err.Error() // h.resp.Status = 40000 // return // } // h.resp.Data = data // h.resp.Status = 20000 // h.resp.Message = "ok" } func (h *SendCodeTHandler) checkParam() error { return nil }