Files
tyapi-server/docs/swagger/swagger.yaml

2899 lines
71 KiB
YAML
Raw Normal View History

2025-07-13 16:36:20 +08:00
basePath: /
2025-07-02 16:17:59 +08:00
definitions:
2025-07-28 01:46:39 +08:00
commands.ApplyContractCommand:
properties:
certification_id:
type: string
user_id:
type: string
required:
- certification_id
- user_id
type: object
2025-07-13 16:36:20 +08:00
commands.ChangePasswordCommand:
description: 修改用户密码请求参数
2025-07-02 16:17:59 +08:00
properties:
code:
example: "123456"
type: string
confirm_new_password:
2025-07-28 01:46:39 +08:00
example: NewPassword123
2025-07-02 16:17:59 +08:00
type: string
new_password:
2025-07-28 01:46:39 +08:00
example: NewPassword123
2025-07-02 16:17:59 +08:00
type: string
old_password:
2025-07-28 01:46:39 +08:00
example: OldPassword123
maxLength: 128
minLength: 6
2025-07-02 16:17:59 +08:00
type: string
required:
- code
- confirm_new_password
- new_password
- old_password
type: object
2025-07-20 20:53:26 +08:00
commands.CreateCategoryCommand:
properties:
code:
2025-07-13 16:36:20 +08:00
type: string
2025-07-20 20:53:26 +08:00
description:
2025-07-28 01:46:39 +08:00
maxLength: 200
2025-07-13 16:36:20 +08:00
type: string
2025-07-20 20:53:26 +08:00
is_enabled:
type: boolean
is_visible:
type: boolean
name:
2025-07-28 01:46:39 +08:00
maxLength: 50
minLength: 2
2025-07-13 16:36:20 +08:00
type: string
2025-07-20 20:53:26 +08:00
sort:
2025-07-28 01:46:39 +08:00
maximum: 9999
minimum: 0
2025-07-20 20:53:26 +08:00
type: integer
2025-07-13 16:36:20 +08:00
required:
2025-07-20 20:53:26 +08:00
- code
- name
2025-07-13 16:36:20 +08:00
type: object
2025-07-20 20:53:26 +08:00
commands.CreateProductCommand:
2025-07-15 13:21:34 +08:00
properties:
2025-07-20 20:53:26 +08:00
category_id:
type: string
code:
type: string
content:
2025-07-28 01:46:39 +08:00
maxLength: 5000
2025-07-20 20:53:26 +08:00
type: string
description:
2025-07-28 01:46:39 +08:00
maxLength: 500
2025-07-20 20:53:26 +08:00
type: string
is_enabled:
type: boolean
is_package:
2025-07-15 13:21:34 +08:00
type: boolean
2025-07-20 20:53:26 +08:00
is_visible:
type: boolean
name:
2025-07-28 01:46:39 +08:00
maxLength: 100
minLength: 2
2025-07-15 13:21:34 +08:00
type: string
price:
minimum: 0
type: number
2025-07-20 20:53:26 +08:00
seo_description:
2025-07-28 01:46:39 +08:00
maxLength: 200
2025-07-15 13:21:34 +08:00
type: string
2025-07-20 20:53:26 +08:00
seo_keywords:
2025-07-28 01:46:39 +08:00
maxLength: 200
2025-07-20 20:53:26 +08:00
type: string
seo_title:
description: SEO信息
2025-07-28 01:46:39 +08:00
maxLength: 100
2025-07-15 13:21:34 +08:00
type: string
required:
2025-07-20 20:53:26 +08:00
- category_id
- code
- name
2025-07-15 13:21:34 +08:00
type: object
2025-07-13 16:36:20 +08:00
commands.CreateUserSecretsCommand:
properties:
expires_at:
type: string
user_id:
type: string
required:
- user_id
type: object
commands.CreateWalletCommand:
properties:
user_id:
type: string
required:
- user_id
type: object
2025-07-28 01:46:39 +08:00
commands.EsignCallbackCommand:
properties:
callback_type:
enum:
- auth_result
- sign_result
- flow_status
type: string
certification_id:
type: string
headers:
additionalProperties:
type: string
type: object
query_params:
additionalProperties:
type: string
type: object
raw_data:
type: string
required:
- callback_type
- certification_id
- raw_data
type: object
2025-07-13 16:36:20 +08:00
commands.LoginWithPasswordCommand:
description: 使用密码进行用户登录请求参数
2025-07-02 16:17:59 +08:00
properties:
password:
2025-07-28 01:46:39 +08:00
example: Password123
maxLength: 128
minLength: 6
2025-07-02 16:17:59 +08:00
type: string
phone:
example: "13800138000"
type: string
required:
- password
- phone
type: object
2025-07-13 16:36:20 +08:00
commands.LoginWithSMSCommand:
description: 使用短信验证码进行用户登录请求参数
2025-07-02 16:17:59 +08:00
properties:
code:
example: "123456"
type: string
phone:
example: "13800138000"
type: string
required:
- code
- phone
type: object
2025-07-13 16:36:20 +08:00
commands.RechargeWalletCommand:
properties:
amount:
type: number
user_id:
type: string
required:
- amount
- user_id
type: object
commands.RegisterUserCommand:
description: 用户注册请求参数
2025-07-02 16:17:59 +08:00
properties:
code:
example: "123456"
type: string
confirm_password:
2025-07-28 01:46:39 +08:00
example: Password123
2025-07-02 16:17:59 +08:00
type: string
password:
2025-07-28 01:46:39 +08:00
example: Password123
2025-07-02 16:17:59 +08:00
type: string
phone:
example: "13800138000"
type: string
required:
- code
- confirm_password
- password
- phone
type: object
2025-07-15 13:21:34 +08:00
commands.ResetPasswordCommand:
description: 重置用户密码请求参数(忘记密码时使用)
properties:
code:
example: "123456"
type: string
confirm_new_password:
2025-07-28 01:46:39 +08:00
example: NewPassword123
2025-07-15 13:21:34 +08:00
type: string
new_password:
2025-07-28 01:46:39 +08:00
example: NewPassword123
2025-07-15 13:21:34 +08:00
type: string
phone:
example: "13800138000"
type: string
required:
- code
- confirm_new_password
- new_password
- phone
type: object
2025-07-13 16:36:20 +08:00
commands.SendCodeCommand:
description: 发送短信验证码请求参数
2025-07-02 16:17:59 +08:00
properties:
phone:
example: "13800138000"
type: string
scene:
enum:
- register
- login
- change_password
- reset_password
- bind
- unbind
2025-07-20 20:53:26 +08:00
- certification
2025-07-02 16:17:59 +08:00
example: register
2025-07-13 16:36:20 +08:00
type: string
2025-07-02 16:17:59 +08:00
required:
- phone
- scene
type: object
2025-07-13 16:36:20 +08:00
commands.SubmitEnterpriseInfoCommand:
properties:
company_name:
2025-07-28 01:46:39 +08:00
maxLength: 100
minLength: 2
2025-07-13 16:36:20 +08:00
type: string
legal_person_id:
type: string
legal_person_name:
2025-07-28 01:46:39 +08:00
maxLength: 20
minLength: 2
2025-07-13 16:36:20 +08:00
type: string
2025-07-20 20:53:26 +08:00
legal_person_phone:
2025-07-13 16:36:20 +08:00
type: string
unified_social_code:
type: string
2025-07-20 20:53:26 +08:00
verification_code:
type: string
2025-07-13 16:36:20 +08:00
required:
- company_name
- legal_person_id
- legal_person_name
2025-07-20 20:53:26 +08:00
- legal_person_phone
2025-07-13 16:36:20 +08:00
- unified_social_code
2025-07-20 20:53:26 +08:00
- verification_code
2025-07-13 16:36:20 +08:00
type: object
2025-07-20 20:53:26 +08:00
commands.UpdateCategoryCommand:
2025-07-13 16:36:20 +08:00
properties:
2025-07-20 20:53:26 +08:00
code:
2025-07-13 16:36:20 +08:00
type: string
2025-07-20 20:53:26 +08:00
description:
2025-07-28 01:46:39 +08:00
maxLength: 200
2025-07-20 20:53:26 +08:00
type: string
is_enabled:
2025-07-13 16:36:20 +08:00
type: boolean
2025-07-20 20:53:26 +08:00
is_visible:
type: boolean
name:
2025-07-28 01:46:39 +08:00
maxLength: 50
minLength: 2
2025-07-20 20:53:26 +08:00
type: string
sort:
2025-07-28 01:46:39 +08:00
maximum: 9999
minimum: 0
2025-07-20 20:53:26 +08:00
type: integer
required:
- code
- name
type: object
commands.UpdateProductCommand:
properties:
category_id:
type: string
code:
2025-07-13 16:36:20 +08:00
type: string
2025-07-20 20:53:26 +08:00
content:
2025-07-28 01:46:39 +08:00
maxLength: 5000
2025-07-13 16:36:20 +08:00
type: string
2025-07-20 20:53:26 +08:00
description:
2025-07-28 01:46:39 +08:00
maxLength: 500
2025-07-13 16:36:20 +08:00
type: string
2025-07-20 20:53:26 +08:00
is_enabled:
type: boolean
is_package:
type: boolean
is_visible:
type: boolean
name:
2025-07-28 01:46:39 +08:00
maxLength: 100
minLength: 2
2025-07-20 20:53:26 +08:00
type: string
price:
minimum: 0
type: number
seo_description:
2025-07-28 01:46:39 +08:00
maxLength: 200
2025-07-20 20:53:26 +08:00
type: string
seo_keywords:
2025-07-28 01:46:39 +08:00
maxLength: 200
2025-07-20 20:53:26 +08:00
type: string
seo_title:
description: SEO信息
2025-07-28 01:46:39 +08:00
maxLength: 100
2025-07-20 20:53:26 +08:00
type: string
required:
- category_id
- code
- name
type: object
commands.UpdateSubscriptionPriceCommand:
properties:
price:
minimum: 0
type: number
2025-07-13 16:36:20 +08:00
type: object
commands.UpdateWalletCommand:
properties:
balance:
type: number
is_active:
type: boolean
user_id:
type: string
required:
- user_id
type: object
commands.WalletTransactionCommand:
properties:
amount:
type: number
from_user_id:
type: string
notes:
2025-07-28 01:46:39 +08:00
maxLength: 200
2025-07-13 16:36:20 +08:00
type: string
to_user_id:
type: string
user_id:
type: string
required:
- amount
- from_user_id
- to_user_id
- user_id
type: object
commands.WithdrawWalletCommand:
properties:
amount:
type: number
user_id:
type: string
required:
- amount
- user_id
type: object
2025-07-28 01:46:39 +08:00
enums.CertificationStatus:
enum:
- pending
- info_submitted
- enterprise_verified
- contract_applied
- contract_signed
- info_rejected
- contract_rejected
- contract_expired
type: string
x-enum-comments:
StatusContractApplied: 已申请签署合同
StatusContractExpired: 合同签署超时
StatusContractRejected: 合同被拒签
StatusContractSigned: 已签署合同(认证完成)
StatusEnterpriseVerified: 已企业认证
StatusInfoRejected: 企业信息被拒绝
StatusInfoSubmitted: 已提交企业信息
StatusPending: 待认证
x-enum-varnames:
- StatusPending
- StatusInfoSubmitted
- StatusEnterpriseVerified
- StatusContractApplied
- StatusContractSigned
- StatusInfoRejected
- StatusContractRejected
- StatusContractExpired
enums.FailureReason:
enum:
- enterprise_not_exists
- enterprise_info_mismatch
- enterprise_status_abnormal
- legal_person_mismatch
- esign_verification_failed
- invalid_document
- contract_rejected_by_user
- contract_expired
- sign_process_failed
- contract_gen_failed
- esign_flow_error
- system_error
- network_error
- timeout
- unknown_error
type: string
x-enum-comments:
FailureReasonContractExpired: 合同签署超时
FailureReasonContractGenFailed: 合同生成失败
FailureReasonContractRejectedByUser: 用户拒绝签署
FailureReasonEnterpriseInfoMismatch: 企业信息不匹配
FailureReasonEnterpriseNotExists: 企业不存在
FailureReasonEnterpriseStatusAbnormal: 企业状态异常
FailureReasonEsignFlowError: e签宝流程错误
FailureReasonEsignVerificationFailed: e签宝验证失败
FailureReasonInvalidDocument: 证件信息无效
FailureReasonLegalPersonMismatch: 法定代表人信息不匹配
FailureReasonNetworkError: 网络错误
FailureReasonSignProcessFailed: 签署流程失败
FailureReasonSystemError: 系统错误
FailureReasonTimeout: 操作超时
FailureReasonUnknownError: 未知错误
x-enum-varnames:
- FailureReasonEnterpriseNotExists
- FailureReasonEnterpriseInfoMismatch
- FailureReasonEnterpriseStatusAbnormal
- FailureReasonLegalPersonMismatch
- FailureReasonEsignVerificationFailed
- FailureReasonInvalidDocument
- FailureReasonContractRejectedByUser
- FailureReasonContractExpired
- FailureReasonSignProcessFailed
- FailureReasonContractGenFailed
- FailureReasonEsignFlowError
- FailureReasonSystemError
- FailureReasonNetworkError
- FailureReasonTimeout
- FailureReasonUnknownError
responses.CallbackResponse:
2025-07-13 16:36:20 +08:00
properties:
2025-07-28 01:46:39 +08:00
callback_type:
2025-07-13 16:36:20 +08:00
type: string
2025-07-28 01:46:39 +08:00
certification_id:
2025-07-13 16:36:20 +08:00
type: string
2025-07-28 01:46:39 +08:00
message:
2025-07-13 16:36:20 +08:00
type: string
2025-07-28 01:46:39 +08:00
new_status:
$ref: '#/definitions/enums.CertificationStatus'
old_status:
$ref: '#/definitions/enums.CertificationStatus'
processed_at:
2025-07-13 16:36:20 +08:00
type: string
2025-07-28 01:46:39 +08:00
success:
2025-07-13 16:36:20 +08:00
type: boolean
type: object
2025-07-15 13:21:34 +08:00
responses.CategoryInfoResponse:
properties:
code:
type: string
created_at:
type: string
description:
type: string
id:
type: string
is_enabled:
type: boolean
is_visible:
type: boolean
name:
type: string
sort:
type: integer
updated_at:
type: string
type: object
responses.CategoryListResponse:
properties:
items:
items:
$ref: '#/definitions/responses.CategoryInfoResponse'
type: array
page:
type: integer
size:
type: integer
total:
type: integer
type: object
2025-07-20 20:53:26 +08:00
responses.CategorySimpleResponse:
2025-07-13 16:36:20 +08:00
properties:
2025-07-20 20:53:26 +08:00
code:
2025-07-13 16:36:20 +08:00
type: string
id:
type: string
2025-07-20 20:53:26 +08:00
name:
2025-07-13 16:36:20 +08:00
type: string
type: object
2025-07-28 01:46:39 +08:00
responses.CertificationListResponse:
properties:
items:
items:
$ref: '#/definitions/responses.CertificationResponse'
type: array
page:
type: integer
page_size:
type: integer
total:
type: integer
total_pages:
type: integer
type: object
responses.CertificationResponse:
properties:
available_actions:
items:
type: string
type: array
can_retry:
type: boolean
contract_applied_at:
type: string
contract_info:
allOf:
- $ref: '#/definitions/value_objects.ContractInfo'
description: 合同信息
contract_signed_at:
type: string
created_at:
description: 时间戳
type: string
enterprise_info:
allOf:
- $ref: '#/definitions/value_objects.EnterpriseInfo'
description: 企业信息
enterprise_verified_at:
type: string
failure_message:
type: string
failure_reason:
allOf:
- $ref: '#/definitions/enums.FailureReason'
description: 失败信息
failure_reason_name:
type: string
id:
type: string
info_submitted_at:
type: string
is_completed:
description: 业务状态
type: boolean
is_failed:
type: boolean
is_user_action_required:
type: boolean
metadata:
additionalProperties: true
description: 元数据
type: object
next_action:
description: 用户操作提示
type: string
progress:
type: integer
retry_count:
type: integer
status:
$ref: '#/definitions/enums.CertificationStatus'
status_name:
type: string
updated_at:
type: string
user_id:
type: string
type: object
responses.ContractSignUrlResponse:
properties:
certification_id:
type: string
contract_sign_url:
type: string
contract_url:
type: string
expire_at:
type: string
message:
type: string
next_action:
type: string
type: object
responses.EnterpriseInfoResponse:
description: 企业信息响应
properties:
certified_at:
example: "2024-01-01T00:00:00Z"
type: string
company_name:
example: 示例企业有限公司
type: string
created_at:
example: "2024-01-01T00:00:00Z"
type: string
id:
example: 123e4567-e89b-12d3-a456-426614174000
type: string
is_certified:
example: false
type: boolean
is_face_verified:
example: false
type: boolean
is_ocr_verified:
example: false
type: boolean
legal_person_id:
example: "110101199001011234"
type: string
legal_person_name:
example: 张三
type: string
unified_social_code:
example: 91110000123456789X
type: string
updated_at:
example: "2024-01-01T00:00:00Z"
type: string
type: object
2025-07-13 16:36:20 +08:00
responses.LoginUserResponse:
description: 用户登录成功响应
properties:
access_token:
example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
type: string
expires_in:
example: 86400
type: integer
login_method:
example: password
type: string
token_type:
example: Bearer
type: string
user:
$ref: '#/definitions/responses.UserProfileResponse'
type: object
2025-07-15 13:21:34 +08:00
responses.ProductInfoResponse:
properties:
category:
allOf:
- $ref: '#/definitions/responses.CategoryInfoResponse'
description: 关联信息
category_id:
type: string
code:
type: string
content:
type: string
created_at:
type: string
description:
type: string
id:
type: string
is_enabled:
type: boolean
is_package:
type: boolean
is_visible:
type: boolean
name:
type: string
price:
type: number
seo_description:
type: string
seo_keywords:
type: string
seo_title:
description: SEO信息
type: string
updated_at:
type: string
type: object
responses.ProductListResponse:
properties:
items:
items:
$ref: '#/definitions/responses.ProductInfoResponse'
type: array
page:
type: integer
size:
type: integer
total:
type: integer
type: object
responses.ProductSimpleResponse:
properties:
2025-07-20 20:53:26 +08:00
category:
$ref: '#/definitions/responses.CategorySimpleResponse'
2025-07-15 13:21:34 +08:00
code:
type: string
description:
type: string
id:
type: string
is_package:
type: boolean
name:
type: string
price:
type: number
type: object
responses.ProductStatsResponse:
properties:
enabled_products:
type: integer
package_products:
type: integer
total_products:
type: integer
visible_products:
type: integer
type: object
2025-07-13 16:36:20 +08:00
responses.RegisterUserResponse:
description: 用户注册成功响应
properties:
id:
example: 123e4567-e89b-12d3-a456-426614174000
type: string
phone:
example: "13800138000"
type: string
type: object
2025-07-15 13:21:34 +08:00
responses.SubscriptionInfoResponse:
properties:
api_used:
type: integer
created_at:
type: string
id:
type: string
price:
type: number
product:
allOf:
- $ref: '#/definitions/responses.ProductSimpleResponse'
description: 关联信息
product_id:
type: string
updated_at:
type: string
user_id:
type: string
type: object
responses.SubscriptionListResponse:
properties:
items:
items:
$ref: '#/definitions/responses.SubscriptionInfoResponse'
type: array
page:
type: integer
size:
type: integer
total:
type: integer
type: object
responses.SubscriptionStatsResponse:
properties:
total_revenue:
type: number
total_subscriptions:
type: integer
type: object
responses.SubscriptionUsageResponse:
properties:
api_used:
type: integer
id:
type: string
product_id:
type: string
type: object
2025-07-13 16:36:20 +08:00
responses.TransactionResponse:
properties:
amount:
type: number
created_at:
type: string
from_balance:
type: number
from_user_id:
type: string
notes:
type: string
to_balance:
type: number
to_user_id:
type: string
transaction_id:
type: string
type: object
responses.UserProfileResponse:
description: 用户基本信息
2025-07-02 16:17:59 +08:00
properties:
created_at:
example: "2024-01-01T00:00:00Z"
type: string
2025-07-13 16:36:20 +08:00
enterprise_info:
2025-07-28 01:46:39 +08:00
$ref: '#/definitions/responses.EnterpriseInfoResponse'
2025-07-02 16:17:59 +08:00
id:
example: 123e4567-e89b-12d3-a456-426614174000
type: string
2025-07-20 20:53:26 +08:00
is_active:
example: true
type: boolean
2025-07-15 13:21:34 +08:00
is_certified:
example: false
type: boolean
2025-07-20 20:53:26 +08:00
last_login_at:
example: "2024-01-01T00:00:00Z"
type: string
login_count:
example: 10
type: integer
permissions:
example:
- '[''user:read'''
- '''user:write'']'
items:
type: string
type: array
2025-07-02 16:17:59 +08:00
phone:
example: "13800138000"
type: string
updated_at:
example: "2024-01-01T00:00:00Z"
type: string
2025-07-20 20:53:26 +08:00
user_type:
example: user
type: string
username:
example: admin
type: string
2025-07-02 16:17:59 +08:00
type: object
2025-07-13 16:36:20 +08:00
responses.UserSecretsResponse:
properties:
access_id:
type: string
access_key:
type: string
created_at:
type: string
expires_at:
type: string
id:
type: string
is_active:
type: boolean
last_used_at:
type: string
updated_at:
type: string
user_id:
type: string
type: object
responses.WalletResponse:
properties:
balance:
type: number
created_at:
type: string
id:
type: string
is_active:
type: boolean
updated_at:
type: string
user_id:
type: string
type: object
responses.WalletStatsResponse:
properties:
active_wallets:
type: integer
today_transactions:
type: integer
today_volume:
type: number
total_balance:
type: number
total_wallets:
type: integer
type: object
2025-07-28 01:46:39 +08:00
value_objects.ContractInfo:
properties:
contract_file_id:
description: 合同基本信息
type: string
contract_sign_url:
description: 合同签署链接
type: string
contract_title:
description: 合同元数据
type: string
contract_url:
description: 合同文件访问链接
type: string
contract_version:
description: 合同版本
type: string
esign_flow_id:
description: e签宝签署流程ID
type: string
expires_at:
description: 签署链接过期时间
type: string
generated_at:
description: 时间信息
type: string
metadata:
additionalProperties: true
description: 附加信息
type: object
sign_flow_created_at:
description: 签署流程创建时间
type: string
sign_progress:
description: 签署进度
type: integer
signed_at:
description: 签署完成时间
type: string
signer_account:
description: 签署相关信息
type: string
signer_name:
description: 签署人姓名
type: string
status:
description: 状态信息
type: string
template_id:
description: 模板ID
type: string
transactor_id_card_num:
description: 经办人身份证号
type: string
transactor_name:
description: 经办人姓名
type: string
transactor_phone:
description: 经办人手机号
type: string
type: object
value_objects.EnterpriseInfo:
properties:
business_scope:
description: 经营范围
type: string
company_name:
description: 企业基本信息
type: string
establishment_date:
description: 成立日期
type: string
legal_person_id:
description: 法定代表人身份证号
type: string
legal_person_name:
description: 法定代表人信息
type: string
legal_person_phone:
description: 法定代表人手机号
type: string
registered_address:
description: 企业详细信息
type: string
registered_capital:
description: 注册资本
type: string
unified_social_code:
description: 统一社会信用代码
type: string
type: object
2025-07-02 16:17:59 +08:00
host: localhost:8080
info:
contact:
email: support@example.com
name: API Support
url: https://github.com/your-org/tyapi-server-gin
description: |-
基于DDD和Clean Architecture的企业级后端API服务
采用Gin框架构建支持用户管理、JWT认证、事件驱动等功能
license:
name: Apache 2.0
url: http://www.apache.org/licenses/LICENSE-2.0.html
title: TYAPI Server API
version: "1.0"
paths:
2025-07-20 20:53:26 +08:00
/api/v1/admin/product-categories:
get:
consumes:
- application/json
description: 管理员获取产品分类列表
parameters:
- default: 1
description: 页码
in: query
name: page
type: integer
- default: 10
description: 每页数量
in: query
name: page_size
type: integer
produces:
- application/json
responses:
"200":
description: 获取分类列表成功
schema:
$ref: '#/definitions/responses.CategoryListResponse'
"400":
description: 请求参数错误
schema:
additionalProperties: true
type: object
"401":
description: 未认证
schema:
additionalProperties: true
type: object
"500":
description: 服务器内部错误
schema:
additionalProperties: true
type: object
security:
- Bearer: []
summary: 获取分类列表
tags:
- 分类管理
post:
consumes:
- application/json
description: 管理员创建新产品分类
parameters:
- description: 创建分类请求
in: body
name: request
required: true
schema:
$ref: '#/definitions/commands.CreateCategoryCommand'
produces:
- application/json
responses:
"201":
description: 分类创建成功
schema:
additionalProperties: true
type: object
"400":
description: 请求参数错误
schema:
additionalProperties: true
type: object
"401":
description: 未认证
schema:
additionalProperties: true
type: object
"500":
description: 服务器内部错误
schema:
additionalProperties: true
type: object
security:
- Bearer: []
summary: 创建分类
tags:
- 分类管理
/api/v1/admin/product-categories/{id}:
delete:
consumes:
- application/json
description: 管理员删除产品分类
parameters:
- description: 分类ID
in: path
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: 分类删除成功
schema:
additionalProperties: true
type: object
"400":
description: 请求参数错误
schema:
additionalProperties: true
type: object
"401":
description: 未认证
schema:
additionalProperties: true
type: object
"404":
description: 分类不存在
schema:
additionalProperties: true
type: object
"500":
description: 服务器内部错误
schema:
additionalProperties: true
type: object
security:
- Bearer: []
summary: 删除分类
tags:
- 分类管理
get:
consumes:
- application/json
description: 管理员获取分类详细信息
parameters:
- description: 分类ID
in: path
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: 获取分类详情成功
schema:
$ref: '#/definitions/responses.CategoryInfoResponse'
"400":
description: 请求参数错误
schema:
additionalProperties: true
type: object
"401":
description: 未认证
schema:
additionalProperties: true
type: object
"404":
description: 分类不存在
schema:
additionalProperties: true
type: object
"500":
description: 服务器内部错误
schema:
additionalProperties: true
type: object
security:
- Bearer: []
summary: 获取分类详情
tags:
- 分类管理
put:
consumes:
- application/json
description: 管理员更新产品分类信息
parameters:
- description: 分类ID
in: path
name: id
required: true
type: string
- description: 更新分类请求
in: body
name: request
required: true
schema:
$ref: '#/definitions/commands.UpdateCategoryCommand'
produces:
- application/json
responses:
"200":
description: 分类更新成功
schema:
additionalProperties: true
type: object
"400":
description: 请求参数错误
schema:
additionalProperties: true
type: object
"401":
description: 未认证
schema:
additionalProperties: true
type: object
"404":
description: 分类不存在
schema:
additionalProperties: true
type: object
"500":
description: 服务器内部错误
schema:
additionalProperties: true
type: object
security:
- Bearer: []
summary: 更新分类
tags:
- 分类管理
/api/v1/admin/products:
2025-07-13 16:36:20 +08:00
get:
consumes:
- application/json
2025-07-20 20:53:26 +08:00
description: 管理员获取产品列表,支持筛选
2025-07-13 16:36:20 +08:00
parameters:
- default: 1
description: 页码
in: query
name: page
type: integer
- default: 10
description: 每页数量
in: query
2025-07-20 20:53:26 +08:00
name: page_size
2025-07-13 16:36:20 +08:00
type: integer
- description: 搜索关键词
in: query
name: keyword
type: string
2025-07-20 20:53:26 +08:00
- description: 分类ID
in: query
name: category_id
type: string
- description: 产品状态
2025-07-13 16:36:20 +08:00
in: query
name: status
type: string
produces:
- application/json
responses:
"200":
2025-07-20 20:53:26 +08:00
description: 获取产品列表成功
2025-07-13 16:36:20 +08:00
schema:
2025-07-20 20:53:26 +08:00
$ref: '#/definitions/responses.ProductListResponse'
2025-07-13 16:36:20 +08:00
"400":
description: 请求参数错误
schema:
additionalProperties: true
type: object
"401":
description: 未认证
schema:
additionalProperties: true
type: object
"500":
description: 服务器内部错误
schema:
additionalProperties: true
type: object
security:
- Bearer: []
2025-07-20 20:53:26 +08:00
summary: 获取产品列表
2025-07-13 16:36:20 +08:00
tags:
2025-07-20 20:53:26 +08:00
- 产品管理
2025-07-13 16:36:20 +08:00
post:
consumes:
- application/json
2025-07-20 20:53:26 +08:00
description: 管理员创建新产品
2025-07-13 16:36:20 +08:00
parameters:
2025-07-20 20:53:26 +08:00
- description: 创建产品请求
2025-07-13 16:36:20 +08:00
in: body
name: request
required: true
schema:
2025-07-20 20:53:26 +08:00
$ref: '#/definitions/commands.CreateProductCommand'
2025-07-13 16:36:20 +08:00
produces:
- application/json
responses:
"201":
2025-07-20 20:53:26 +08:00
description: 产品创建成功
2025-07-13 16:36:20 +08:00
schema:
additionalProperties: true
type: object
"400":
description: 请求参数错误
schema:
additionalProperties: true
type: object
"401":
description: 未认证
schema:
additionalProperties: true
type: object
"500":
description: 服务器内部错误
schema:
additionalProperties: true
type: object
security:
- Bearer: []
2025-07-20 20:53:26 +08:00
summary: 创建产品
2025-07-13 16:36:20 +08:00
tags:
2025-07-20 20:53:26 +08:00
- 产品管理
/api/v1/admin/products/{id}:
2025-07-13 16:36:20 +08:00
delete:
consumes:
- application/json
2025-07-20 20:53:26 +08:00
description: 管理员删除产品
2025-07-13 16:36:20 +08:00
parameters:
2025-07-20 20:53:26 +08:00
- description: 产品ID
2025-07-13 16:36:20 +08:00
in: path
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
2025-07-20 20:53:26 +08:00
description: 产品删除成功
2025-07-13 16:36:20 +08:00
schema:
additionalProperties: true
type: object
"400":
description: 请求参数错误
schema:
additionalProperties: true
type: object
"401":
description: 未认证
schema:
additionalProperties: true
type: object
"404":
2025-07-20 20:53:26 +08:00
description: 产品不存在
2025-07-13 16:36:20 +08:00
schema:
additionalProperties: true
type: object
"500":
description: 服务器内部错误
schema:
additionalProperties: true
type: object
security:
- Bearer: []
2025-07-20 20:53:26 +08:00
summary: 删除产品
2025-07-13 16:36:20 +08:00
tags:
2025-07-20 20:53:26 +08:00
- 产品管理
2025-07-13 16:36:20 +08:00
get:
consumes:
- application/json
2025-07-20 20:53:26 +08:00
description: 管理员获取产品详细信息
2025-07-13 16:36:20 +08:00
parameters:
2025-07-20 20:53:26 +08:00
- description: 产品ID
2025-07-13 16:36:20 +08:00
in: path
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
2025-07-20 20:53:26 +08:00
description: 获取产品详情成功
2025-07-13 16:36:20 +08:00
schema:
2025-07-20 20:53:26 +08:00
$ref: '#/definitions/responses.ProductInfoResponse'
2025-07-13 16:36:20 +08:00
"400":
description: 请求参数错误
schema:
additionalProperties: true
type: object
"401":
description: 未认证
schema:
additionalProperties: true
type: object
"404":
2025-07-20 20:53:26 +08:00
description: 产品不存在
2025-07-13 16:36:20 +08:00
schema:
additionalProperties: true
type: object
"500":
description: 服务器内部错误
schema:
additionalProperties: true
type: object
security:
- Bearer: []
2025-07-20 20:53:26 +08:00
summary: 获取产品详情
2025-07-13 16:36:20 +08:00
tags:
2025-07-20 20:53:26 +08:00
- 产品管理
2025-07-13 16:36:20 +08:00
put:
consumes:
- application/json
2025-07-20 20:53:26 +08:00
description: 管理员更新产品信息
2025-07-13 16:36:20 +08:00
parameters:
2025-07-20 20:53:26 +08:00
- description: 产品ID
2025-07-13 16:36:20 +08:00
in: path
name: id
required: true
type: string
2025-07-20 20:53:26 +08:00
- description: 更新产品请求
2025-07-13 16:36:20 +08:00
in: body
name: request
required: true
schema:
2025-07-20 20:53:26 +08:00
$ref: '#/definitions/commands.UpdateProductCommand'
2025-07-13 16:36:20 +08:00
produces:
- application/json
responses:
"200":
2025-07-20 20:53:26 +08:00
description: 产品更新成功
2025-07-13 16:36:20 +08:00
schema:
additionalProperties: true
type: object
"400":
description: 请求参数错误
schema:
additionalProperties: true
type: object
"401":
description: 未认证
schema:
additionalProperties: true
type: object
"404":
2025-07-20 20:53:26 +08:00
description: 产品不存在
2025-07-13 16:36:20 +08:00
schema:
additionalProperties: true
type: object
"500":
description: 服务器内部错误
schema:
additionalProperties: true
type: object
security:
- Bearer: []
2025-07-20 20:53:26 +08:00
summary: 更新产品
2025-07-13 16:36:20 +08:00
tags:
2025-07-20 20:53:26 +08:00
- 产品管理
/api/v1/admin/subscriptions:
get:
2025-07-13 16:36:20 +08:00
consumes:
- application/json
2025-07-20 20:53:26 +08:00
description: 管理员获取订阅列表
2025-07-13 16:36:20 +08:00
parameters:
2025-07-20 20:53:26 +08:00
- default: 1
description: 页码
in: query
name: page
type: integer
- default: 10
description: 每页数量
in: query
name: page_size
type: integer
- description: 订阅状态
in: query
name: status
type: string
2025-07-13 16:36:20 +08:00
produces:
- application/json
responses:
"200":
2025-07-20 20:53:26 +08:00
description: 获取订阅列表成功
2025-07-13 16:36:20 +08:00
schema:
2025-07-20 20:53:26 +08:00
$ref: '#/definitions/responses.SubscriptionListResponse'
2025-07-13 16:36:20 +08:00
"400":
description: 请求参数错误
schema:
additionalProperties: true
type: object
"401":
2025-07-20 20:53:26 +08:00
description: 未认证
2025-07-13 16:36:20 +08:00
schema:
additionalProperties: true
type: object
"500":
description: 服务器内部错误
schema:
additionalProperties: true
type: object
2025-07-20 20:53:26 +08:00
security:
- Bearer: []
summary: 获取订阅列表
2025-07-13 16:36:20 +08:00
tags:
2025-07-20 20:53:26 +08:00
- 订阅管理
/api/v1/admin/subscriptions/{id}/price:
put:
2025-07-13 16:36:20 +08:00
consumes:
- application/json
2025-07-20 20:53:26 +08:00
description: 管理员修改用户订阅价格
2025-07-13 16:36:20 +08:00
parameters:
2025-07-20 20:53:26 +08:00
- description: 订阅ID
in: path
name: id
required: true
type: string
- description: 更新订阅价格请求
2025-07-13 16:36:20 +08:00
in: body
name: request
required: true
schema:
2025-07-20 20:53:26 +08:00
$ref: '#/definitions/commands.UpdateSubscriptionPriceCommand'
2025-07-13 16:36:20 +08:00
produces:
- application/json
responses:
"200":
2025-07-20 20:53:26 +08:00
description: 订阅价格更新成功
2025-07-13 16:36:20 +08:00
schema:
additionalProperties: true
type: object
"400":
description: 请求参数错误
schema:
additionalProperties: true
type: object
"401":
description: 未认证
schema:
additionalProperties: true
type: object
2025-07-20 20:53:26 +08:00
"404":
description: 订阅不存在
schema:
additionalProperties: true
type: object
2025-07-13 16:36:20 +08:00
"500":
description: 服务器内部错误
schema:
additionalProperties: true
type: object
security:
- Bearer: []
2025-07-20 20:53:26 +08:00
summary: 更新订阅价格
2025-07-13 16:36:20 +08:00
tags:
2025-07-20 20:53:26 +08:00
- 订阅管理
/api/v1/admin/subscriptions/stats:
2025-07-13 16:36:20 +08:00
get:
consumes:
- application/json
2025-07-20 20:53:26 +08:00
description: 管理员获取订阅统计信息
2025-07-13 16:36:20 +08:00
produces:
- application/json
responses:
"200":
2025-07-20 20:53:26 +08:00
description: 获取订阅统计成功
2025-07-13 16:36:20 +08:00
schema:
2025-07-20 20:53:26 +08:00
$ref: '#/definitions/responses.SubscriptionStatsResponse'
2025-07-13 16:36:20 +08:00
"401":
description: 未认证
schema:
additionalProperties: true
type: object
"500":
description: 服务器内部错误
schema:
additionalProperties: true
type: object
security:
- Bearer: []
2025-07-20 20:53:26 +08:00
summary: 获取订阅统计
2025-07-13 16:36:20 +08:00
tags:
2025-07-20 20:53:26 +08:00
- 订阅管理
2025-07-15 13:21:34 +08:00
/api/v1/categories:
get:
consumes:
- application/json
2025-07-20 20:53:26 +08:00
description: 获取产品分类列表,支持筛选
2025-07-15 13:21:34 +08:00
parameters:
2025-07-20 20:53:26 +08:00
- default: 1
description: 页码
2025-07-15 13:21:34 +08:00
in: query
2025-07-20 20:53:26 +08:00
name: page
type: integer
- default: 10
description: 每页数量
2025-07-15 13:21:34 +08:00
in: query
2025-07-20 20:53:26 +08:00
name: page_size
2025-07-15 13:21:34 +08:00
type: integer
2025-07-20 20:53:26 +08:00
- description: 是否启用
in: query
name: is_enabled
type: boolean
- description: 是否可见
in: query
name: is_visible
type: boolean
2025-07-15 13:21:34 +08:00
produces:
- application/json
responses:
"200":
description: 获取分类列表成功
schema:
$ref: '#/definitions/responses.CategoryListResponse'
"500":
description: 服务器内部错误
schema:
additionalProperties: true
type: object
summary: 获取分类列表
tags:
- 数据大厅
/api/v1/categories/{id}:
get:
consumes:
- application/json
description: 根据分类ID获取分类详细信息
parameters:
- description: 分类ID
in: path
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: 获取分类详情成功
schema:
$ref: '#/definitions/responses.CategoryInfoResponse'
"400":
description: 请求参数错误
schema:
additionalProperties: true
type: object
"404":
description: 分类不存在
schema:
additionalProperties: true
type: object
"500":
description: 服务器内部错误
schema:
additionalProperties: true
type: object
summary: 获取分类详情
tags:
- 数据大厅
2025-07-28 01:46:39 +08:00
/api/v1/certifications:
get:
2025-07-13 16:36:20 +08:00
consumes:
- application/json
2025-07-28 01:46:39 +08:00
description: 管理员获取认证申请列表
parameters:
- default: 1
description: 页码
in: query
name: page
type: integer
- default: 10
description: 每页数量
in: query
name: page_size
type: integer
- description: 排序字段
in: query
name: sort_by
type: string
- description: 排序方向
enum:
- asc
- desc
in: query
name: sort_order
type: string
- description: 认证状态
in: query
name: status
type: string
- description: 用户ID
in: query
name: user_id
type: string
- description: 公司名称
in: query
name: company_name
type: string
- description: 法人姓名
in: query
name: legal_person_name
type: string
- description: 搜索关键词
in: query
name: search_keyword
type: string
2025-07-13 16:36:20 +08:00
produces:
- application/json
responses:
"200":
2025-07-28 01:46:39 +08:00
description: 获取认证列表成功
2025-07-13 16:36:20 +08:00
schema:
2025-07-28 01:46:39 +08:00
$ref: '#/definitions/responses.CertificationListResponse'
"401":
description: 未认证
2025-07-13 16:36:20 +08:00
schema:
additionalProperties: true
type: object
2025-07-28 01:46:39 +08:00
"403":
description: 权限不足
2025-07-13 16:36:20 +08:00
schema:
additionalProperties: true
type: object
"500":
description: 服务器内部错误
schema:
additionalProperties: true
type: object
security:
- Bearer: []
2025-07-28 01:46:39 +08:00
summary: 获取认证列表
2025-07-13 16:36:20 +08:00
tags:
2025-07-28 01:46:39 +08:00
- 认证管理
/api/v1/certifications/apply-contract:
2025-07-20 20:53:26 +08:00
post:
2025-07-13 16:36:20 +08:00
consumes:
- application/json
2025-07-28 01:46:39 +08:00
description: 申请企业认证合同签署
2025-07-20 20:53:26 +08:00
parameters:
2025-07-28 01:46:39 +08:00
- description: 申请合同请求
2025-07-20 20:53:26 +08:00
in: body
name: request
required: true
schema:
2025-07-28 01:46:39 +08:00
$ref: '#/definitions/commands.ApplyContractCommand'
2025-07-13 16:36:20 +08:00
produces:
- application/json
responses:
"200":
2025-07-28 01:46:39 +08:00
description: 合同申请成功
2025-07-13 16:36:20 +08:00
schema:
2025-07-28 01:46:39 +08:00
$ref: '#/definitions/responses.ContractSignUrlResponse'
2025-07-20 20:53:26 +08:00
"400":
2025-07-28 01:46:39 +08:00
description: 请求参数错误
2025-07-13 16:36:20 +08:00
schema:
additionalProperties: true
type: object
2025-07-20 20:53:26 +08:00
"401":
2025-07-28 01:46:39 +08:00
description: 未认证
2025-07-13 16:36:20 +08:00
schema:
additionalProperties: true
type: object
2025-07-28 01:46:39 +08:00
"404":
description: 认证记录不存在
2025-07-13 16:36:20 +08:00
schema:
additionalProperties: true
type: object
"500":
description: 服务器内部错误
schema:
additionalProperties: true
type: object
security:
- Bearer: []
2025-07-28 01:46:39 +08:00
summary: 申请合同签署
2025-07-13 16:36:20 +08:00
tags:
2025-07-28 01:46:39 +08:00
- 认证管理
/api/v1/certifications/callbacks:
post:
2025-07-13 16:36:20 +08:00
consumes:
- application/json
2025-07-28 01:46:39 +08:00
description: 处理e签宝的企业认证和合同签署回调
parameters:
- description: e签宝回调数据
in: body
name: request
required: true
schema:
$ref: '#/definitions/commands.EsignCallbackCommand'
2025-07-13 16:36:20 +08:00
produces:
- application/json
responses:
"200":
2025-07-28 01:46:39 +08:00
description: 回调处理成功
2025-07-13 16:36:20 +08:00
schema:
2025-07-28 01:46:39 +08:00
$ref: '#/definitions/responses.CallbackResponse'
2025-07-13 16:36:20 +08:00
"400":
2025-07-28 01:46:39 +08:00
description: 请求参数错误
2025-07-13 16:36:20 +08:00
schema:
additionalProperties: true
type: object
"500":
description: 服务器内部错误
schema:
additionalProperties: true
type: object
2025-07-28 01:46:39 +08:00
summary: 处理e签宝回调
2025-07-13 16:36:20 +08:00
tags:
2025-07-28 01:46:39 +08:00
- 认证管理
/api/v1/certifications/details:
2025-07-13 16:36:20 +08:00
get:
consumes:
- application/json
2025-07-28 01:46:39 +08:00
description: 根据认证ID获取认证详情
2025-07-13 16:36:20 +08:00
produces:
- application/json
responses:
"200":
2025-07-20 20:53:26 +08:00
description: 获取认证详情成功
2025-07-13 16:36:20 +08:00
schema:
2025-07-28 01:46:39 +08:00
$ref: '#/definitions/responses.CertificationResponse'
2025-07-13 16:36:20 +08:00
"400":
2025-07-28 01:46:39 +08:00
description: 请求参数错误
2025-07-13 16:36:20 +08:00
schema:
additionalProperties: true
type: object
"401":
2025-07-28 01:46:39 +08:00
description: 未认证
2025-07-13 16:36:20 +08:00
schema:
additionalProperties: true
type: object
2025-07-28 01:46:39 +08:00
"404":
description: 认证记录不存在
2025-07-13 16:36:20 +08:00
schema:
additionalProperties: true
type: object
"500":
description: 服务器内部错误
schema:
additionalProperties: true
type: object
security:
- Bearer: []
2025-07-28 01:46:39 +08:00
summary: 获取认证详情
2025-07-13 16:36:20 +08:00
tags:
2025-07-28 01:46:39 +08:00
- 认证管理
/api/v1/certifications/enterprise-info:
2025-07-13 16:36:20 +08:00
post:
consumes:
2025-07-20 20:53:26 +08:00
- application/json
2025-07-28 01:46:39 +08:00
description: 提交企业认证所需的企业信息
2025-07-13 16:36:20 +08:00
parameters:
2025-07-28 01:46:39 +08:00
- description: 提交企业信息请求
2025-07-20 20:53:26 +08:00
in: body
name: request
2025-07-13 16:36:20 +08:00
required: true
2025-07-20 20:53:26 +08:00
schema:
$ref: '#/definitions/commands.SubmitEnterpriseInfoCommand'
2025-07-13 16:36:20 +08:00
produces:
- application/json
responses:
"200":
2025-07-20 20:53:26 +08:00
description: 企业信息提交成功
2025-07-13 16:36:20 +08:00
schema:
2025-07-28 01:46:39 +08:00
$ref: '#/definitions/responses.CertificationResponse'
2025-07-13 16:36:20 +08:00
"400":
2025-07-28 01:46:39 +08:00
description: 请求参数错误
2025-07-13 16:36:20 +08:00
schema:
additionalProperties: true
type: object
"401":
2025-07-28 01:46:39 +08:00
description: 未认证
schema:
additionalProperties: true
type: object
"404":
description: 认证记录不存在
2025-07-13 16:36:20 +08:00
schema:
additionalProperties: true
type: object
"500":
description: 服务器内部错误
schema:
additionalProperties: true
type: object
security:
- Bearer: []
2025-07-20 20:53:26 +08:00
summary: 提交企业信息
2025-07-13 16:36:20 +08:00
tags:
2025-07-28 01:46:39 +08:00
- 认证管理
2025-07-13 16:36:20 +08:00
/api/v1/finance/secrets:
get:
consumes:
- application/json
description: 获取当前用户的API访问密钥信息
produces:
- application/json
responses:
"200":
description: 获取用户密钥成功
schema:
$ref: '#/definitions/responses.UserSecretsResponse'
"401":
description: 未认证
schema:
additionalProperties: true
type: object
"404":
description: 密钥不存在
schema:
additionalProperties: true
type: object
"500":
description: 服务器内部错误
schema:
additionalProperties: true
type: object
security:
- Bearer: []
summary: 获取用户密钥
tags:
- 用户密钥管理
post:
consumes:
- application/json
description: 为用户创建API访问密钥
parameters:
- description: 创建密钥请求
in: body
name: request
required: true
schema:
$ref: '#/definitions/commands.CreateUserSecretsCommand'
produces:
- application/json
responses:
"201":
description: 用户密钥创建成功
schema:
$ref: '#/definitions/responses.UserSecretsResponse'
"400":
description: 请求参数错误
schema:
additionalProperties: true
type: object
"401":
description: 未认证
schema:
additionalProperties: true
type: object
"409":
description: 密钥已存在
schema:
additionalProperties: true
type: object
"500":
description: 服务器内部错误
schema:
additionalProperties: true
type: object
security:
- Bearer: []
summary: 创建用户密钥
tags:
- 用户密钥管理
/api/v1/finance/secrets/deactivate:
post:
consumes:
- application/json
description: 停用用户的API访问密钥
produces:
- application/json
responses:
"200":
description: 用户密钥停用成功
schema:
additionalProperties: true
type: object
"401":
description: 未认证
schema:
additionalProperties: true
type: object
"404":
description: 密钥不存在
schema:
additionalProperties: true
type: object
"500":
description: 服务器内部错误
schema:
additionalProperties: true
type: object
security:
- Bearer: []
summary: 停用用户密钥
tags:
- 用户密钥管理
/api/v1/finance/secrets/regenerate:
post:
consumes:
- application/json
description: 重新生成用户的API访问密钥
produces:
- application/json
responses:
"200":
description: 访问密钥重新生成成功
schema:
$ref: '#/definitions/responses.UserSecretsResponse'
"401":
description: 未认证
schema:
additionalProperties: true
type: object
"404":
description: 密钥不存在
schema:
additionalProperties: true
type: object
"500":
description: 服务器内部错误
schema:
additionalProperties: true
type: object
security:
- Bearer: []
summary: 重新生成访问密钥
tags:
- 用户密钥管理
/api/v1/finance/wallet:
get:
consumes:
- application/json
description: 获取当前用户的钱包详细信息
produces:
- application/json
responses:
"200":
description: 获取钱包信息成功
schema:
$ref: '#/definitions/responses.WalletResponse'
"401":
description: 未认证
schema:
additionalProperties: true
type: object
"404":
description: 钱包不存在
schema:
additionalProperties: true
type: object
"500":
description: 服务器内部错误
schema:
additionalProperties: true
type: object
security:
- Bearer: []
summary: 获取钱包信息
tags:
- 钱包管理
post:
consumes:
- application/json
description: 为用户创建新的钱包账户
parameters:
- description: 创建钱包请求
in: body
name: request
required: true
schema:
$ref: '#/definitions/commands.CreateWalletCommand'
produces:
- application/json
responses:
"201":
description: 钱包创建成功
schema:
$ref: '#/definitions/responses.WalletResponse'
"400":
description: 请求参数错误
schema:
additionalProperties: true
type: object
"409":
description: 钱包已存在
schema:
additionalProperties: true
type: object
"500":
description: 服务器内部错误
schema:
additionalProperties: true
type: object
summary: 创建钱包
tags:
- 钱包管理
put:
consumes:
- application/json
description: 更新当前用户的钱包基本信息
parameters:
- description: 更新钱包请求
in: body
name: request
required: true
schema:
$ref: '#/definitions/commands.UpdateWalletCommand'
produces:
- application/json
responses:
"200":
description: 钱包更新成功
schema:
additionalProperties: true
type: object
"400":
description: 请求参数错误
schema:
additionalProperties: true
type: object
"401":
description: 未认证
schema:
additionalProperties: true
type: object
"500":
description: 服务器内部错误
schema:
additionalProperties: true
type: object
security:
- Bearer: []
summary: 更新钱包信息
tags:
- 钱包管理
/api/v1/finance/wallet/recharge:
post:
consumes:
- application/json
description: 为钱包进行充值操作
parameters:
- description: 充值请求
in: body
name: request
required: true
schema:
$ref: '#/definitions/commands.RechargeWalletCommand'
produces:
- application/json
responses:
"200":
description: 充值成功
schema:
$ref: '#/definitions/responses.TransactionResponse'
"400":
description: 请求参数错误
schema:
additionalProperties: true
type: object
"401":
description: 未认证
schema:
additionalProperties: true
type: object
"500":
description: 服务器内部错误
schema:
additionalProperties: true
type: object
security:
- Bearer: []
summary: 钱包充值
tags:
- 钱包管理
/api/v1/finance/wallet/stats:
get:
consumes:
- application/json
description: 获取钱包相关的统计数据
produces:
- application/json
responses:
"200":
description: 获取钱包统计成功
schema:
$ref: '#/definitions/responses.WalletStatsResponse'
"401":
description: 未认证
schema:
additionalProperties: true
type: object
"500":
description: 服务器内部错误
schema:
additionalProperties: true
type: object
security:
- Bearer: []
summary: 获取钱包统计
tags:
- 钱包管理
/api/v1/finance/wallet/transaction:
post:
consumes:
- application/json
description: 执行钱包内部交易操作
parameters:
- description: 交易请求
in: body
name: request
required: true
schema:
$ref: '#/definitions/commands.WalletTransactionCommand'
produces:
- application/json
responses:
"200":
description: 交易成功
schema:
$ref: '#/definitions/responses.TransactionResponse'
"400":
description: 请求参数错误
schema:
additionalProperties: true
type: object
"401":
description: 未认证
schema:
additionalProperties: true
type: object
"500":
description: 服务器内部错误
schema:
additionalProperties: true
type: object
security:
- Bearer: []
summary: 钱包交易
tags:
- 钱包管理
/api/v1/finance/wallet/withdraw:
post:
consumes:
- application/json
description: 从钱包进行提现操作
parameters:
- description: 提现请求
in: body
name: request
required: true
schema:
$ref: '#/definitions/commands.WithdrawWalletCommand'
produces:
- application/json
responses:
"200":
description: 提现申请已提交
schema:
$ref: '#/definitions/responses.TransactionResponse'
"400":
description: 请求参数错误
schema:
additionalProperties: true
type: object
"401":
description: 未认证
schema:
additionalProperties: true
type: object
"500":
description: 服务器内部错误
schema:
additionalProperties: true
type: object
security:
- Bearer: []
summary: 钱包提现
tags:
- 钱包管理
2025-07-15 13:21:34 +08:00
/api/v1/my/subscriptions:
get:
consumes:
- application/json
description: 获取当前用户的订阅列表
parameters:
- default: 1
description: 页码
in: query
name: page
type: integer
- default: 10
description: 每页数量
in: query
name: page_size
type: integer
- description: 订阅状态
in: query
name: status
type: string
- description: 排序字段
in: query
name: sort_by
type: string
- description: 排序方向
enum:
- asc
- desc
in: query
name: sort_order
type: string
produces:
- application/json
responses:
"200":
description: 获取订阅列表成功
schema:
$ref: '#/definitions/responses.SubscriptionListResponse'
"400":
description: 请求参数错误
schema:
additionalProperties: true
type: object
"401":
description: 未认证
schema:
additionalProperties: true
type: object
"500":
description: 服务器内部错误
schema:
additionalProperties: true
type: object
security:
- Bearer: []
summary: 获取我的订阅列表
tags:
- 我的订阅
/api/v1/my/subscriptions/{id}:
get:
consumes:
- application/json
description: 获取指定订阅的详细信息
parameters:
- description: 订阅ID
in: path
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: 获取订阅详情成功
schema:
$ref: '#/definitions/responses.SubscriptionInfoResponse'
"400":
description: 请求参数错误
schema:
additionalProperties: true
type: object
"401":
description: 未认证
schema:
additionalProperties: true
type: object
"404":
description: 订阅不存在
schema:
additionalProperties: true
type: object
"500":
description: 服务器内部错误
schema:
additionalProperties: true
type: object
security:
- Bearer: []
summary: 获取我的订阅详情
tags:
- 我的订阅
/api/v1/my/subscriptions/{id}/usage:
get:
consumes:
- application/json
description: 获取指定订阅的使用情况统计
parameters:
- description: 订阅ID
in: path
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: 获取使用情况成功
schema:
$ref: '#/definitions/responses.SubscriptionUsageResponse'
"400":
description: 请求参数错误
schema:
additionalProperties: true
type: object
"401":
description: 未认证
schema:
additionalProperties: true
type: object
"404":
description: 订阅不存在
schema:
additionalProperties: true
type: object
"500":
description: 服务器内部错误
schema:
additionalProperties: true
type: object
security:
- Bearer: []
summary: 获取我的订阅使用情况
tags:
- 我的订阅
/api/v1/my/subscriptions/stats:
get:
consumes:
- application/json
description: 获取当前用户的订阅统计信息
produces:
- application/json
responses:
"200":
description: 获取订阅统计成功
schema:
$ref: '#/definitions/responses.SubscriptionStatsResponse'
"401":
description: 未认证
schema:
additionalProperties: true
type: object
"500":
description: 服务器内部错误
schema:
additionalProperties: true
type: object
security:
- Bearer: []
summary: 获取我的订阅统计
tags:
- 我的订阅
/api/v1/products:
get:
consumes:
- application/json
description: 分页获取可用的产品列表,支持筛选
parameters:
- default: 1
description: 页码
in: query
name: page
type: integer
- default: 10
description: 每页数量
in: query
name: page_size
type: integer
- description: 搜索关键词
in: query
name: keyword
type: string
- description: 分类ID
in: query
name: category_id
type: string
- description: 最低价格
in: query
name: min_price
type: number
- description: 最高价格
in: query
name: max_price
type: number
- description: 是否启用
in: query
name: is_enabled
type: boolean
- description: 是否可见
in: query
name: is_visible
type: boolean
- description: 是否组合包
in: query
name: is_package
type: boolean
- description: 排序字段
in: query
name: sort_by
type: string
- description: 排序方向
enum:
- asc
- desc
in: query
name: sort_order
type: string
produces:
- application/json
responses:
"200":
description: 获取产品列表成功
schema:
$ref: '#/definitions/responses.ProductListResponse'
"400":
description: 请求参数错误
schema:
additionalProperties: true
type: object
"500":
description: 服务器内部错误
schema:
additionalProperties: true
type: object
summary: 获取产品列表
tags:
- 数据大厅
/api/v1/products/{id}:
get:
consumes:
- application/json
description: 根据产品ID获取产品详细信息
parameters:
- description: 产品ID
in: path
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: 获取产品详情成功
schema:
$ref: '#/definitions/responses.ProductInfoResponse'
"400":
description: 请求参数错误
schema:
additionalProperties: true
type: object
"404":
description: 产品不存在
schema:
additionalProperties: true
type: object
"500":
description: 服务器内部错误
schema:
additionalProperties: true
type: object
summary: 获取产品详情
tags:
- 数据大厅
/api/v1/products/{id}/subscribe:
post:
consumes:
- application/json
description: 用户订阅指定产品
parameters:
- description: 产品ID
in: path
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: 订阅成功
schema:
additionalProperties: true
type: object
"400":
description: 请求参数错误
schema:
additionalProperties: true
type: object
"401":
description: 未认证
schema:
additionalProperties: true
type: object
"404":
description: 产品不存在
schema:
additionalProperties: true
type: object
"500":
description: 服务器内部错误
schema:
additionalProperties: true
type: object
security:
- Bearer: []
summary: 订阅产品
tags:
- 数据大厅
/api/v1/products/stats:
get:
consumes:
- application/json
description: 获取产品相关的统计信息
produces:
- application/json
responses:
"200":
description: 获取统计信息成功
schema:
$ref: '#/definitions/responses.ProductStatsResponse'
"500":
description: 服务器内部错误
schema:
additionalProperties: true
type: object
summary: 获取产品统计
tags:
- 数据大厅
2025-07-13 16:36:20 +08:00
/api/v1/users/login-password:
2025-07-02 16:17:59 +08:00
post:
consumes:
- application/json
description: 使用手机号和密码进行用户登录返回JWT令牌
parameters:
- description: 密码登录请求
in: body
name: request
required: true
schema:
2025-07-13 16:36:20 +08:00
$ref: '#/definitions/commands.LoginWithPasswordCommand'
2025-07-02 16:17:59 +08:00
produces:
- application/json
responses:
"200":
description: 登录成功
schema:
2025-07-13 16:36:20 +08:00
$ref: '#/definitions/responses.LoginUserResponse'
2025-07-02 16:17:59 +08:00
"400":
description: 请求参数错误
schema:
additionalProperties: true
type: object
"401":
2025-07-13 16:36:20 +08:00
description: 用户名或密码错误
2025-07-02 16:17:59 +08:00
schema:
additionalProperties: true
type: object
"500":
description: 服务器内部错误
schema:
additionalProperties: true
type: object
summary: 用户密码登录
tags:
- 用户认证
2025-07-13 16:36:20 +08:00
/api/v1/users/login-sms:
2025-07-02 16:17:59 +08:00
post:
consumes:
- application/json
description: 使用手机号和短信验证码进行用户登录返回JWT令牌
parameters:
- description: 短信登录请求
in: body
name: request
required: true
schema:
2025-07-13 16:36:20 +08:00
$ref: '#/definitions/commands.LoginWithSMSCommand'
2025-07-02 16:17:59 +08:00
produces:
- application/json
responses:
"200":
description: 登录成功
schema:
2025-07-13 16:36:20 +08:00
$ref: '#/definitions/responses.LoginUserResponse'
2025-07-02 16:17:59 +08:00
"400":
description: 请求参数错误或验证码无效
schema:
additionalProperties: true
type: object
"401":
description: 认证失败
schema:
additionalProperties: true
type: object
"500":
description: 服务器内部错误
schema:
additionalProperties: true
type: object
summary: 用户短信验证码登录
tags:
- 用户认证
2025-07-13 16:36:20 +08:00
/api/v1/users/me:
2025-07-02 16:17:59 +08:00
get:
consumes:
- application/json
description: 根据JWT令牌获取当前登录用户的详细信息
produces:
- application/json
responses:
"200":
description: 用户信息
schema:
2025-07-13 16:36:20 +08:00
$ref: '#/definitions/responses.UserProfileResponse'
2025-07-02 16:17:59 +08:00
"401":
description: 未认证
schema:
additionalProperties: true
type: object
"404":
description: 用户不存在
schema:
additionalProperties: true
type: object
"500":
description: 服务器内部错误
schema:
additionalProperties: true
type: object
security:
- Bearer: []
summary: 获取当前用户信息
tags:
- 用户管理
2025-07-13 16:36:20 +08:00
/api/v1/users/me/password:
2025-07-02 16:17:59 +08:00
put:
consumes:
- application/json
description: 使用旧密码、新密码确认和验证码修改当前用户的密码
parameters:
- description: 修改密码请求
in: body
name: request
required: true
schema:
2025-07-13 16:36:20 +08:00
$ref: '#/definitions/commands.ChangePasswordCommand'
2025-07-02 16:17:59 +08:00
produces:
- application/json
responses:
"200":
description: 密码修改成功
schema:
additionalProperties: true
type: object
"400":
description: 请求参数错误或验证码无效
schema:
additionalProperties: true
type: object
"401":
description: 未认证
schema:
additionalProperties: true
type: object
"500":
description: 服务器内部错误
schema:
additionalProperties: true
type: object
security:
- Bearer: []
summary: 修改密码
tags:
- 用户管理
2025-07-13 16:36:20 +08:00
/api/v1/users/register:
2025-07-02 16:17:59 +08:00
post:
consumes:
- application/json
description: 使用手机号、密码和验证码进行用户注册,需要确认密码
parameters:
- description: 用户注册请求
in: body
name: request
required: true
schema:
2025-07-13 16:36:20 +08:00
$ref: '#/definitions/commands.RegisterUserCommand'
2025-07-02 16:17:59 +08:00
produces:
- application/json
responses:
"201":
description: 注册成功
schema:
2025-07-13 16:36:20 +08:00
$ref: '#/definitions/responses.RegisterUserResponse'
2025-07-02 16:17:59 +08:00
"400":
description: 请求参数错误或验证码无效
schema:
additionalProperties: true
type: object
"409":
description: 手机号已存在
schema:
additionalProperties: true
type: object
"500":
description: 服务器内部错误
schema:
additionalProperties: true
type: object
summary: 用户注册
tags:
- 用户认证
2025-07-15 13:21:34 +08:00
/api/v1/users/reset-password:
post:
consumes:
- application/json
description: 使用手机号、验证码和新密码重置用户密码(忘记密码时使用)
parameters:
- description: 重置密码请求
in: body
name: request
required: true
schema:
$ref: '#/definitions/commands.ResetPasswordCommand'
produces:
- application/json
responses:
"200":
description: 密码重置成功
schema:
additionalProperties: true
type: object
"400":
description: 请求参数错误或验证码无效
schema:
additionalProperties: true
type: object
"404":
description: 用户不存在
schema:
additionalProperties: true
type: object
"500":
description: 服务器内部错误
schema:
additionalProperties: true
type: object
summary: 重置密码
tags:
- 用户认证
2025-07-13 16:36:20 +08:00
/api/v1/users/send-code:
2025-07-02 16:17:59 +08:00
post:
consumes:
- application/json
description: 向指定手机号发送验证码,支持注册、登录、修改密码等场景
parameters:
- description: 发送验证码请求
in: body
name: request
required: true
schema:
2025-07-13 16:36:20 +08:00
$ref: '#/definitions/commands.SendCodeCommand'
2025-07-02 16:17:59 +08:00
produces:
- application/json
responses:
"200":
description: 验证码发送成功
schema:
2025-07-13 16:36:20 +08:00
additionalProperties: true
type: object
2025-07-02 16:17:59 +08:00
"400":
description: 请求参数错误
schema:
additionalProperties: true
type: object
"429":
description: 请求频率限制
schema:
additionalProperties: true
type: object
"500":
description: 服务器内部错误
schema:
additionalProperties: true
type: object
summary: 发送短信验证码
tags:
- 用户认证
securityDefinitions:
Bearer:
description: Type "Bearer" followed by a space and JWT token.
in: header
name: Authorization
type: apiKey
swagger: "2.0"