test.go 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. package controller
  2. type Test struct {
  3. BaseController
  4. }
  5. //
  6. //// UserAdd godoc
  7. //// @Summary 会员用户添加
  8. //// @tags Test
  9. //// @Description 会员用户添加
  10. //// @Accept x-www-form-urlencoded
  11. //// @Produce json
  12. //// @Param name formData string true "姓名"
  13. //// @Success 200 {object} controller.ResponseBase
  14. //// @Router /Test/UserAdd [post]
  15. //func (t *Test) UserAdd() (err error) {
  16. //
  17. // name := t.postString("name", true)
  18. //
  19. // err = service.Test{}.UserAdd(name)
  20. // if err != nil {
  21. // return
  22. // }
  23. //
  24. // t.Ctx().JSON(http.StatusOK, newResponseBase())
  25. // return
  26. //}
  27. //
  28. //type UserList struct {
  29. // ResponseBase
  30. // Rs []interface{}
  31. // //Rs []*gorm.ShopUserSimpleInfo
  32. //}
  33. //
  34. //// UserListQuery godoc
  35. //// @Summary 会员用户查询
  36. //// @tags Test
  37. //// @Description 会员用户查询
  38. //// @Accept x-www-form-urlencoded
  39. //// @Produce json
  40. //// @Success 200 {object} controller.UserList
  41. //// @Router /Test/UserListQuery [post]
  42. //func (t *Test) UserListQuery() (err error) {
  43. //
  44. // rs, err := service.Test{}.UserListQuery()
  45. // if err != nil {
  46. // return
  47. // }
  48. // rp := UserList{
  49. // newResponseBase(),
  50. // rs,
  51. // }
  52. // t.Ctx().JSON(http.StatusOK, rp)
  53. // return
  54. //}