package handler import ( "github.com/gin-gonic/gin" "youngee_b_api/model/http_model" "youngee_b_api/service" ) func WrapSupplierAmountBillListHandler(ctx *gin.Context) { handler := newSupplierAmountBillListHandler(ctx) baseRun(handler) } func newSupplierAmountBillListHandler(ctx *gin.Context) *SupplierAmountBillListHandler { return &SupplierAmountBillListHandler{ req: http_model.SupplierAmountBillRequest(), resp: http_model.SupplierAmountBillResponse(), ctx: ctx, } } type SupplierAmountBillListHandler struct { req *http_model.SupplierAmountBillListRequest resp *http_model.CommonResponse ctx *gin.Context } func (h *SupplierAmountBillListHandler) getRequest() interface{} { return h.req } func (h *SupplierAmountBillListHandler) getContext() *gin.Context { return h.ctx } func (h *SupplierAmountBillListHandler) getResponse() interface{} { return h.resp } func (h *SupplierAmountBillListHandler) run() { data, err := service.Supplier.GetSupplierAmountBillList(h.ctx, h.req) if err != nil { h.resp.Message = err.Error() } h.resp.Data = data h.resp.Message = "成功查询" } func (h *SupplierAmountBillListHandler) checkParam() error { return nil }