addNewSubAccount.go 952 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. package handler
  2. import (
  3. "fmt"
  4. "github.com/gin-gonic/gin"
  5. "youngee_b_api/model/http_model"
  6. )
  7. func WrapAddNewSubAccountHandler(ctx *gin.Context) {
  8. handler := newAddNewSubAccountHandler(ctx)
  9. baseRun(handler)
  10. }
  11. func newAddNewSubAccountHandler(ctx *gin.Context) *AddNewSubAccountHandler {
  12. return &AddNewSubAccountHandler{
  13. req: http_model.NewRegisterRequest(),
  14. resp: http_model.NewRegisterResponse(),
  15. ctx: ctx,
  16. }
  17. }
  18. type AddNewSubAccountHandler struct {
  19. req *http_model.RegisterRequest
  20. resp *http_model.CommonResponse
  21. ctx *gin.Context
  22. }
  23. func (h *AddNewSubAccountHandler) getRequest() interface{} {
  24. return h.req
  25. }
  26. func (h *AddNewSubAccountHandler) getContext() *gin.Context {
  27. return h.ctx
  28. }
  29. func (h *AddNewSubAccountHandler) getResponse() interface{} {
  30. return h.resp
  31. }
  32. func (h *AddNewSubAccountHandler) run() {
  33. fmt.Println("AddNewSubAccountHandler Running")
  34. }
  35. func (h *AddNewSubAccountHandler) checkParam() error {
  36. return nil
  37. }