package handler import ( "github.com/gin-gonic/gin" "youngee_b_api/model/http_model" "youngee_b_api/service" ) func WrapFullSProjectIncomeListHandler(ctx *gin.Context) { handler := newFullSProjectIncomeListHandler(ctx) baseRun(handler) } func newFullSProjectIncomeListHandler(ctx *gin.Context) *FullSProjectIncomeListHandler { return &FullSProjectIncomeListHandler{ req: http_model.NewFullSProjectIncomeRequest(), resp: http_model.NewFullSProjectIncomeResponse(), ctx: ctx, } } type FullSProjectIncomeListHandler struct { req *http_model.FullSProjectIncomeListRequest resp *http_model.CommonResponse ctx *gin.Context } func (h *FullSProjectIncomeListHandler) getRequest() interface{} { return h.req } func (h *FullSProjectIncomeListHandler) getContext() *gin.Context { return h.ctx } func (h *FullSProjectIncomeListHandler) getResponse() interface{} { return h.resp } func (h *FullSProjectIncomeListHandler) run() { incomeData, err := service.Supplier.GetSupplierIncomeList(h.ctx, h.req) if err != nil { h.resp.Data = err.Error() h.resp.Message = "查询失败" } h.resp.Data = incomeData h.resp.Message = "成功查询" } func (h *FullSProjectIncomeListHandler) checkParam() error { return nil }