full_s_local_bill_list.go 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. package handler
  2. import (
  3. "github.com/gin-gonic/gin"
  4. "youngee_b_api/model/http_model"
  5. "youngee_b_api/service"
  6. )
  7. func WrapFullSLocalBillListHandler(ctx *gin.Context) {
  8. handler := newFullSLocalBillListHandler(ctx)
  9. baseRun(handler)
  10. }
  11. func newFullSLocalBillListHandler(ctx *gin.Context) *FullSLocalBillListHandler {
  12. return &FullSLocalBillListHandler{
  13. req: http_model.NewFullSLocalBillRequest(),
  14. resp: http_model.NewFullSLocalBillResponse(),
  15. ctx: ctx,
  16. }
  17. }
  18. type FullSLocalBillListHandler struct {
  19. req *http_model.FullSLocalBillListRequest
  20. resp *http_model.CommonResponse
  21. ctx *gin.Context
  22. }
  23. func (h *FullSLocalBillListHandler) getRequest() interface{} {
  24. return h.req
  25. }
  26. func (h *FullSLocalBillListHandler) getContext() *gin.Context {
  27. return h.ctx
  28. }
  29. func (h *FullSLocalBillListHandler) getResponse() interface{} {
  30. return h.resp
  31. }
  32. func (h *FullSLocalBillListHandler) run() {
  33. data, err := service.SLocalLife.GetFullSLocalBillList(h.ctx, h.req)
  34. if err != nil {
  35. h.resp.Message = err.Error()
  36. }
  37. h.resp.Data = data
  38. h.resp.Message = "成功查询"
  39. }
  40. func (h *FullSLocalBillListHandler) checkParam() error {
  41. return nil
  42. }