package handler import ( "fmt" "github.com/gin-gonic/gin" "youngee_b_api/model/http_model" "youngee_b_api/service" ) func WrapTalentLocalListHandler(ctx *gin.Context) { handler := newTalentLocalListHandler(ctx) baseRun(handler) } func newTalentLocalListHandler(ctx *gin.Context) *TalentLocalListHandler { return &TalentLocalListHandler{ req: http_model.NewTalentLocalListRequest(), resp: http_model.NewTalentLocalListResponse(), ctx: ctx, } } type TalentLocalListHandler struct { req *http_model.TalentLocalListRequest resp *http_model.CommonResponse ctx *gin.Context } func (h *TalentLocalListHandler) getRequest() interface{} { return h.req } func (h *TalentLocalListHandler) getContext() *gin.Context { return h.ctx } func (h *TalentLocalListHandler) getResponse() interface{} { return h.resp } func (h *TalentLocalListHandler) run() { talentListData, err := service.STCooperate.GetTalentLocalList(h.ctx, h.req) if err != nil { h.resp.Message = "查询失败" h.resp.Data = err fmt.Println(err) } h.resp.Message = "ok" h.resp.Data = talentListData } func (h *TalentLocalListHandler) checkParam() error { return nil }