402 lines
13 KiB
JSON
402 lines
13 KiB
JSON
![]() |
{
|
|||
|
"swagger": "2.0",
|
|||
|
"info": {
|
|||
|
"contact": {}
|
|||
|
},
|
|||
|
"paths": {
|
|||
|
"/api/v1/login/captcha": {
|
|||
|
"post": {
|
|||
|
"description": "该接口用于发送短信验证码,限制验证码的发送频率和每天发送的次数。",
|
|||
|
"consumes": [
|
|||
|
"application/json"
|
|||
|
],
|
|||
|
"produces": [
|
|||
|
"application/json"
|
|||
|
],
|
|||
|
"tags": [
|
|||
|
"sms"
|
|||
|
],
|
|||
|
"summary": "发送短信验证码",
|
|||
|
"parameters": [
|
|||
|
{
|
|||
|
"description": "发送短信验证码的请求参数",
|
|||
|
"name": "body",
|
|||
|
"in": "body",
|
|||
|
"required": true,
|
|||
|
"schema": {
|
|||
|
"$ref": "#/definitions/login.SsoSendSmsCodeParams"
|
|||
|
}
|
|||
|
}
|
|||
|
],
|
|||
|
"responses": {
|
|||
|
"200": {
|
|||
|
"description": "短信验证码发送成功",
|
|||
|
"schema": {
|
|||
|
"$ref": "#/definitions/dapi.ResponseCommon"
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
},
|
|||
|
"/api/v1/login/login": {
|
|||
|
"post": {
|
|||
|
"description": "该接口用于用户通过手机号和密码进行登录。如果登录失败,系统会记录错误信息并限制登录次数。",
|
|||
|
"consumes": [
|
|||
|
"application/json"
|
|||
|
],
|
|||
|
"produces": [
|
|||
|
"application/json"
|
|||
|
],
|
|||
|
"tags": [
|
|||
|
"login"
|
|||
|
],
|
|||
|
"summary": "用户登录",
|
|||
|
"parameters": [
|
|||
|
{
|
|||
|
"description": "用户登录信息",
|
|||
|
"name": "body",
|
|||
|
"in": "body",
|
|||
|
"required": true,
|
|||
|
"schema": {
|
|||
|
"$ref": "#/definitions/login.SsoLoginParams"
|
|||
|
}
|
|||
|
}
|
|||
|
],
|
|||
|
"responses": {
|
|||
|
"200": {
|
|||
|
"description": "登录成功返回Token",
|
|||
|
"schema": {
|
|||
|
"$ref": "#/definitions/login.SsoLoginResponse"
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
},
|
|||
|
"/api/v1/login/register": {
|
|||
|
"post": {
|
|||
|
"description": "该接口用于用户通过手机号、密码、验证码等信息进行注册。如果注册成功,返回用户的Token。",
|
|||
|
"consumes": [
|
|||
|
"application/json"
|
|||
|
],
|
|||
|
"produces": [
|
|||
|
"application/json"
|
|||
|
],
|
|||
|
"tags": [
|
|||
|
"register"
|
|||
|
],
|
|||
|
"summary": "用户注册",
|
|||
|
"parameters": [
|
|||
|
{
|
|||
|
"description": "用户注册信息",
|
|||
|
"name": "body",
|
|||
|
"in": "body",
|
|||
|
"required": true,
|
|||
|
"schema": {
|
|||
|
"$ref": "#/definitions/login.SsoRegisterParams"
|
|||
|
}
|
|||
|
}
|
|||
|
],
|
|||
|
"responses": {
|
|||
|
"200": {
|
|||
|
"description": "注册成功返回Token",
|
|||
|
"schema": {
|
|||
|
"$ref": "#/definitions/login.SsoRegisterResponse"
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
},
|
|||
|
"/api/v1/user/config/get": {
|
|||
|
"post": {
|
|||
|
"description": "获取商户自定义的配置",
|
|||
|
"consumes": [
|
|||
|
"application/json"
|
|||
|
],
|
|||
|
"produces": [
|
|||
|
"application/json"
|
|||
|
],
|
|||
|
"tags": [
|
|||
|
"商户配置"
|
|||
|
],
|
|||
|
"summary": "查看商户自定义配置",
|
|||
|
"responses": {
|
|||
|
"200": {
|
|||
|
"description": "成功返回商户的配置信息",
|
|||
|
"schema": {
|
|||
|
"$ref": "#/definitions/userConfig.GetUserConfigResponse"
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
},
|
|||
|
"/api/v1/user/config/upd": {
|
|||
|
"post": {
|
|||
|
"description": "更新商户的配置信息",
|
|||
|
"consumes": [
|
|||
|
"application/json"
|
|||
|
],
|
|||
|
"produces": [
|
|||
|
"application/json"
|
|||
|
],
|
|||
|
"tags": [
|
|||
|
"商户配置"
|
|||
|
],
|
|||
|
"summary": "修改商户自定义配置",
|
|||
|
"parameters": [
|
|||
|
{
|
|||
|
"description": "TBD",
|
|||
|
"name": "body",
|
|||
|
"in": "body",
|
|||
|
"required": true,
|
|||
|
"schema": {
|
|||
|
"$ref": "#/definitions/userConfig.UpdUserConfigParams"
|
|||
|
}
|
|||
|
}
|
|||
|
],
|
|||
|
"responses": {
|
|||
|
"200": {
|
|||
|
"description": "TBD",
|
|||
|
"schema": {
|
|||
|
"$ref": "#/definitions/dapi.ResponseCommon"
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
},
|
|||
|
"definitions": {
|
|||
|
"dapi.ResponseCommon": {
|
|||
|
"type": "object",
|
|||
|
"properties": {
|
|||
|
"code": {
|
|||
|
"description": "返回Code 200 成功 其他是失败",
|
|||
|
"type": "integer"
|
|||
|
},
|
|||
|
"count": {
|
|||
|
"description": "条数",
|
|||
|
"type": "integer"
|
|||
|
},
|
|||
|
"message": {
|
|||
|
"description": "返回信息"
|
|||
|
}
|
|||
|
}
|
|||
|
},
|
|||
|
"login.SsoLoginParams": {
|
|||
|
"type": "object",
|
|||
|
"properties": {
|
|||
|
"mobile": {
|
|||
|
"description": "登陆手机号",
|
|||
|
"type": "string"
|
|||
|
},
|
|||
|
"passWord": {
|
|||
|
"description": "密码",
|
|||
|
"type": "string"
|
|||
|
}
|
|||
|
}
|
|||
|
},
|
|||
|
"login.SsoLoginResponse": {
|
|||
|
"type": "object",
|
|||
|
"properties": {
|
|||
|
"code": {
|
|||
|
"description": "返回Code 200 成功 其他是失败",
|
|||
|
"type": "integer"
|
|||
|
},
|
|||
|
"count": {
|
|||
|
"description": "条数",
|
|||
|
"type": "integer"
|
|||
|
},
|
|||
|
"data": {
|
|||
|
"description": "数据列表",
|
|||
|
"type": "object",
|
|||
|
"properties": {
|
|||
|
"token": {
|
|||
|
"description": "返回token",
|
|||
|
"type": "string"
|
|||
|
}
|
|||
|
}
|
|||
|
},
|
|||
|
"message": {
|
|||
|
"description": "返回信息"
|
|||
|
}
|
|||
|
}
|
|||
|
},
|
|||
|
"login.SsoRegisterParams": {
|
|||
|
"type": "object",
|
|||
|
"properties": {
|
|||
|
"captcha": {
|
|||
|
"description": "验证码",
|
|||
|
"type": "string"
|
|||
|
},
|
|||
|
"email": {
|
|||
|
"description": "邮箱(可选)",
|
|||
|
"type": "string"
|
|||
|
},
|
|||
|
"invite": {
|
|||
|
"description": "邀请码(可选)",
|
|||
|
"type": "string"
|
|||
|
},
|
|||
|
"mobile": {
|
|||
|
"description": "手机号",
|
|||
|
"type": "string"
|
|||
|
},
|
|||
|
"password": {
|
|||
|
"description": "密码",
|
|||
|
"type": "string"
|
|||
|
}
|
|||
|
}
|
|||
|
},
|
|||
|
"login.SsoRegisterResponse": {
|
|||
|
"type": "object",
|
|||
|
"properties": {
|
|||
|
"code": {
|
|||
|
"description": "返回Code 200 成功 其他是失败",
|
|||
|
"type": "integer"
|
|||
|
},
|
|||
|
"count": {
|
|||
|
"description": "条数",
|
|||
|
"type": "integer"
|
|||
|
},
|
|||
|
"data": {
|
|||
|
"type": "object",
|
|||
|
"properties": {
|
|||
|
"token": {
|
|||
|
"type": "string"
|
|||
|
}
|
|||
|
}
|
|||
|
},
|
|||
|
"message": {
|
|||
|
"description": "返回信息"
|
|||
|
}
|
|||
|
}
|
|||
|
},
|
|||
|
"login.SsoSendSmsCodeParams": {
|
|||
|
"type": "object",
|
|||
|
"properties": {
|
|||
|
"mobile": {
|
|||
|
"type": "string"
|
|||
|
}
|
|||
|
}
|
|||
|
},
|
|||
|
"model.ExtraConfig": {
|
|||
|
"type": "object"
|
|||
|
},
|
|||
|
"model.UserConfig": {
|
|||
|
"type": "object",
|
|||
|
"properties": {
|
|||
|
"createTime": {
|
|||
|
"description": "创建时间戳",
|
|||
|
"type": "integer"
|
|||
|
},
|
|||
|
"defaultSize": {
|
|||
|
"description": "默认尺寸配置,存储长、宽、高、重量等",
|
|||
|
"allOf": [
|
|||
|
{
|
|||
|
"$ref": "#/definitions/model.UserConfigChild"
|
|||
|
}
|
|||
|
]
|
|||
|
},
|
|||
|
"enableBlacklistFilter": {
|
|||
|
"description": "是否启用违禁词过滤",
|
|||
|
"type": "string"
|
|||
|
},
|
|||
|
"enableDeduplication": {
|
|||
|
"description": "是否启用去重检查",
|
|||
|
"type": "string"
|
|||
|
},
|
|||
|
"exchangeRates": {
|
|||
|
"description": "汇率配置,存储不同货币的汇率",
|
|||
|
"allOf": [
|
|||
|
{
|
|||
|
"$ref": "#/definitions/model.UserConfigChild"
|
|||
|
}
|
|||
|
]
|
|||
|
},
|
|||
|
"extraConfig": {
|
|||
|
"description": "额外的扩展配置",
|
|||
|
"allOf": [
|
|||
|
{
|
|||
|
"$ref": "#/definitions/model.ExtraConfig"
|
|||
|
}
|
|||
|
]
|
|||
|
},
|
|||
|
"fixedStock": {
|
|||
|
"description": "固定库存值,NULL 表示未设置",
|
|||
|
"type": "integer"
|
|||
|
},
|
|||
|
"id": {
|
|||
|
"description": "用户配置ID",
|
|||
|
"type": "integer"
|
|||
|
},
|
|||
|
"importSource": {
|
|||
|
"description": "导入方式",
|
|||
|
"type": "string"
|
|||
|
},
|
|||
|
"minStock": {
|
|||
|
"description": "最小库存,低于该库存不允许上品",
|
|||
|
"type": "integer"
|
|||
|
},
|
|||
|
"priceMultiplier": {
|
|||
|
"description": "上品价格上浮倍率",
|
|||
|
"type": "number"
|
|||
|
},
|
|||
|
"uid": {
|
|||
|
"description": "用户ID,关联用户表",
|
|||
|
"type": "integer"
|
|||
|
},
|
|||
|
"updateTime": {
|
|||
|
"description": "更新时间戳",
|
|||
|
"type": "integer"
|
|||
|
}
|
|||
|
}
|
|||
|
},
|
|||
|
"model.UserConfigChild": {
|
|||
|
"type": "object",
|
|||
|
"properties": {
|
|||
|
"data": {
|
|||
|
"type": "array",
|
|||
|
"items": {
|
|||
|
"type": "object",
|
|||
|
"properties": {
|
|||
|
"code": {
|
|||
|
"type": "string"
|
|||
|
},
|
|||
|
"num": {
|
|||
|
"type": "number"
|
|||
|
},
|
|||
|
"unit": {
|
|||
|
"type": "string"
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
},
|
|||
|
"userConfig.GetUserConfigResponse": {
|
|||
|
"type": "object",
|
|||
|
"properties": {
|
|||
|
"code": {
|
|||
|
"description": "返回Code 200 成功 其他是失败",
|
|||
|
"type": "integer"
|
|||
|
},
|
|||
|
"count": {
|
|||
|
"description": "条数",
|
|||
|
"type": "integer"
|
|||
|
},
|
|||
|
"data": {
|
|||
|
"type": "object"
|
|||
|
},
|
|||
|
"message": {
|
|||
|
"description": "返回信息"
|
|||
|
}
|
|||
|
}
|
|||
|
},
|
|||
|
"userConfig.UpdUserConfigParams": {
|
|||
|
"type": "object",
|
|||
|
"properties": {
|
|||
|
"data": {
|
|||
|
"$ref": "#/definitions/model.UserConfig"
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
}
|