feat: 新增全局操作密码功能,将线下充值验证从登录密码改为统一操作密码
Some checks failed
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Has been cancelled
Some checks failed
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Has been cancelled
- 新增 RedisSystemOperationPasswordKey 常量函数(pkg/constants/redis.go) - 新增 operation_password Service(Set/IsSet/Verify,bcrypt 哈希存 Redis) - 新增 SuperAdminHandler 及两个接口: - POST /api/admin/super-admin/operation-password(设置/重置,仅超级管理员) - GET /api/admin/super-admin/operation-password/status(查询是否已设置) - AgentRecharge.OfflinePay 操作密码验证从"查当前用户登录密码"改为"全局操作密码 Verify" - Bootstrap/路由/文档生成器同步注册
This commit is contained in:
@@ -4940,6 +4940,12 @@ components:
|
||||
- threshold
|
||||
- amount
|
||||
type: object
|
||||
DtoOperationPasswordStatusResponse:
|
||||
properties:
|
||||
is_set:
|
||||
description: 操作密码是否已设置
|
||||
type: boolean
|
||||
type: object
|
||||
DtoOrderItemResponse:
|
||||
properties:
|
||||
amount:
|
||||
@@ -6242,6 +6248,20 @@ components:
|
||||
description: 时效值(日期或月数)
|
||||
type: string
|
||||
type: object
|
||||
DtoSetOperationPasswordRequest:
|
||||
properties:
|
||||
confirm_password:
|
||||
description: 确认密码,必须与 password 一致
|
||||
type: string
|
||||
password:
|
||||
description: 新操作密码,长度 6~50 位
|
||||
maxLength: 50
|
||||
minLength: 6
|
||||
type: string
|
||||
required:
|
||||
- password
|
||||
- confirm_password
|
||||
type: object
|
||||
DtoSetSpeedLimitRequest:
|
||||
properties:
|
||||
speed_limit:
|
||||
@@ -21243,6 +21263,101 @@ paths:
|
||||
summary: 获取文件上传预签名 URL
|
||||
tags:
|
||||
- 对象存储
|
||||
/api/admin/super-admin/operation-password:
|
||||
post:
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/DtoSetOperationPasswordRequest'
|
||||
responses:
|
||||
"400":
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ErrorResponse'
|
||||
description: 请求参数错误
|
||||
"401":
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ErrorResponse'
|
||||
description: 未认证或认证已过期
|
||||
"403":
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ErrorResponse'
|
||||
description: 无权访问
|
||||
"500":
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ErrorResponse'
|
||||
description: 服务器内部错误
|
||||
security:
|
||||
- BearerAuth: []
|
||||
summary: 设置/修改全局操作密码
|
||||
tags:
|
||||
- 超级管理员
|
||||
/api/admin/super-admin/operation-password/status:
|
||||
get:
|
||||
responses:
|
||||
"200":
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
properties:
|
||||
code:
|
||||
description: 响应码
|
||||
example: 0
|
||||
type: integer
|
||||
data:
|
||||
$ref: '#/components/schemas/DtoOperationPasswordStatusResponse'
|
||||
msg:
|
||||
description: 响应消息
|
||||
example: success
|
||||
type: string
|
||||
timestamp:
|
||||
description: 时间戳
|
||||
format: date-time
|
||||
type: string
|
||||
required:
|
||||
- code
|
||||
- msg
|
||||
- data
|
||||
- timestamp
|
||||
type: object
|
||||
description: 成功
|
||||
"400":
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ErrorResponse'
|
||||
description: 请求参数错误
|
||||
"401":
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ErrorResponse'
|
||||
description: 未认证或认证已过期
|
||||
"403":
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ErrorResponse'
|
||||
description: 无权访问
|
||||
"500":
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ErrorResponse'
|
||||
description: 服务器内部错误
|
||||
security:
|
||||
- BearerAuth: []
|
||||
summary: 查询操作密码是否已设置
|
||||
tags:
|
||||
- 超级管理员
|
||||
/api/admin/wechat-configs:
|
||||
get:
|
||||
parameters:
|
||||
|
||||
Reference in New Issue
Block a user