소스 검색

UserInfoQuery

lhs 5 년 전
부모
커밋
1e508922b6
8개의 변경된 파일66개의 추가작업 그리고 2092개의 파일을 삭제
  1. 2 2
      controller/auth.go
  2. 24 362
      controller/user.go
  3. 3 639
      docs/docs.go
  4. 3 639
      docs/swagger.json
  5. 3 432
      docs/swagger.yaml
  6. 1 1
      main.go
  7. 14 0
      model/userBodyInfo.go
  8. 16 17
      service/user.go

+ 2 - 2
controller/auth.go

@@ -101,7 +101,7 @@ func (a *Auth) GetPhoneVFCode() (err error) {
 	return
 }
 
-type LoginResponse struct {
+type StandardResponse struct {
 	ResponseBase
 	Rs map[string]string
 }
@@ -124,7 +124,7 @@ func (a *Auth) PhoneSignIn() (err error) {
 	if err != nil {
 		return
 	}
-	r := LoginResponse{
+	r := StandardResponse{
 		ResponseBase: newResponseBase(),
 		Rs: map[string]string{
 			"token": session.Token,

+ 24 - 362
controller/user.go

@@ -6,380 +6,42 @@
  */
 package controller
 
+import (
+	"net/http"
+	"video_course/model"
+	"video_course/service"
+)
+
 type User struct {
 	BaseController
 }
 
-type ShopUserInfo struct {
+type UserInfoResponse struct {
 	ResponseBase
-	PageCount int64
-	Rs        string
-}
-
-// ShopUserListQuery godoc
-// @Summary 会员用户列表(带分页)
-// @tags User
-// @Description 会员用户列表(带分页)
-// @Accept  x-www-form-urlencoded
-// @Produce  json
-// @Param token formData string true "Token"
-// @Param phone formData string false "手机号"
-// @Param name formData string false "姓名"
-// @Param start formData string true "当前条"
-// @Param tableMax formData string true "每页条数"
-// @Success 200 {object} controller.ShopUserInfo
-// @Router /User/ShopUserListQuery [post]
-func (u *User) ShopUserListQuery() (err error) {
-	//sess := u.Ctx().PostForm("Token")
-	//phone := u.Ctx().PostForm("phone")
-	//name := u.Ctx().PostForm("name")
-	//start := u.postIntNecessary("start")
-	//tableMax := u.postIntNecessary("tableMax")
-	//pageIndex := start/tableMax + 1
-	//
-	//rs, pageCount, err := service.User{}.ShopUserListQuery(sess, phone, name, pageIndex, tableMax)
-	//
-	//rp := ShopUserInfo{
-	//	newResponseBase(),
-	//	pageCount,
-	//	rs,
-	//}
-	//u.Ctx().JSON(http.StatusOK, rp)
-
-	return
-}
-
-type ShopUserSimpleInfo struct {
-	ResponseBase
-	Rs string
-	//Rs []*gorm.ShopUserSimpleInfo
-}
-
-// ShopUserSimpleQuery godoc
-// @Summary 本店会员用户基本信息查询
-// @tags User
-// @Description 本店会员用户基本信息查询
-// @Accept  x-www-form-urlencoded
-// @Produce  json
-// @Param token formData string true "Token"
-// @Param shopId formData int false "商家ID"
-// @Success 200 {object} controller.ShopUserSimpleInfo
-// @Router /User/ShopUserSimpleQuery [post]
-func (u *User) ShopUserSimpleQuery() (err error) {
-
-	//shopId := u.postInt("shopId")
-	//
-	//sess := u.Ctx().PostForm("Token")
-	//rs, err := service.User{}.ShopUserSimpleQuery(sess, shopId)
-	//
-	//rp := ShopUserSimpleInfo{
-	//	newResponseBase(),
-	//	rs,
-	//}
-	//u.Ctx().JSON(http.StatusOK, rp)
-
-	return
-}
-
-// ShopUserAdd godoc
-// @Summary 会员用户添加
-// @tags User
-// @Description 会员用户添加
-// @Accept  x-www-form-urlencoded
-// @Produce  json
-// @Param token formData string true "Token"
-// @Param shopId formData int true "店铺ID"
-// @Param phone formData string true "登陆用户名也是手机号"
-// @Param name formData string true "姓名"
-// @Param sex formData int true "性别  1:男, 2:女"
-// @Param birthday formData string true "生日"
-// @Param height formData int true "身高"
-// @Param weight formData string true "体重 "
-// @Param staticHr formData int false "静态心率"
-// @Param head formData string false "头像"
-// @Param memo formData string false "备注"
-// @Success 200 {object} controller.ResponseBase
-// @Router /User/ShopUserAdd [post]
-func (u *User) ShopUserAdd() (err error) {
-	//usercode := u.postString("phone", true)
-	//name := u.postString("name", true)
-	//phone := u.postString("phone", true)
-	//memo := u.Ctx().PostForm("memo")
-	//
-	//sex := u.postIntNecessary("sex")
-	//birthday := u.getPostFromDate("birthday")
-	//
-	//height := u.postIntNecessary("height")
-	//staticHr := u.postInt("staticHr")
-	//head := u.Ctx().PostForm("head")
-	//w := u.postFloatToInt("weight", true)
-	//
-	//// 如果未传入静息心率,则通过生日计算年龄后获取此年龄段的平均静息心率
-	//if staticHr == nil {
-	//	age := utils.GetAgeByBirthday(birthday)
-	//	hr := utils.GetStaticHrByAge(age)
-	//
-	//	staticHr = &hr
-	//}
-	//
-	//
-	//sess := u.getSession()
-	//s := service.NewUserService()
-	//logInfo, err := s.ShopUserAdd(sess, usercode, name, phone, memo, sex, birthday, height, w, staticHr, head)
-	//if err != nil {
-	//
-	//	return
-	//}
-	//u.saveOptLogInfo(logInfo)
-	//
-	//u.Ctx().JSON(http.StatusOK, newResponseBase())
-	return
-}
-
-// ShopUserEdit godoc
-// @Summary 会员用户基本信息修改
-// @tags User
-// @Description 会员用户基本信息修改
-// @Accept  x-www-form-urlencoded
-// @Produce  json
-// @Param token formData string true "Token"
-// @Param userId formData int true "用户Id"
-// @Param phone formData string false "手机号"
-// @Param name formData string false "姓名"
-// @Param memo formData string false "备注"
-// @Param birthday formData string true "生日"
-// @Param height formData int true "身高"
-// @Param weight formData string true "体重"
-// @Param sex formData int true "性别  1:男, 2:女"
-// @Param staticHr formData int false "静态心率"
-// @Param head formData string false "头像URL"
-// @Success 200 {object} controller.ResponseBase
-// @Router /User/ShopUserEdit [post]
-func (u *User) ShopUserEdit() (err error) {
-	//userId := u.postIntNecessary("userId")
-	//name := u.Ctx().PostForm("name")
-	//phone := u.Ctx().PostForm("phone")
-	//memo := u.Ctx().PostForm("memo")
-	//
-	////ubId := u.postInt("ubId")
-	//height := u.postIntNecessary("height")
-	//w := u.postFloatToInt("weight", true)
-	//sex := u.postIntNecessary("sex")
-	//staticHr := u.postInt("staticHr")
-	//head := u.Ctx().PostForm("head")
-	//birthday := u.getPostFromDate("birthday")
-	//
-	//// 如果未传入静息心率,则通过生日计算年龄后获取此年龄段的平均静息心率
-	//if staticHr == nil {
-	//	age := utils.GetAgeByBirthday(birthday)
-	//	hr := utils.GetStaticHrByAge(age)
-	//	staticHr = &hr
-	//}
-	//
-	//sess := u.getSession()
-	//logInfo, err := service.User{}.ShopUserEdit(sess, userId, name, phone, memo, height, w, sex, staticHr, head, birthday)
-	//if err != nil {
-	//
-	//	return
-	//}
-	//u.saveOptLogInfo(logInfo)
-	//
-	//u.Ctx().JSON(http.StatusOK, newResponseBase())
-	return
-}
-
-// ShopUserStatusEdit godoc
-// @Summary 会员用户状态修改
-// @tags User
-// @Description 会员用户状态修改
-// @Accept  x-www-form-urlencoded
-// @Produce  json
-// @Param token formData string true "Token"
-// @Param userId formData int true "用户ID"
-// @Param status formData int true "状态  1:启用	 8:禁用  9:删除"
-// @Success 200 {object} controller.ResponseBase
-// @Router /User/ShopUserStatusEdit [post]
-func (u *User) ShopUserStatusEdit() (err error) {
-	//userId := u.postIntNecessary("userId")
-	//status := u.postIntNecessary("status")
-	//
-	//sess := u.getSession()
-	//logInfo, err := service.User{}.ShopUserStatusEdit(sess, userId, status)
-	//if err != nil {
-	//	return
-	//}
-	//u.saveOptLogInfo(logInfo)
-	//
-	//u.Ctx().JSON(http.StatusOK, newResponseBase())
-	return
+	Rs *model.UserBodyInfo
 }
 
-// ShopCoachAdd godoc
-// @Summary 商家教练添加
+// UserInfoQuery godoc
+// @Summary 会员信息查询
 // @tags User
-// @Description 商家教练添加
+// @Description 会员信息查询
 // @Accept  x-www-form-urlencoded
 // @Produce  json
 // @Param token formData string true "Token"
-// @Param shopId formData int true "店铺ID"
-// @Param phone formData string true "登陆用户名也是手机号"
-// @Param name formData string true "姓名"
-// @Param pwd formData string true "密码"
-// @Param sex formData int true "性别  1:男, 2:女"
-// @Param memo formData string false "备注"
 // @Success 200 {object} controller.ResponseBase
-// @Router /User/ShopCoachAdd [post]
-func (u *User) ShopCoachAdd() (err error) {
-	//usercode := u.postString("phone", true)
-	//name := u.postString("name", true)
-	//phone := u.postString("phone", true)
-	//pwd := u.postString("pwd", true)
-	//memo := u.Ctx().PostForm("memo")
-	//
-	//sex := u.postIntNecessary("sex")
-
-	//sess := u.getSession()
-	//s := service.NewUserService()
-	//logInfo, err := s.ShopCoachAdd(sess, usercode, name, phone, memo, sex, pwd)
-	//if err != nil {
-	//
-	//	return
-	//}
-	//u.saveOptLogInfo(logInfo)
-	//
-	//u.Ctx().JSON(http.StatusOK, newResponseBase())
-	return
-}
-
-// ShopCoachEdit godoc
-// @Summary 商家教练基本信息修改
-// @tags User
-// @Description 商家教练基本信息修改
-// @Accept  x-www-form-urlencoded
-// @Produce  json
-// @Param token formData string true "Token"
-// @Param ssId formData int true "教练ID"
-// @Param phone formData string false "手机号"
-// @Param pwd formData string false "密码"
-// @Param name formData string false "姓名"
-// @Param memo formData string false "备注"
-// @Param sex formData int true "性别  1:男, 2:女"
-// @Success 200 {object} controller.ResponseBase
-// @Router /User/ShopCoachEdit [post]
-func (u *User) ShopCoachEdit() (err error) {
-	//ssId := u.postIntNecessary("ssId")
-	//name := u.Ctx().PostForm("name")
-	//phone := u.Ctx().PostForm("phone")
-	//pwd := u.Ctx().PostForm("pwd")
-	//memo := u.Ctx().PostForm("memo")
-	//
-	//sex := u.postIntNecessary("sex")
-	//
-	//sess := u.getSession()
-	//logInfo, err := service.User{}.ShopCoachEdit(sess, ssId, name, phone, memo, sex, pwd)
-	//if err != nil {
-	//
-	//	return
-	//}
-	//u.saveOptLogInfo(logInfo)
-	//
-	//u.Ctx().JSON(http.StatusOK, newResponseBase())
-	return
-}
-
-// ShopCoachStatusEdit godoc
-// @Summary 商家教练状态修改
-// @tags User
-// @Description 商家教练状态修改
-// @Accept  x-www-form-urlencoded
-// @Produce  json
-// @Param token formData string true "Token"
-// @Param ssId formData int true "教练ID"
-// @Param status formData int true "状态  1:启用	 8:禁用  9:删除"
-// @Success 200 {object} controller.ResponseBase
-// @Router /User/ShopCoachStatusEdit [post]
-func (u *User) ShopCoachStatusEdit() (err error) {
-	//ssId := u.postIntNecessary("ssId")
-	//status := u.postIntNecessary("status")
-	//
-	//sess := u.getSession()
-	//logInfo, err := service.User{}.ShopCoachStatusEdit(sess, ssId, status)
-	//if err != nil {
-	//	return
-	//}
-	//u.saveOptLogInfo(logInfo)
-	//
-	//u.Ctx().JSON(http.StatusOK, newResponseBase())
-	return
-}
-
-type ShopCoachInfo struct {
-	ResponseBase
-	PageCount int64
-	Rs        string
-}
-
-// ShopCoachListQuery godoc
-// @Summary 会员用户列表(带分页)
-// @tags User
-// @Description 会员用户列表(带分页)
-// @Accept  x-www-form-urlencoded
-// @Produce  json
-// @Param token formData string true "Token"
-// @Param phone formData string false "手机号"
-// @Param name formData string false "姓名"
-// @Param start formData string true "当前条"
-// @Param tableMax formData string true "每页条数"
-// @Success 200 {object} controller.ShopUserInfo
-// @Router /User/ShopCoachListQuery [post]
-func (u *User) ShopCoachListQuery() (err error) {
-	//sess := u.Ctx().PostForm("Token")
-	//phone := u.Ctx().PostForm("phone")
-	//name := u.Ctx().PostForm("name")
-	//start := u.postIntNecessary("start")
-	//tableMax := u.postIntNecessary("tableMax")
-	//pageIndex := start/tableMax + 1
-	//
-	//rs, pageCount, err := service.User{}.ShopCoachListQuery(sess, phone, name, pageIndex, tableMax)
-	//
-	//rp := ShopCoachInfo{
-	//	newResponseBase(),
-	//	pageCount,
-	//	rs,
-	//}
-	//u.Ctx().JSON(http.StatusOK, rp)
-
-	return
-}
-
-type ShopCoachSimpleInfo struct {
-	ResponseBase
-	Rs string
-	//Rs []*gorm.ShopUserSimpleInfo
-}
-
-// ShopCoachSimpleQuery godoc
-// @Summary 本店会员用户基本信息查询
-// @tags User
-// @Description 本店会员用户基本信息查询
-// @Accept  x-www-form-urlencoded
-// @Produce  json
-// @Param token formData string true "Token"
-// @Param shopId formData int false "商家ID"
-// @Success 200 {object} controller.ShopCoachSimpleInfo
-// @Router /User/ShopCoachSimpleQuery [post]
-func (u *User) ShopCoachSimpleQuery() (err error) {
-
-	//shopId := u.postInt("shopId")
-	//
-	//sess := u.Ctx().PostForm("Token")
-	//rs, err := service.User{}.ShopCoachSimpleQuery(sess, shopId)
-	//
-	//rp := ShopCoachSimpleInfo{
-	//	newResponseBase(),
-	//	rs,
-	//}
-	//u.Ctx().JSON(http.StatusOK, rp)
+// @Router /User/UserInfoQuery [post]
+func (u *User) UserInfoQuery() (err error) {
+	token := u.Ctx().PostForm("token")
+
+	rs, err := service.User{}.UserInfoQuery(token)
+	if err != nil {
+		return
+	}
+	r := UserInfoResponse{
+		ResponseBase: newResponseBase(),
+		Rs:           rs,
+	}
+	u.Ctx().JSON(http.StatusOK, r)
 
 	return
 }

+ 3 - 639
docs/docs.go

@@ -877,9 +877,9 @@ var doc = `{
                 }
             }
         },
-        "/User/ShopCoachAdd": {
+        "/User/UserInfoQuery": {
             "post": {
-                "description": "商家教练添加",
+                "description": "会员信息查询",
                 "consumes": [
                     "application/x-www-form-urlencoded"
                 ],
@@ -889,7 +889,7 @@ var doc = `{
                 "tags": [
                     "User"
                 ],
-                "summary": "商家教练添加",
+                "summary": "会员信息查询",
                 "parameters": [
                     {
                         "type": "string",
@@ -897,597 +897,6 @@ var doc = `{
                         "name": "token",
                         "in": "formData",
                         "required": true
-                    },
-                    {
-                        "type": "integer",
-                        "description": "店铺ID",
-                        "name": "shopId",
-                        "in": "formData",
-                        "required": true
-                    },
-                    {
-                        "type": "string",
-                        "description": "登陆用户名也是手机号",
-                        "name": "phone",
-                        "in": "formData",
-                        "required": true
-                    },
-                    {
-                        "type": "string",
-                        "description": "姓名",
-                        "name": "name",
-                        "in": "formData",
-                        "required": true
-                    },
-                    {
-                        "type": "string",
-                        "description": "密码",
-                        "name": "pwd",
-                        "in": "formData",
-                        "required": true
-                    },
-                    {
-                        "type": "integer",
-                        "description": "性别  1:男, 2:女",
-                        "name": "sex",
-                        "in": "formData",
-                        "required": true
-                    },
-                    {
-                        "type": "string",
-                        "description": "备注",
-                        "name": "memo",
-                        "in": "formData"
-                    }
-                ],
-                "responses": {
-                    "200": {
-                        "description": "OK",
-                        "schema": {
-                            "$ref": "#/definitions/controller.ResponseBase"
-                        }
-                    }
-                }
-            }
-        },
-        "/User/ShopCoachEdit": {
-            "post": {
-                "description": "商家教练基本信息修改",
-                "consumes": [
-                    "application/x-www-form-urlencoded"
-                ],
-                "produces": [
-                    "application/json"
-                ],
-                "tags": [
-                    "User"
-                ],
-                "summary": "商家教练基本信息修改",
-                "parameters": [
-                    {
-                        "type": "string",
-                        "description": "Token",
-                        "name": "token",
-                        "in": "formData",
-                        "required": true
-                    },
-                    {
-                        "type": "integer",
-                        "description": "教练ID",
-                        "name": "ssId",
-                        "in": "formData",
-                        "required": true
-                    },
-                    {
-                        "type": "string",
-                        "description": "手机号",
-                        "name": "phone",
-                        "in": "formData"
-                    },
-                    {
-                        "type": "string",
-                        "description": "密码",
-                        "name": "pwd",
-                        "in": "formData"
-                    },
-                    {
-                        "type": "string",
-                        "description": "姓名",
-                        "name": "name",
-                        "in": "formData"
-                    },
-                    {
-                        "type": "string",
-                        "description": "备注",
-                        "name": "memo",
-                        "in": "formData"
-                    },
-                    {
-                        "type": "integer",
-                        "description": "性别  1:男, 2:女",
-                        "name": "sex",
-                        "in": "formData",
-                        "required": true
-                    }
-                ],
-                "responses": {
-                    "200": {
-                        "description": "OK",
-                        "schema": {
-                            "$ref": "#/definitions/controller.ResponseBase"
-                        }
-                    }
-                }
-            }
-        },
-        "/User/ShopCoachListQuery": {
-            "post": {
-                "description": "会员用户列表(带分页)",
-                "consumes": [
-                    "application/x-www-form-urlencoded"
-                ],
-                "produces": [
-                    "application/json"
-                ],
-                "tags": [
-                    "User"
-                ],
-                "summary": "会员用户列表(带分页)",
-                "parameters": [
-                    {
-                        "type": "string",
-                        "description": "Token",
-                        "name": "token",
-                        "in": "formData",
-                        "required": true
-                    },
-                    {
-                        "type": "string",
-                        "description": "手机号",
-                        "name": "phone",
-                        "in": "formData"
-                    },
-                    {
-                        "type": "string",
-                        "description": "姓名",
-                        "name": "name",
-                        "in": "formData"
-                    },
-                    {
-                        "type": "string",
-                        "description": "当前条",
-                        "name": "start",
-                        "in": "formData",
-                        "required": true
-                    },
-                    {
-                        "type": "string",
-                        "description": "每页条数",
-                        "name": "tableMax",
-                        "in": "formData",
-                        "required": true
-                    }
-                ],
-                "responses": {
-                    "200": {
-                        "description": "OK",
-                        "schema": {
-                            "$ref": "#/definitions/controller.ShopUserInfo"
-                        }
-                    }
-                }
-            }
-        },
-        "/User/ShopCoachSimpleQuery": {
-            "post": {
-                "description": "本店会员用户基本信息查询",
-                "consumes": [
-                    "application/x-www-form-urlencoded"
-                ],
-                "produces": [
-                    "application/json"
-                ],
-                "tags": [
-                    "User"
-                ],
-                "summary": "本店会员用户基本信息查询",
-                "parameters": [
-                    {
-                        "type": "string",
-                        "description": "Token",
-                        "name": "token",
-                        "in": "formData",
-                        "required": true
-                    },
-                    {
-                        "type": "integer",
-                        "description": "商家ID",
-                        "name": "shopId",
-                        "in": "formData"
-                    }
-                ],
-                "responses": {
-                    "200": {
-                        "description": "OK",
-                        "schema": {
-                            "$ref": "#/definitions/controller.ShopCoachSimpleInfo"
-                        }
-                    }
-                }
-            }
-        },
-        "/User/ShopCoachStatusEdit": {
-            "post": {
-                "description": "商家教练状态修改",
-                "consumes": [
-                    "application/x-www-form-urlencoded"
-                ],
-                "produces": [
-                    "application/json"
-                ],
-                "tags": [
-                    "User"
-                ],
-                "summary": "商家教练状态修改",
-                "parameters": [
-                    {
-                        "type": "string",
-                        "description": "Token",
-                        "name": "token",
-                        "in": "formData",
-                        "required": true
-                    },
-                    {
-                        "type": "integer",
-                        "description": "教练ID",
-                        "name": "ssId",
-                        "in": "formData",
-                        "required": true
-                    },
-                    {
-                        "type": "integer",
-                        "description": "状态  1:启用\t 8:禁用  9:删除",
-                        "name": "status",
-                        "in": "formData",
-                        "required": true
-                    }
-                ],
-                "responses": {
-                    "200": {
-                        "description": "OK",
-                        "schema": {
-                            "$ref": "#/definitions/controller.ResponseBase"
-                        }
-                    }
-                }
-            }
-        },
-        "/User/ShopUserAdd": {
-            "post": {
-                "description": "会员用户添加",
-                "consumes": [
-                    "application/x-www-form-urlencoded"
-                ],
-                "produces": [
-                    "application/json"
-                ],
-                "tags": [
-                    "User"
-                ],
-                "summary": "会员用户添加",
-                "parameters": [
-                    {
-                        "type": "string",
-                        "description": "Token",
-                        "name": "token",
-                        "in": "formData",
-                        "required": true
-                    },
-                    {
-                        "type": "integer",
-                        "description": "店铺ID",
-                        "name": "shopId",
-                        "in": "formData",
-                        "required": true
-                    },
-                    {
-                        "type": "string",
-                        "description": "登陆用户名也是手机号",
-                        "name": "phone",
-                        "in": "formData",
-                        "required": true
-                    },
-                    {
-                        "type": "string",
-                        "description": "姓名",
-                        "name": "name",
-                        "in": "formData",
-                        "required": true
-                    },
-                    {
-                        "type": "integer",
-                        "description": "性别  1:男, 2:女",
-                        "name": "sex",
-                        "in": "formData",
-                        "required": true
-                    },
-                    {
-                        "type": "string",
-                        "description": "生日",
-                        "name": "birthday",
-                        "in": "formData",
-                        "required": true
-                    },
-                    {
-                        "type": "integer",
-                        "description": "身高",
-                        "name": "height",
-                        "in": "formData",
-                        "required": true
-                    },
-                    {
-                        "type": "string",
-                        "description": "体重 ",
-                        "name": "weight",
-                        "in": "formData",
-                        "required": true
-                    },
-                    {
-                        "type": "integer",
-                        "description": "静态心率",
-                        "name": "staticHr",
-                        "in": "formData"
-                    },
-                    {
-                        "type": "string",
-                        "description": "头像",
-                        "name": "head",
-                        "in": "formData"
-                    },
-                    {
-                        "type": "string",
-                        "description": "备注",
-                        "name": "memo",
-                        "in": "formData"
-                    }
-                ],
-                "responses": {
-                    "200": {
-                        "description": "OK",
-                        "schema": {
-                            "$ref": "#/definitions/controller.ResponseBase"
-                        }
-                    }
-                }
-            }
-        },
-        "/User/ShopUserEdit": {
-            "post": {
-                "description": "会员用户基本信息修改",
-                "consumes": [
-                    "application/x-www-form-urlencoded"
-                ],
-                "produces": [
-                    "application/json"
-                ],
-                "tags": [
-                    "User"
-                ],
-                "summary": "会员用户基本信息修改",
-                "parameters": [
-                    {
-                        "type": "string",
-                        "description": "Token",
-                        "name": "token",
-                        "in": "formData",
-                        "required": true
-                    },
-                    {
-                        "type": "integer",
-                        "description": "用户Id",
-                        "name": "userId",
-                        "in": "formData",
-                        "required": true
-                    },
-                    {
-                        "type": "string",
-                        "description": "手机号",
-                        "name": "phone",
-                        "in": "formData"
-                    },
-                    {
-                        "type": "string",
-                        "description": "姓名",
-                        "name": "name",
-                        "in": "formData"
-                    },
-                    {
-                        "type": "string",
-                        "description": "备注",
-                        "name": "memo",
-                        "in": "formData"
-                    },
-                    {
-                        "type": "string",
-                        "description": "生日",
-                        "name": "birthday",
-                        "in": "formData",
-                        "required": true
-                    },
-                    {
-                        "type": "integer",
-                        "description": "身高",
-                        "name": "height",
-                        "in": "formData",
-                        "required": true
-                    },
-                    {
-                        "type": "string",
-                        "description": "体重",
-                        "name": "weight",
-                        "in": "formData",
-                        "required": true
-                    },
-                    {
-                        "type": "integer",
-                        "description": "性别  1:男, 2:女",
-                        "name": "sex",
-                        "in": "formData",
-                        "required": true
-                    },
-                    {
-                        "type": "integer",
-                        "description": "静态心率",
-                        "name": "staticHr",
-                        "in": "formData"
-                    },
-                    {
-                        "type": "string",
-                        "description": "头像URL",
-                        "name": "head",
-                        "in": "formData"
-                    }
-                ],
-                "responses": {
-                    "200": {
-                        "description": "OK",
-                        "schema": {
-                            "$ref": "#/definitions/controller.ResponseBase"
-                        }
-                    }
-                }
-            }
-        },
-        "/User/ShopUserListQuery": {
-            "post": {
-                "description": "会员用户列表(带分页)",
-                "consumes": [
-                    "application/x-www-form-urlencoded"
-                ],
-                "produces": [
-                    "application/json"
-                ],
-                "tags": [
-                    "User"
-                ],
-                "summary": "会员用户列表(带分页)",
-                "parameters": [
-                    {
-                        "type": "string",
-                        "description": "Token",
-                        "name": "token",
-                        "in": "formData",
-                        "required": true
-                    },
-                    {
-                        "type": "string",
-                        "description": "手机号",
-                        "name": "phone",
-                        "in": "formData"
-                    },
-                    {
-                        "type": "string",
-                        "description": "姓名",
-                        "name": "name",
-                        "in": "formData"
-                    },
-                    {
-                        "type": "string",
-                        "description": "当前条",
-                        "name": "start",
-                        "in": "formData",
-                        "required": true
-                    },
-                    {
-                        "type": "string",
-                        "description": "每页条数",
-                        "name": "tableMax",
-                        "in": "formData",
-                        "required": true
-                    }
-                ],
-                "responses": {
-                    "200": {
-                        "description": "OK",
-                        "schema": {
-                            "$ref": "#/definitions/controller.ShopUserInfo"
-                        }
-                    }
-                }
-            }
-        },
-        "/User/ShopUserSimpleQuery": {
-            "post": {
-                "description": "本店会员用户基本信息查询",
-                "consumes": [
-                    "application/x-www-form-urlencoded"
-                ],
-                "produces": [
-                    "application/json"
-                ],
-                "tags": [
-                    "User"
-                ],
-                "summary": "本店会员用户基本信息查询",
-                "parameters": [
-                    {
-                        "type": "string",
-                        "description": "Token",
-                        "name": "token",
-                        "in": "formData",
-                        "required": true
-                    },
-                    {
-                        "type": "integer",
-                        "description": "商家ID",
-                        "name": "shopId",
-                        "in": "formData"
-                    }
-                ],
-                "responses": {
-                    "200": {
-                        "description": "OK",
-                        "schema": {
-                            "$ref": "#/definitions/controller.ShopUserSimpleInfo"
-                        }
-                    }
-                }
-            }
-        },
-        "/User/ShopUserStatusEdit": {
-            "post": {
-                "description": "会员用户状态修改",
-                "consumes": [
-                    "application/x-www-form-urlencoded"
-                ],
-                "produces": [
-                    "application/json"
-                ],
-                "tags": [
-                    "User"
-                ],
-                "summary": "会员用户状态修改",
-                "parameters": [
-                    {
-                        "type": "string",
-                        "description": "Token",
-                        "name": "token",
-                        "in": "formData",
-                        "required": true
-                    },
-                    {
-                        "type": "integer",
-                        "description": "用户ID",
-                        "name": "userId",
-                        "in": "formData",
-                        "required": true
-                    },
-                    {
-                        "type": "integer",
-                        "description": "状态  1:启用\t 8:禁用  9:删除",
-                        "name": "status",
-                        "in": "formData",
-                        "required": true
                     }
                 ],
                 "responses": {
@@ -1524,51 +933,6 @@ var doc = `{
                 }
             }
         },
-        "controller.ShopCoachSimpleInfo": {
-            "type": "object",
-            "properties": {
-                "code": {
-                    "type": "integer"
-                },
-                "memo": {
-                    "type": "string"
-                },
-                "rs": {
-                    "type": "string"
-                }
-            }
-        },
-        "controller.ShopUserInfo": {
-            "type": "object",
-            "properties": {
-                "code": {
-                    "type": "integer"
-                },
-                "memo": {
-                    "type": "string"
-                },
-                "pageCount": {
-                    "type": "integer"
-                },
-                "rs": {
-                    "type": "string"
-                }
-            }
-        },
-        "controller.ShopUserSimpleInfo": {
-            "type": "object",
-            "properties": {
-                "code": {
-                    "type": "integer"
-                },
-                "memo": {
-                    "type": "string"
-                },
-                "rs": {
-                    "type": "string"
-                }
-            }
-        },
         "controller.UserList": {
             "type": "object",
             "properties": {

+ 3 - 639
docs/swagger.json

@@ -861,9 +861,9 @@
                 }
             }
         },
-        "/User/ShopCoachAdd": {
+        "/User/UserInfoQuery": {
             "post": {
-                "description": "商家教练添加",
+                "description": "会员信息查询",
                 "consumes": [
                     "application/x-www-form-urlencoded"
                 ],
@@ -873,7 +873,7 @@
                 "tags": [
                     "User"
                 ],
-                "summary": "商家教练添加",
+                "summary": "会员信息查询",
                 "parameters": [
                     {
                         "type": "string",
@@ -881,597 +881,6 @@
                         "name": "token",
                         "in": "formData",
                         "required": true
-                    },
-                    {
-                        "type": "integer",
-                        "description": "店铺ID",
-                        "name": "shopId",
-                        "in": "formData",
-                        "required": true
-                    },
-                    {
-                        "type": "string",
-                        "description": "登陆用户名也是手机号",
-                        "name": "phone",
-                        "in": "formData",
-                        "required": true
-                    },
-                    {
-                        "type": "string",
-                        "description": "姓名",
-                        "name": "name",
-                        "in": "formData",
-                        "required": true
-                    },
-                    {
-                        "type": "string",
-                        "description": "密码",
-                        "name": "pwd",
-                        "in": "formData",
-                        "required": true
-                    },
-                    {
-                        "type": "integer",
-                        "description": "性别  1:男, 2:女",
-                        "name": "sex",
-                        "in": "formData",
-                        "required": true
-                    },
-                    {
-                        "type": "string",
-                        "description": "备注",
-                        "name": "memo",
-                        "in": "formData"
-                    }
-                ],
-                "responses": {
-                    "200": {
-                        "description": "OK",
-                        "schema": {
-                            "$ref": "#/definitions/controller.ResponseBase"
-                        }
-                    }
-                }
-            }
-        },
-        "/User/ShopCoachEdit": {
-            "post": {
-                "description": "商家教练基本信息修改",
-                "consumes": [
-                    "application/x-www-form-urlencoded"
-                ],
-                "produces": [
-                    "application/json"
-                ],
-                "tags": [
-                    "User"
-                ],
-                "summary": "商家教练基本信息修改",
-                "parameters": [
-                    {
-                        "type": "string",
-                        "description": "Token",
-                        "name": "token",
-                        "in": "formData",
-                        "required": true
-                    },
-                    {
-                        "type": "integer",
-                        "description": "教练ID",
-                        "name": "ssId",
-                        "in": "formData",
-                        "required": true
-                    },
-                    {
-                        "type": "string",
-                        "description": "手机号",
-                        "name": "phone",
-                        "in": "formData"
-                    },
-                    {
-                        "type": "string",
-                        "description": "密码",
-                        "name": "pwd",
-                        "in": "formData"
-                    },
-                    {
-                        "type": "string",
-                        "description": "姓名",
-                        "name": "name",
-                        "in": "formData"
-                    },
-                    {
-                        "type": "string",
-                        "description": "备注",
-                        "name": "memo",
-                        "in": "formData"
-                    },
-                    {
-                        "type": "integer",
-                        "description": "性别  1:男, 2:女",
-                        "name": "sex",
-                        "in": "formData",
-                        "required": true
-                    }
-                ],
-                "responses": {
-                    "200": {
-                        "description": "OK",
-                        "schema": {
-                            "$ref": "#/definitions/controller.ResponseBase"
-                        }
-                    }
-                }
-            }
-        },
-        "/User/ShopCoachListQuery": {
-            "post": {
-                "description": "会员用户列表(带分页)",
-                "consumes": [
-                    "application/x-www-form-urlencoded"
-                ],
-                "produces": [
-                    "application/json"
-                ],
-                "tags": [
-                    "User"
-                ],
-                "summary": "会员用户列表(带分页)",
-                "parameters": [
-                    {
-                        "type": "string",
-                        "description": "Token",
-                        "name": "token",
-                        "in": "formData",
-                        "required": true
-                    },
-                    {
-                        "type": "string",
-                        "description": "手机号",
-                        "name": "phone",
-                        "in": "formData"
-                    },
-                    {
-                        "type": "string",
-                        "description": "姓名",
-                        "name": "name",
-                        "in": "formData"
-                    },
-                    {
-                        "type": "string",
-                        "description": "当前条",
-                        "name": "start",
-                        "in": "formData",
-                        "required": true
-                    },
-                    {
-                        "type": "string",
-                        "description": "每页条数",
-                        "name": "tableMax",
-                        "in": "formData",
-                        "required": true
-                    }
-                ],
-                "responses": {
-                    "200": {
-                        "description": "OK",
-                        "schema": {
-                            "$ref": "#/definitions/controller.ShopUserInfo"
-                        }
-                    }
-                }
-            }
-        },
-        "/User/ShopCoachSimpleQuery": {
-            "post": {
-                "description": "本店会员用户基本信息查询",
-                "consumes": [
-                    "application/x-www-form-urlencoded"
-                ],
-                "produces": [
-                    "application/json"
-                ],
-                "tags": [
-                    "User"
-                ],
-                "summary": "本店会员用户基本信息查询",
-                "parameters": [
-                    {
-                        "type": "string",
-                        "description": "Token",
-                        "name": "token",
-                        "in": "formData",
-                        "required": true
-                    },
-                    {
-                        "type": "integer",
-                        "description": "商家ID",
-                        "name": "shopId",
-                        "in": "formData"
-                    }
-                ],
-                "responses": {
-                    "200": {
-                        "description": "OK",
-                        "schema": {
-                            "$ref": "#/definitions/controller.ShopCoachSimpleInfo"
-                        }
-                    }
-                }
-            }
-        },
-        "/User/ShopCoachStatusEdit": {
-            "post": {
-                "description": "商家教练状态修改",
-                "consumes": [
-                    "application/x-www-form-urlencoded"
-                ],
-                "produces": [
-                    "application/json"
-                ],
-                "tags": [
-                    "User"
-                ],
-                "summary": "商家教练状态修改",
-                "parameters": [
-                    {
-                        "type": "string",
-                        "description": "Token",
-                        "name": "token",
-                        "in": "formData",
-                        "required": true
-                    },
-                    {
-                        "type": "integer",
-                        "description": "教练ID",
-                        "name": "ssId",
-                        "in": "formData",
-                        "required": true
-                    },
-                    {
-                        "type": "integer",
-                        "description": "状态  1:启用\t 8:禁用  9:删除",
-                        "name": "status",
-                        "in": "formData",
-                        "required": true
-                    }
-                ],
-                "responses": {
-                    "200": {
-                        "description": "OK",
-                        "schema": {
-                            "$ref": "#/definitions/controller.ResponseBase"
-                        }
-                    }
-                }
-            }
-        },
-        "/User/ShopUserAdd": {
-            "post": {
-                "description": "会员用户添加",
-                "consumes": [
-                    "application/x-www-form-urlencoded"
-                ],
-                "produces": [
-                    "application/json"
-                ],
-                "tags": [
-                    "User"
-                ],
-                "summary": "会员用户添加",
-                "parameters": [
-                    {
-                        "type": "string",
-                        "description": "Token",
-                        "name": "token",
-                        "in": "formData",
-                        "required": true
-                    },
-                    {
-                        "type": "integer",
-                        "description": "店铺ID",
-                        "name": "shopId",
-                        "in": "formData",
-                        "required": true
-                    },
-                    {
-                        "type": "string",
-                        "description": "登陆用户名也是手机号",
-                        "name": "phone",
-                        "in": "formData",
-                        "required": true
-                    },
-                    {
-                        "type": "string",
-                        "description": "姓名",
-                        "name": "name",
-                        "in": "formData",
-                        "required": true
-                    },
-                    {
-                        "type": "integer",
-                        "description": "性别  1:男, 2:女",
-                        "name": "sex",
-                        "in": "formData",
-                        "required": true
-                    },
-                    {
-                        "type": "string",
-                        "description": "生日",
-                        "name": "birthday",
-                        "in": "formData",
-                        "required": true
-                    },
-                    {
-                        "type": "integer",
-                        "description": "身高",
-                        "name": "height",
-                        "in": "formData",
-                        "required": true
-                    },
-                    {
-                        "type": "string",
-                        "description": "体重 ",
-                        "name": "weight",
-                        "in": "formData",
-                        "required": true
-                    },
-                    {
-                        "type": "integer",
-                        "description": "静态心率",
-                        "name": "staticHr",
-                        "in": "formData"
-                    },
-                    {
-                        "type": "string",
-                        "description": "头像",
-                        "name": "head",
-                        "in": "formData"
-                    },
-                    {
-                        "type": "string",
-                        "description": "备注",
-                        "name": "memo",
-                        "in": "formData"
-                    }
-                ],
-                "responses": {
-                    "200": {
-                        "description": "OK",
-                        "schema": {
-                            "$ref": "#/definitions/controller.ResponseBase"
-                        }
-                    }
-                }
-            }
-        },
-        "/User/ShopUserEdit": {
-            "post": {
-                "description": "会员用户基本信息修改",
-                "consumes": [
-                    "application/x-www-form-urlencoded"
-                ],
-                "produces": [
-                    "application/json"
-                ],
-                "tags": [
-                    "User"
-                ],
-                "summary": "会员用户基本信息修改",
-                "parameters": [
-                    {
-                        "type": "string",
-                        "description": "Token",
-                        "name": "token",
-                        "in": "formData",
-                        "required": true
-                    },
-                    {
-                        "type": "integer",
-                        "description": "用户Id",
-                        "name": "userId",
-                        "in": "formData",
-                        "required": true
-                    },
-                    {
-                        "type": "string",
-                        "description": "手机号",
-                        "name": "phone",
-                        "in": "formData"
-                    },
-                    {
-                        "type": "string",
-                        "description": "姓名",
-                        "name": "name",
-                        "in": "formData"
-                    },
-                    {
-                        "type": "string",
-                        "description": "备注",
-                        "name": "memo",
-                        "in": "formData"
-                    },
-                    {
-                        "type": "string",
-                        "description": "生日",
-                        "name": "birthday",
-                        "in": "formData",
-                        "required": true
-                    },
-                    {
-                        "type": "integer",
-                        "description": "身高",
-                        "name": "height",
-                        "in": "formData",
-                        "required": true
-                    },
-                    {
-                        "type": "string",
-                        "description": "体重",
-                        "name": "weight",
-                        "in": "formData",
-                        "required": true
-                    },
-                    {
-                        "type": "integer",
-                        "description": "性别  1:男, 2:女",
-                        "name": "sex",
-                        "in": "formData",
-                        "required": true
-                    },
-                    {
-                        "type": "integer",
-                        "description": "静态心率",
-                        "name": "staticHr",
-                        "in": "formData"
-                    },
-                    {
-                        "type": "string",
-                        "description": "头像URL",
-                        "name": "head",
-                        "in": "formData"
-                    }
-                ],
-                "responses": {
-                    "200": {
-                        "description": "OK",
-                        "schema": {
-                            "$ref": "#/definitions/controller.ResponseBase"
-                        }
-                    }
-                }
-            }
-        },
-        "/User/ShopUserListQuery": {
-            "post": {
-                "description": "会员用户列表(带分页)",
-                "consumes": [
-                    "application/x-www-form-urlencoded"
-                ],
-                "produces": [
-                    "application/json"
-                ],
-                "tags": [
-                    "User"
-                ],
-                "summary": "会员用户列表(带分页)",
-                "parameters": [
-                    {
-                        "type": "string",
-                        "description": "Token",
-                        "name": "token",
-                        "in": "formData",
-                        "required": true
-                    },
-                    {
-                        "type": "string",
-                        "description": "手机号",
-                        "name": "phone",
-                        "in": "formData"
-                    },
-                    {
-                        "type": "string",
-                        "description": "姓名",
-                        "name": "name",
-                        "in": "formData"
-                    },
-                    {
-                        "type": "string",
-                        "description": "当前条",
-                        "name": "start",
-                        "in": "formData",
-                        "required": true
-                    },
-                    {
-                        "type": "string",
-                        "description": "每页条数",
-                        "name": "tableMax",
-                        "in": "formData",
-                        "required": true
-                    }
-                ],
-                "responses": {
-                    "200": {
-                        "description": "OK",
-                        "schema": {
-                            "$ref": "#/definitions/controller.ShopUserInfo"
-                        }
-                    }
-                }
-            }
-        },
-        "/User/ShopUserSimpleQuery": {
-            "post": {
-                "description": "本店会员用户基本信息查询",
-                "consumes": [
-                    "application/x-www-form-urlencoded"
-                ],
-                "produces": [
-                    "application/json"
-                ],
-                "tags": [
-                    "User"
-                ],
-                "summary": "本店会员用户基本信息查询",
-                "parameters": [
-                    {
-                        "type": "string",
-                        "description": "Token",
-                        "name": "token",
-                        "in": "formData",
-                        "required": true
-                    },
-                    {
-                        "type": "integer",
-                        "description": "商家ID",
-                        "name": "shopId",
-                        "in": "formData"
-                    }
-                ],
-                "responses": {
-                    "200": {
-                        "description": "OK",
-                        "schema": {
-                            "$ref": "#/definitions/controller.ShopUserSimpleInfo"
-                        }
-                    }
-                }
-            }
-        },
-        "/User/ShopUserStatusEdit": {
-            "post": {
-                "description": "会员用户状态修改",
-                "consumes": [
-                    "application/x-www-form-urlencoded"
-                ],
-                "produces": [
-                    "application/json"
-                ],
-                "tags": [
-                    "User"
-                ],
-                "summary": "会员用户状态修改",
-                "parameters": [
-                    {
-                        "type": "string",
-                        "description": "Token",
-                        "name": "token",
-                        "in": "formData",
-                        "required": true
-                    },
-                    {
-                        "type": "integer",
-                        "description": "用户ID",
-                        "name": "userId",
-                        "in": "formData",
-                        "required": true
-                    },
-                    {
-                        "type": "integer",
-                        "description": "状态  1:启用\t 8:禁用  9:删除",
-                        "name": "status",
-                        "in": "formData",
-                        "required": true
                     }
                 ],
                 "responses": {
@@ -1508,51 +917,6 @@
                 }
             }
         },
-        "controller.ShopCoachSimpleInfo": {
-            "type": "object",
-            "properties": {
-                "code": {
-                    "type": "integer"
-                },
-                "memo": {
-                    "type": "string"
-                },
-                "rs": {
-                    "type": "string"
-                }
-            }
-        },
-        "controller.ShopUserInfo": {
-            "type": "object",
-            "properties": {
-                "code": {
-                    "type": "integer"
-                },
-                "memo": {
-                    "type": "string"
-                },
-                "pageCount": {
-                    "type": "integer"
-                },
-                "rs": {
-                    "type": "string"
-                }
-            }
-        },
-        "controller.ShopUserSimpleInfo": {
-            "type": "object",
-            "properties": {
-                "code": {
-                    "type": "integer"
-                },
-                "memo": {
-                    "type": "string"
-                },
-                "rs": {
-                    "type": "string"
-                }
-            }
-        },
         "controller.UserList": {
             "type": "object",
             "properties": {

+ 3 - 432
docs/swagger.yaml

@@ -14,35 +14,6 @@ definitions:
       pic:
         type: string
     type: object
-  controller.ShopCoachSimpleInfo:
-    properties:
-      code:
-        type: integer
-      memo:
-        type: string
-      rs:
-        type: string
-    type: object
-  controller.ShopUserInfo:
-    properties:
-      code:
-        type: integer
-      memo:
-        type: string
-      pageCount:
-        type: integer
-      rs:
-        type: string
-    type: object
-  controller.ShopUserSimpleInfo:
-    properties:
-      code:
-        type: integer
-      memo:
-        type: string
-      rs:
-        type: string
-    type: object
   controller.UserList:
     properties:
       code:
@@ -635,417 +606,17 @@ paths:
       summary: 会员用户查询
       tags:
       - Test
-  /User/ShopCoachAdd:
-    post:
-      consumes:
-      - application/x-www-form-urlencoded
-      description: 商家教练添加
-      parameters:
-      - description: Token
-        in: formData
-        name: token
-        required: true
-        type: string
-      - description: 店铺ID
-        in: formData
-        name: shopId
-        required: true
-        type: integer
-      - description: 登陆用户名也是手机号
-        in: formData
-        name: phone
-        required: true
-        type: string
-      - description: 姓名
-        in: formData
-        name: name
-        required: true
-        type: string
-      - description: 密码
-        in: formData
-        name: pwd
-        required: true
-        type: string
-      - description: 性别  1:男, 2:女
-        in: formData
-        name: sex
-        required: true
-        type: integer
-      - description: 备注
-        in: formData
-        name: memo
-        type: string
-      produces:
-      - application/json
-      responses:
-        "200":
-          description: OK
-          schema:
-            $ref: '#/definitions/controller.ResponseBase'
-      summary: 商家教练添加
-      tags:
-      - User
-  /User/ShopCoachEdit:
-    post:
-      consumes:
-      - application/x-www-form-urlencoded
-      description: 商家教练基本信息修改
-      parameters:
-      - description: Token
-        in: formData
-        name: token
-        required: true
-        type: string
-      - description: 教练ID
-        in: formData
-        name: ssId
-        required: true
-        type: integer
-      - description: 手机号
-        in: formData
-        name: phone
-        type: string
-      - description: 密码
-        in: formData
-        name: pwd
-        type: string
-      - description: 姓名
-        in: formData
-        name: name
-        type: string
-      - description: 备注
-        in: formData
-        name: memo
-        type: string
-      - description: 性别  1:男, 2:女
-        in: formData
-        name: sex
-        required: true
-        type: integer
-      produces:
-      - application/json
-      responses:
-        "200":
-          description: OK
-          schema:
-            $ref: '#/definitions/controller.ResponseBase'
-      summary: 商家教练基本信息修改
-      tags:
-      - User
-  /User/ShopCoachListQuery:
-    post:
-      consumes:
-      - application/x-www-form-urlencoded
-      description: 会员用户列表(带分页)
-      parameters:
-      - description: Token
-        in: formData
-        name: token
-        required: true
-        type: string
-      - description: 手机号
-        in: formData
-        name: phone
-        type: string
-      - description: 姓名
-        in: formData
-        name: name
-        type: string
-      - description: 当前条
-        in: formData
-        name: start
-        required: true
-        type: string
-      - description: 每页条数
-        in: formData
-        name: tableMax
-        required: true
-        type: string
-      produces:
-      - application/json
-      responses:
-        "200":
-          description: OK
-          schema:
-            $ref: '#/definitions/controller.ShopUserInfo'
-      summary: 会员用户列表(带分页)
-      tags:
-      - User
-  /User/ShopCoachSimpleQuery:
-    post:
-      consumes:
-      - application/x-www-form-urlencoded
-      description: 本店会员用户基本信息查询
-      parameters:
-      - description: Token
-        in: formData
-        name: token
-        required: true
-        type: string
-      - description: 商家ID
-        in: formData
-        name: shopId
-        type: integer
-      produces:
-      - application/json
-      responses:
-        "200":
-          description: OK
-          schema:
-            $ref: '#/definitions/controller.ShopCoachSimpleInfo'
-      summary: 本店会员用户基本信息查询
-      tags:
-      - User
-  /User/ShopCoachStatusEdit:
-    post:
-      consumes:
-      - application/x-www-form-urlencoded
-      description: 商家教练状态修改
-      parameters:
-      - description: Token
-        in: formData
-        name: token
-        required: true
-        type: string
-      - description: 教练ID
-        in: formData
-        name: ssId
-        required: true
-        type: integer
-      - description: "状态  1:启用\t 8:禁用  9:删除"
-        in: formData
-        name: status
-        required: true
-        type: integer
-      produces:
-      - application/json
-      responses:
-        "200":
-          description: OK
-          schema:
-            $ref: '#/definitions/controller.ResponseBase'
-      summary: 商家教练状态修改
-      tags:
-      - User
-  /User/ShopUserAdd:
-    post:
-      consumes:
-      - application/x-www-form-urlencoded
-      description: 会员用户添加
-      parameters:
-      - description: Token
-        in: formData
-        name: token
-        required: true
-        type: string
-      - description: 店铺ID
-        in: formData
-        name: shopId
-        required: true
-        type: integer
-      - description: 登陆用户名也是手机号
-        in: formData
-        name: phone
-        required: true
-        type: string
-      - description: 姓名
-        in: formData
-        name: name
-        required: true
-        type: string
-      - description: 性别  1:男, 2:女
-        in: formData
-        name: sex
-        required: true
-        type: integer
-      - description: 生日
-        in: formData
-        name: birthday
-        required: true
-        type: string
-      - description: 身高
-        in: formData
-        name: height
-        required: true
-        type: integer
-      - description: '体重 '
-        in: formData
-        name: weight
-        required: true
-        type: string
-      - description: 静态心率
-        in: formData
-        name: staticHr
-        type: integer
-      - description: 头像
-        in: formData
-        name: head
-        type: string
-      - description: 备注
-        in: formData
-        name: memo
-        type: string
-      produces:
-      - application/json
-      responses:
-        "200":
-          description: OK
-          schema:
-            $ref: '#/definitions/controller.ResponseBase'
-      summary: 会员用户添加
-      tags:
-      - User
-  /User/ShopUserEdit:
+  /User/UserInfoQuery:
     post:
       consumes:
       - application/x-www-form-urlencoded
-      description: 会员用户基本信息修改
+      description: 会员信息查询
       parameters:
       - description: Token
         in: formData
         name: token
         required: true
         type: string
-      - description: 用户Id
-        in: formData
-        name: userId
-        required: true
-        type: integer
-      - description: 手机号
-        in: formData
-        name: phone
-        type: string
-      - description: 姓名
-        in: formData
-        name: name
-        type: string
-      - description: 备注
-        in: formData
-        name: memo
-        type: string
-      - description: 生日
-        in: formData
-        name: birthday
-        required: true
-        type: string
-      - description: 身高
-        in: formData
-        name: height
-        required: true
-        type: integer
-      - description: 体重
-        in: formData
-        name: weight
-        required: true
-        type: string
-      - description: 性别  1:男, 2:女
-        in: formData
-        name: sex
-        required: true
-        type: integer
-      - description: 静态心率
-        in: formData
-        name: staticHr
-        type: integer
-      - description: 头像URL
-        in: formData
-        name: head
-        type: string
-      produces:
-      - application/json
-      responses:
-        "200":
-          description: OK
-          schema:
-            $ref: '#/definitions/controller.ResponseBase'
-      summary: 会员用户基本信息修改
-      tags:
-      - User
-  /User/ShopUserListQuery:
-    post:
-      consumes:
-      - application/x-www-form-urlencoded
-      description: 会员用户列表(带分页)
-      parameters:
-      - description: Token
-        in: formData
-        name: token
-        required: true
-        type: string
-      - description: 手机号
-        in: formData
-        name: phone
-        type: string
-      - description: 姓名
-        in: formData
-        name: name
-        type: string
-      - description: 当前条
-        in: formData
-        name: start
-        required: true
-        type: string
-      - description: 每页条数
-        in: formData
-        name: tableMax
-        required: true
-        type: string
-      produces:
-      - application/json
-      responses:
-        "200":
-          description: OK
-          schema:
-            $ref: '#/definitions/controller.ShopUserInfo'
-      summary: 会员用户列表(带分页)
-      tags:
-      - User
-  /User/ShopUserSimpleQuery:
-    post:
-      consumes:
-      - application/x-www-form-urlencoded
-      description: 本店会员用户基本信息查询
-      parameters:
-      - description: Token
-        in: formData
-        name: token
-        required: true
-        type: string
-      - description: 商家ID
-        in: formData
-        name: shopId
-        type: integer
-      produces:
-      - application/json
-      responses:
-        "200":
-          description: OK
-          schema:
-            $ref: '#/definitions/controller.ShopUserSimpleInfo'
-      summary: 本店会员用户基本信息查询
-      tags:
-      - User
-  /User/ShopUserStatusEdit:
-    post:
-      consumes:
-      - application/x-www-form-urlencoded
-      description: 会员用户状态修改
-      parameters:
-      - description: Token
-        in: formData
-        name: token
-        required: true
-        type: string
-      - description: 用户ID
-        in: formData
-        name: userId
-        required: true
-        type: integer
-      - description: "状态  1:启用\t 8:禁用  9:删除"
-        in: formData
-        name: status
-        required: true
-        type: integer
       produces:
       - application/json
       responses:
@@ -1053,7 +624,7 @@ paths:
           description: OK
           schema:
             $ref: '#/definitions/controller.ResponseBase'
-      summary: 会员用户状态修改
+      summary: 会员信息查询
       tags:
       - User
 securityDefinitions:

+ 1 - 1
main.go

@@ -89,7 +89,7 @@ func main() {
 		middleware.Session(),
 	)
 	r.AutoRegisterController("/v1", &controller.Auth{})
-	r.AutoRegisterController("/v1", &controller.Test{})
+	r.AutoRegisterController("/v1", &controller.User{})
 	//debug模式下启用swag文档
 	if global.Project.Debug {
 		gin.SetMode(gin.DebugMode)

+ 14 - 0
model/userBodyInfo.go

@@ -0,0 +1,14 @@
+package model
+
+import "time"
+
+type UserBodyInfo struct {
+	UserName string `gorm:"type:varchar(20)"`
+	Birthday time.Time
+	Height   int
+	Weight   int
+	Sex      int
+	StaticHr int
+	UserMd5  string `gorm:"type:varchar(32)"`
+	Head     string `gorm:"type:varchar(300)"`
+}

+ 16 - 17
service/user.go

@@ -6,28 +6,27 @@
  */
 package service
 
+import (
+	"fmt"
+	"video_course/lib/session"
+	"video_course/model"
+)
+
 type User struct {
 	base
 }
 
 //会员用户列表查询带分页
-func (u User) ShopUserListQuery(
-	sess string,
-	phone string,
-	name string,
-	pageIndex int,
-	tableMax int) (rs string, pageCount int64, err error) {
-	//offset := utils.PageIndex2RowOffset(pageIndex, tableMax)
-	//// todo 做session校验
-	//
-	//dao := u.getUserDao()
-	//userrs, allCount, err := dao.ShopUserListQuery(phone, name, vipType, user.ShopId, expDay, tableMax, offset)
-	//if err != nil {
-	//	return
-	//}
-	//
-	//pageCount = utils.CountPage(allCount, tableMax)
-
+func (u User) UserInfoQuery(
+	token string) (rs *model.UserBodyInfo, err error) {
+	sm := session.GetSessionManager()
+	sess, err_ := sm.FindByToken(token)
+	if err_ != nil {
+		err = err_
+		return
+	}
+	userMd5 := sess.UserId
+	fmt.Println(userMd5)
 	return
 }