|
@@ -1,8 +1,153 @@
|
|
|
basePath: /WeChatTrading/trading-go
|
|
|
+definitions:
|
|
|
+ model.Appraise:
|
|
|
+ properties:
|
|
|
+ buyerId:
|
|
|
+ type: integer
|
|
|
+ content:
|
|
|
+ type: string
|
|
|
+ goodsId:
|
|
|
+ type: integer
|
|
|
+ id:
|
|
|
+ type: integer
|
|
|
+ star:
|
|
|
+ type: integer
|
|
|
+ time:
|
|
|
+ type: integer
|
|
|
+ type: object
|
|
|
+ model.AppraiseJson:
|
|
|
+ properties:
|
|
|
+ buyerId:
|
|
|
+ type: integer
|
|
|
+ content:
|
|
|
+ type: string
|
|
|
+ goodsId:
|
|
|
+ type: integer
|
|
|
+ star:
|
|
|
+ type: integer
|
|
|
+ time:
|
|
|
+ type: integer
|
|
|
+ type: object
|
|
|
+ model.CategoryJson:
|
|
|
+ properties:
|
|
|
+ name:
|
|
|
+ type: string
|
|
|
+ pic:
|
|
|
+ type: string
|
|
|
+ type: object
|
|
|
+ model.Goods:
|
|
|
+ properties:
|
|
|
+ desc:
|
|
|
+ type: string
|
|
|
+ id:
|
|
|
+ type: integer
|
|
|
+ integrity:
|
|
|
+ type: integer
|
|
|
+ ownerId:
|
|
|
+ type: integer
|
|
|
+ pic:
|
|
|
+ $ref: '#/definitions/model.Pic'
|
|
|
+ place:
|
|
|
+ type: string
|
|
|
+ price:
|
|
|
+ type: integer
|
|
|
+ state:
|
|
|
+ type: integer
|
|
|
+ title:
|
|
|
+ type: string
|
|
|
+ type: object
|
|
|
+ model.GoodsJson:
|
|
|
+ properties:
|
|
|
+ categories:
|
|
|
+ items:
|
|
|
+ type: integer
|
|
|
+ type: array
|
|
|
+ desc:
|
|
|
+ type: string
|
|
|
+ integrity:
|
|
|
+ type: integer
|
|
|
+ ownerId:
|
|
|
+ type: integer
|
|
|
+ pic:
|
|
|
+ $ref: '#/definitions/model.Pic'
|
|
|
+ place:
|
|
|
+ type: string
|
|
|
+ price:
|
|
|
+ type: integer
|
|
|
+ state:
|
|
|
+ type: integer
|
|
|
+ title:
|
|
|
+ type: string
|
|
|
+ type: object
|
|
|
+ model.OrderJson:
|
|
|
+ properties:
|
|
|
+ buyerId:
|
|
|
+ type: integer
|
|
|
+ goodsId:
|
|
|
+ type: integer
|
|
|
+ phone:
|
|
|
+ type: string
|
|
|
+ place:
|
|
|
+ type: string
|
|
|
+ state:
|
|
|
+ type: integer
|
|
|
+ time:
|
|
|
+ type: string
|
|
|
+ type: object
|
|
|
+ model.Pic:
|
|
|
+ properties:
|
|
|
+ id:
|
|
|
+ type: integer
|
|
|
+ name:
|
|
|
+ type: string
|
|
|
+ url:
|
|
|
+ type: string
|
|
|
+ type: object
|
|
|
+ model.RelationJson:
|
|
|
+ properties:
|
|
|
+ owner:
|
|
|
+ type: integer
|
|
|
+ target:
|
|
|
+ type: integer
|
|
|
+ type:
|
|
|
+ type: integer
|
|
|
+ type: object
|
|
|
+ model.User:
|
|
|
+ properties:
|
|
|
+ avatar:
|
|
|
+ type: string
|
|
|
+ name:
|
|
|
+ type: string
|
|
|
+ phone:
|
|
|
+ type: string
|
|
|
+ uid:
|
|
|
+ type: integer
|
|
|
+ vid:
|
|
|
+ type: string
|
|
|
+ type: object
|
|
|
+ model.UserJson:
|
|
|
+ properties:
|
|
|
+ avatar:
|
|
|
+ type: string
|
|
|
+ name:
|
|
|
+ type: string
|
|
|
+ phone:
|
|
|
+ type: string
|
|
|
+ vid:
|
|
|
+ type: string
|
|
|
+ type: object
|
|
|
+ response.Response:
|
|
|
+ properties:
|
|
|
+ code:
|
|
|
+ type: integer
|
|
|
+ data: {}
|
|
|
+ message:
|
|
|
+ type: string
|
|
|
+ type: object
|
|
|
host: 127.0.0.1:8084
|
|
|
info:
|
|
|
contact: {}
|
|
|
- description: 一个基于微信小程序的校园二手交易平台的api
|
|
|
+ description: 一个基于微信小程序的校园二手交易平台的api文档
|
|
|
license:
|
|
|
name: Apache 2.0
|
|
|
url: http://www.apache.org/licenses/LICENSE-2.0.html
|
|
@@ -10,68 +155,652 @@ info:
|
|
|
title: 二手交易
|
|
|
version: "1.0"
|
|
|
paths:
|
|
|
- /user/login:
|
|
|
+ /appraise/create:
|
|
|
post:
|
|
|
parameters:
|
|
|
- - description: 用户ID
|
|
|
- in: formData
|
|
|
- name: uid
|
|
|
+ - description: 评价信息
|
|
|
+ in: body
|
|
|
+ name: json
|
|
|
+ required: true
|
|
|
+ schema:
|
|
|
+ $ref: '#/definitions/model.AppraiseJson'
|
|
|
+ produces:
|
|
|
+ - application/json
|
|
|
+ responses:
|
|
|
+ "200":
|
|
|
+ description: OK
|
|
|
+ schema:
|
|
|
+ $ref: '#/definitions/response.Response'
|
|
|
+ summary: 创建评论
|
|
|
+ tags:
|
|
|
+ - 评论模块
|
|
|
+ /appraise/delete/{id}:
|
|
|
+ delete:
|
|
|
+ parameters:
|
|
|
+ - description: 评论id
|
|
|
+ in: path
|
|
|
+ name: id
|
|
|
+ required: true
|
|
|
+ type: integer
|
|
|
+ produces:
|
|
|
+ - application/json
|
|
|
+ responses:
|
|
|
+ "200":
|
|
|
+ description: OK
|
|
|
+ schema:
|
|
|
+ $ref: '#/definitions/response.Response'
|
|
|
+ summary: 删除评论
|
|
|
+ tags:
|
|
|
+ - 评论模块
|
|
|
+ /appraise/revise:
|
|
|
+ post:
|
|
|
+ parameters:
|
|
|
+ - description: 评价信息
|
|
|
+ in: body
|
|
|
+ name: json
|
|
|
+ required: true
|
|
|
+ schema:
|
|
|
+ $ref: '#/definitions/model.Appraise'
|
|
|
+ produces:
|
|
|
+ - application/json
|
|
|
+ responses:
|
|
|
+ "200":
|
|
|
+ description: OK
|
|
|
+ schema:
|
|
|
+ $ref: '#/definitions/response.Response'
|
|
|
+ summary: 修改评论
|
|
|
+ tags:
|
|
|
+ - 评论模块
|
|
|
+ /appraise/user:
|
|
|
+ get:
|
|
|
+ parameters:
|
|
|
+ - description: 用户id
|
|
|
+ in: query
|
|
|
+ name: id
|
|
|
+ required: true
|
|
|
+ type: integer
|
|
|
+ produces:
|
|
|
+ - application/json
|
|
|
+ responses:
|
|
|
+ "200":
|
|
|
+ description: OK
|
|
|
+ schema:
|
|
|
+ $ref: '#/definitions/response.Response'
|
|
|
+ summary: 获取用户评价
|
|
|
+ tags:
|
|
|
+ - 评论模块
|
|
|
+ /category:
|
|
|
+ get:
|
|
|
+ consumes:
|
|
|
+ - application/json
|
|
|
+ produces:
|
|
|
+ - application/json
|
|
|
+ responses:
|
|
|
+ "200":
|
|
|
+ description: OK
|
|
|
+ schema:
|
|
|
+ $ref: '#/definitions/response.Response'
|
|
|
+ summary: 获取所有分类
|
|
|
+ tags:
|
|
|
+ - 分类模块
|
|
|
+ /category/create:
|
|
|
+ post:
|
|
|
+ consumes:
|
|
|
+ - application/json
|
|
|
+ parameters:
|
|
|
+ - description: 分类数据
|
|
|
+ in: body
|
|
|
+ name: json
|
|
|
+ required: true
|
|
|
+ schema:
|
|
|
+ $ref: '#/definitions/model.CategoryJson'
|
|
|
+ produces:
|
|
|
+ - application/json
|
|
|
+ responses:
|
|
|
+ "200":
|
|
|
+ description: OK
|
|
|
+ schema:
|
|
|
+ $ref: '#/definitions/response.Response'
|
|
|
+ summary: 创建分类
|
|
|
+ tags:
|
|
|
+ - 分类模块
|
|
|
+ /category/delete/{id}:
|
|
|
+ delete:
|
|
|
+ parameters:
|
|
|
+ - description: 分类id
|
|
|
+ in: path
|
|
|
+ name: id
|
|
|
+ required: true
|
|
|
+ type: integer
|
|
|
+ produces:
|
|
|
+ - application/json
|
|
|
+ responses:
|
|
|
+ "200":
|
|
|
+ description: OK
|
|
|
+ schema:
|
|
|
+ $ref: '#/definitions/response.Response'
|
|
|
+ summary: 根据分类id删除某个分类
|
|
|
+ tags:
|
|
|
+ - 分类模块
|
|
|
+ /chat:
|
|
|
+ get:
|
|
|
+ responses:
|
|
|
+ "200":
|
|
|
+ description: OK
|
|
|
+ schema:
|
|
|
+ $ref: '#/definitions/response.Response'
|
|
|
+ summary: 与服务端进行websocket连接,请使用postman测试
|
|
|
+ tags:
|
|
|
+ - 聊天模块
|
|
|
+ /goods:
|
|
|
+ get:
|
|
|
+ produces:
|
|
|
+ - application/json
|
|
|
+ responses:
|
|
|
+ "200":
|
|
|
+ description: OK
|
|
|
+ schema:
|
|
|
+ $ref: '#/definitions/response.Response'
|
|
|
+ summary: 获取所有商品
|
|
|
+ tags:
|
|
|
+ - 商品模块
|
|
|
+ /goods/{page}/{pageSize}:
|
|
|
+ get:
|
|
|
+ parameters:
|
|
|
+ - description: 页数
|
|
|
+ in: path
|
|
|
+ name: page
|
|
|
+ required: true
|
|
|
+ type: integer
|
|
|
+ - description: 一页的大小
|
|
|
+ in: path
|
|
|
+ name: pageSize
|
|
|
+ required: true
|
|
|
+ type: integer
|
|
|
+ produces:
|
|
|
+ - application/json
|
|
|
+ responses:
|
|
|
+ "200":
|
|
|
+ description: OK
|
|
|
+ schema:
|
|
|
+ $ref: '#/definitions/response.Response'
|
|
|
+ summary: 获取所有商品
|
|
|
+ tags:
|
|
|
+ - 商品模块
|
|
|
+ /goods/create:
|
|
|
+ post:
|
|
|
+ consumes:
|
|
|
+ - application/json
|
|
|
+ parameters:
|
|
|
+ - description: 商品信息
|
|
|
+ in: body
|
|
|
+ name: json
|
|
|
+ required: true
|
|
|
+ schema:
|
|
|
+ $ref: '#/definitions/model.GoodsJson'
|
|
|
+ produces:
|
|
|
+ - application/json
|
|
|
+ responses:
|
|
|
+ "200":
|
|
|
+ description: OK
|
|
|
+ schema:
|
|
|
+ $ref: '#/definitions/response.Response'
|
|
|
+ summary: 创建商品
|
|
|
+ tags:
|
|
|
+ - 商品模块
|
|
|
+ /goods/delete/{id}:
|
|
|
+ delete:
|
|
|
+ parameters:
|
|
|
+ - description: 商品id
|
|
|
+ in: path
|
|
|
+ name: id
|
|
|
+ required: true
|
|
|
+ type: integer
|
|
|
+ produces:
|
|
|
+ - application/json
|
|
|
+ responses:
|
|
|
+ "200":
|
|
|
+ description: OK
|
|
|
+ schema:
|
|
|
+ $ref: '#/definitions/response.Response'
|
|
|
+ summary: 删除商品
|
|
|
+ tags:
|
|
|
+ - 商品模块
|
|
|
+ /goods/detail/{id}:
|
|
|
+ get:
|
|
|
+ parameters:
|
|
|
+ - description: 商品id
|
|
|
+ in: path
|
|
|
+ name: id
|
|
|
+ required: true
|
|
|
+ type: integer
|
|
|
+ produces:
|
|
|
+ - application/json
|
|
|
+ responses:
|
|
|
+ "200":
|
|
|
+ description: OK
|
|
|
+ schema:
|
|
|
+ $ref: '#/definitions/response.Response'
|
|
|
+ summary: 获取商品详细信息
|
|
|
+ tags:
|
|
|
+ - 商品模块
|
|
|
+ /goods/recommend/{page}/{pageSize}:
|
|
|
+ get:
|
|
|
+ parameters:
|
|
|
+ - description: 用户id
|
|
|
+ in: query
|
|
|
+ name: id
|
|
|
+ required: true
|
|
|
+ type: integer
|
|
|
+ - description: 页数
|
|
|
+ in: path
|
|
|
+ name: page
|
|
|
+ required: true
|
|
|
+ type: integer
|
|
|
+ - description: 一页的大小
|
|
|
+ in: path
|
|
|
+ name: pageSize
|
|
|
+ required: true
|
|
|
+ type: integer
|
|
|
+ produces:
|
|
|
+ - application/json
|
|
|
+ responses:
|
|
|
+ "200":
|
|
|
+ description: OK
|
|
|
+ schema:
|
|
|
+ $ref: '#/definitions/response.Response'
|
|
|
+ summary: 分页获取推荐商品
|
|
|
+ tags:
|
|
|
+ - 商品模块
|
|
|
+ /goods/revise:
|
|
|
+ post:
|
|
|
+ parameters:
|
|
|
+ - description: 商品信息
|
|
|
+ in: body
|
|
|
+ name: json
|
|
|
+ required: true
|
|
|
+ schema:
|
|
|
+ $ref: '#/definitions/model.Goods'
|
|
|
+ produces:
|
|
|
+ - application/json
|
|
|
+ responses:
|
|
|
+ "200":
|
|
|
+ description: OK
|
|
|
+ schema:
|
|
|
+ $ref: '#/definitions/response.Response'
|
|
|
+ summary: 修改商品信息
|
|
|
+ tags:
|
|
|
+ - 商品模块
|
|
|
+ /goods/search/{page}/{pageSize}:
|
|
|
+ get:
|
|
|
+ parameters:
|
|
|
+ - description: 页数
|
|
|
+ in: path
|
|
|
+ name: page
|
|
|
+ required: true
|
|
|
+ type: integer
|
|
|
+ - description: 一页的大小
|
|
|
+ in: path
|
|
|
+ name: pageSize
|
|
|
+ required: true
|
|
|
+ type: integer
|
|
|
+ - description: 搜素关键词
|
|
|
+ in: query
|
|
|
+ name: keyword
|
|
|
+ required: true
|
|
|
type: string
|
|
|
+ produces:
|
|
|
+ - application/json
|
|
|
responses:
|
|
|
"200":
|
|
|
- description: code","data","token"}
|
|
|
+ description: OK
|
|
|
schema:
|
|
|
- type: string
|
|
|
- summary: 登录
|
|
|
+ $ref: '#/definitions/response.Response'
|
|
|
+ summary: 搜索商品并分页显示
|
|
|
tags:
|
|
|
- - 用户模块
|
|
|
- /user/modify:
|
|
|
+ - 商品模块
|
|
|
+ /goods/user/{id}:
|
|
|
+ get:
|
|
|
+ parameters:
|
|
|
+ - description: 用户id
|
|
|
+ in: path
|
|
|
+ name: id
|
|
|
+ required: true
|
|
|
+ type: integer
|
|
|
+ produces:
|
|
|
+ - application/json
|
|
|
+ responses:
|
|
|
+ "200":
|
|
|
+ description: OK
|
|
|
+ schema:
|
|
|
+ $ref: '#/definitions/response.Response'
|
|
|
+ summary: 获取某个用户的所有商品
|
|
|
+ tags:
|
|
|
+ - 商品模块
|
|
|
+ /message:
|
|
|
+ get:
|
|
|
+ parameters:
|
|
|
+ - description: 用户id
|
|
|
+ in: query
|
|
|
+ name: uid
|
|
|
+ required: true
|
|
|
+ type: integer
|
|
|
+ produces:
|
|
|
+ - application/json
|
|
|
+ responses:
|
|
|
+ "200":
|
|
|
+ description: OK
|
|
|
+ schema:
|
|
|
+ $ref: '#/definitions/response.Response'
|
|
|
+ summary: 传入用户id获取用户消息记录
|
|
|
+ tags:
|
|
|
+ - 信息模块
|
|
|
+ /message/conv:
|
|
|
+ get:
|
|
|
+ parameters:
|
|
|
+ - description: 用户id
|
|
|
+ in: query
|
|
|
+ name: uid
|
|
|
+ required: true
|
|
|
+ type: integer
|
|
|
+ - description: 对象id
|
|
|
+ in: query
|
|
|
+ name: targetId
|
|
|
+ required: true
|
|
|
+ type: integer
|
|
|
+ produces:
|
|
|
+ - application/json
|
|
|
+ responses:
|
|
|
+ "200":
|
|
|
+ description: OK
|
|
|
+ schema:
|
|
|
+ $ref: '#/definitions/response.Response'
|
|
|
+ summary: 传入用户id和聊天对象id获取消息记录
|
|
|
+ tags:
|
|
|
+ - 信息模块
|
|
|
+ /order:
|
|
|
+ get:
|
|
|
+ produces:
|
|
|
+ - application/json
|
|
|
+ responses:
|
|
|
+ "200":
|
|
|
+ description: OK
|
|
|
+ schema:
|
|
|
+ $ref: '#/definitions/response.Response'
|
|
|
+ summary: 获取所有订单
|
|
|
+ tags:
|
|
|
+ - 订单模块
|
|
|
+ /order/create:
|
|
|
post:
|
|
|
parameters:
|
|
|
- - description: 用户ID
|
|
|
+ - description: 订单信息
|
|
|
+ in: body
|
|
|
+ name: json
|
|
|
+ required: true
|
|
|
+ schema:
|
|
|
+ $ref: '#/definitions/model.OrderJson'
|
|
|
+ produces:
|
|
|
+ - application/json
|
|
|
+ responses:
|
|
|
+ "200":
|
|
|
+ description: OK
|
|
|
+ schema:
|
|
|
+ $ref: '#/definitions/response.Response'
|
|
|
+ summary: 创建订单
|
|
|
+ tags:
|
|
|
+ - 订单模块
|
|
|
+ /order/delete/{id}:
|
|
|
+ delete:
|
|
|
+ parameters:
|
|
|
+ - description: 订单id
|
|
|
+ in: path
|
|
|
+ name: id
|
|
|
+ required: true
|
|
|
+ type: integer
|
|
|
+ produces:
|
|
|
+ - application/json
|
|
|
+ responses:
|
|
|
+ "200":
|
|
|
+ description: OK
|
|
|
+ schema:
|
|
|
+ $ref: '#/definitions/response.Response'
|
|
|
+ summary: 删除订单
|
|
|
+ tags:
|
|
|
+ - 订单模块
|
|
|
+ /order/revise:
|
|
|
+ post:
|
|
|
+ parameters:
|
|
|
+ - description: 订单id
|
|
|
in: formData
|
|
|
- name: uid
|
|
|
- type: string
|
|
|
- - description: 头像
|
|
|
+ name: id
|
|
|
+ required: true
|
|
|
+ type: integer
|
|
|
+ - description: 订单状态
|
|
|
in: formData
|
|
|
- name: avatar
|
|
|
- type: string
|
|
|
- - description: 用户名
|
|
|
+ name: state
|
|
|
+ required: true
|
|
|
+ type: integer
|
|
|
+ produces:
|
|
|
+ - application/json
|
|
|
+ responses:
|
|
|
+ "200":
|
|
|
+ description: OK
|
|
|
+ schema:
|
|
|
+ $ref: '#/definitions/response.Response'
|
|
|
+ summary: 修改订单的状态
|
|
|
+ tags:
|
|
|
+ - 订单模块
|
|
|
+ /order/user:
|
|
|
+ get:
|
|
|
+ parameters:
|
|
|
+ - description: 用户id
|
|
|
+ in: query
|
|
|
+ name: id
|
|
|
+ required: true
|
|
|
+ type: integer
|
|
|
+ produces:
|
|
|
+ - application/json
|
|
|
+ responses:
|
|
|
+ "200":
|
|
|
+ description: OK
|
|
|
+ schema:
|
|
|
+ $ref: '#/definitions/response.Response'
|
|
|
+ summary: 获取用户的所有订单
|
|
|
+ tags:
|
|
|
+ - 订单模块
|
|
|
+ /pic:
|
|
|
+ get:
|
|
|
+ produces:
|
|
|
+ - application/json
|
|
|
+ responses:
|
|
|
+ "200":
|
|
|
+ description: OK
|
|
|
+ schema:
|
|
|
+ $ref: '#/definitions/response.Response'
|
|
|
+ summary: 获取所有图片
|
|
|
+ tags:
|
|
|
+ - 图片模块
|
|
|
+ /pic/delete/{id}:
|
|
|
+ delete:
|
|
|
+ parameters:
|
|
|
+ - description: 图片id
|
|
|
+ in: path
|
|
|
+ name: id
|
|
|
+ required: true
|
|
|
+ type: integer
|
|
|
+ produces:
|
|
|
+ - application/json
|
|
|
+ responses:
|
|
|
+ "200":
|
|
|
+ description: OK
|
|
|
+ schema:
|
|
|
+ $ref: '#/definitions/response.Response'
|
|
|
+ summary: 删除图片
|
|
|
+ tags:
|
|
|
+ - 图片模块
|
|
|
+ /pic/upload:
|
|
|
+ post:
|
|
|
+ consumes:
|
|
|
+ - multipart/form-data
|
|
|
+ parameters:
|
|
|
+ - description: 图片
|
|
|
in: formData
|
|
|
- name: name
|
|
|
- type: string
|
|
|
- - description: 电话
|
|
|
+ name: pic
|
|
|
+ required: true
|
|
|
+ type: file
|
|
|
+ produces:
|
|
|
+ - application/json
|
|
|
+ responses:
|
|
|
+ "200":
|
|
|
+ description: OK
|
|
|
+ schema:
|
|
|
+ $ref: '#/definitions/response.Response'
|
|
|
+ summary: 上传图片
|
|
|
+ tags:
|
|
|
+ - 图片模块
|
|
|
+ /relation/bad:
|
|
|
+ get:
|
|
|
+ parameters:
|
|
|
+ - description: 用户id
|
|
|
+ in: query
|
|
|
+ name: uid
|
|
|
+ required: true
|
|
|
+ type: integer
|
|
|
+ produces:
|
|
|
+ - application/json
|
|
|
+ responses:
|
|
|
+ "200":
|
|
|
+ description: OK
|
|
|
+ schema:
|
|
|
+ $ref: '#/definitions/response.Response'
|
|
|
+ summary: 传入用户id获取用户黑名单列表
|
|
|
+ tags:
|
|
|
+ - 用户关系模块
|
|
|
+ /relation/create:
|
|
|
+ post:
|
|
|
+ consumes:
|
|
|
+ - application/json
|
|
|
+ parameters:
|
|
|
+ - description: 关系数据
|
|
|
+ in: body
|
|
|
+ name: json
|
|
|
+ required: true
|
|
|
+ schema:
|
|
|
+ $ref: '#/definitions/model.RelationJson'
|
|
|
+ produces:
|
|
|
+ - application/json
|
|
|
+ responses:
|
|
|
+ "200":
|
|
|
+ description: OK
|
|
|
+ schema:
|
|
|
+ $ref: '#/definitions/response.Response'
|
|
|
+ summary: 添加用户间的关系,关系类型有1:好友关系,2:黑名单关系
|
|
|
+ tags:
|
|
|
+ - 用户关系模块
|
|
|
+ /relation/delete/{id}:
|
|
|
+ delete:
|
|
|
+ parameters:
|
|
|
+ - description: 关系id
|
|
|
+ in: path
|
|
|
+ name: id
|
|
|
+ required: true
|
|
|
+ type: integer
|
|
|
+ produces:
|
|
|
+ - application/json
|
|
|
+ responses:
|
|
|
+ "200":
|
|
|
+ description: OK
|
|
|
+ schema:
|
|
|
+ $ref: '#/definitions/response.Response'
|
|
|
+ summary: 根据关系id删除关系
|
|
|
+ tags:
|
|
|
+ - 用户关系模块
|
|
|
+ /relation/friend:
|
|
|
+ get:
|
|
|
+ parameters:
|
|
|
+ - description: 用户id
|
|
|
+ in: query
|
|
|
+ name: uid
|
|
|
+ required: true
|
|
|
+ type: integer
|
|
|
+ produces:
|
|
|
+ - application/json
|
|
|
+ responses:
|
|
|
+ "200":
|
|
|
+ description: OK
|
|
|
+ schema:
|
|
|
+ $ref: '#/definitions/response.Response'
|
|
|
+ summary: 传入用户id获取用户好友列表
|
|
|
+ tags:
|
|
|
+ - 用户关系模块
|
|
|
+ /user/info:
|
|
|
+ get:
|
|
|
+ produces:
|
|
|
+ - application/json
|
|
|
+ responses:
|
|
|
+ "200":
|
|
|
+ description: OK
|
|
|
+ schema:
|
|
|
+ $ref: '#/definitions/response.Response'
|
|
|
+ summary: 获取用户信息
|
|
|
+ tags:
|
|
|
+ - 用户模块
|
|
|
+ /user/login:
|
|
|
+ post:
|
|
|
+ parameters:
|
|
|
+ - description: 微信ID
|
|
|
in: formData
|
|
|
- name: phone
|
|
|
+ name: vid
|
|
|
type: string
|
|
|
+ produces:
|
|
|
+ - application/json
|
|
|
+ responses:
|
|
|
+ "200":
|
|
|
+ description: OK
|
|
|
+ schema:
|
|
|
+ $ref: '#/definitions/response.Response'
|
|
|
+ summary: 登录
|
|
|
+ tags:
|
|
|
+ - 用户模块
|
|
|
+ /user/modify:
|
|
|
+ post:
|
|
|
+ consumes:
|
|
|
+ - application/json
|
|
|
+ parameters:
|
|
|
+ - description: 用户信息
|
|
|
+ in: body
|
|
|
+ name: json
|
|
|
+ required: true
|
|
|
+ schema:
|
|
|
+ $ref: '#/definitions/model.User'
|
|
|
+ produces:
|
|
|
+ - application/json
|
|
|
responses:
|
|
|
"200":
|
|
|
- description: code","data","token"}
|
|
|
+ description: OK
|
|
|
schema:
|
|
|
- type: string
|
|
|
+ $ref: '#/definitions/response.Response'
|
|
|
summary: 修改用户信息
|
|
|
tags:
|
|
|
- 用户模块
|
|
|
/user/register:
|
|
|
post:
|
|
|
+ consumes:
|
|
|
+ - application/json
|
|
|
parameters:
|
|
|
- - description: 用户ID
|
|
|
- in: formData
|
|
|
- name: uid
|
|
|
- type: string
|
|
|
- - description: 用户名
|
|
|
- in: formData
|
|
|
- name: name
|
|
|
- type: string
|
|
|
- - description: 头像
|
|
|
- in: formData
|
|
|
- name: avatar
|
|
|
- type: string
|
|
|
+ - description: 用户信息
|
|
|
+ in: body
|
|
|
+ name: json
|
|
|
+ required: true
|
|
|
+ schema:
|
|
|
+ $ref: '#/definitions/model.UserJson'
|
|
|
+ produces:
|
|
|
+ - application/json
|
|
|
responses:
|
|
|
"200":
|
|
|
- description: code","data","message"}
|
|
|
+ description: OK
|
|
|
schema:
|
|
|
- type: string
|
|
|
+ $ref: '#/definitions/response.Response'
|
|
|
summary: 创建用户
|
|
|
tags:
|
|
|
- 用户模块
|