12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- package handler
- import (
- "github.com/gin-gonic/gin"
- "github.com/sirupsen/logrus"
- "youngee_m_api/consts"
- "youngee_m_api/db"
- "youngee_m_api/model/http_model"
- "youngee_m_api/util"
- )
- func WrapGetTalentWithdrawListHandler(ctx *gin.Context) {
- handler := newGetTalentWithdrawListHandler(ctx)
- BaseRun(handler)
- }
- type GetTalentWithdrawList struct {
- ctx *gin.Context
- req *http_model.GetTalentWithdrawListRequest
- resp *http_model.CommonResponse
- }
- func (c GetTalentWithdrawList) getContext() *gin.Context {
- return c.ctx
- }
- func (c GetTalentWithdrawList) getResponse() interface{} {
- return c.resp
- }
- func (c GetTalentWithdrawList) getRequest() interface{} {
- return c.req
- }
- func (c GetTalentWithdrawList) run() {
- data := *c.req
- res, err := db.GetTalentWithdrawList(c.ctx, &data)
- if err != nil {
- logrus.Errorf("[GetTalentWithdrawList] call GetTalentWithdrawList err:%+v\n", err)
- util.HandlerPackErrorResp(c.resp, consts.ErrorInternal, "")
- logrus.Info("GetTalentWithdrawList fail,req:%+v", c.req)
- return
- }
- c.resp.Message = "成功查询开票列表"
- c.resp.Data = res
- }
- func (c GetTalentWithdrawList) checkParam() error {
- return nil
- }
- func newGetTalentWithdrawListHandler(ctx *gin.Context) *GetTalentWithdrawList {
- return &GetTalentWithdrawList{
- ctx: ctx,
- req: http_model.NewGetTalentWithdrawListRequest(),
- resp: http_model.NewGetTalentWithdrawListResponse(),
- }
- }
|