Files
junhong_cmp_fiber/configs/config.yaml
huang 18f35f3ef4 feat: 完成B端认证系统和商户管理模块测试补全
主要变更:
- 新增B端认证系统(后台+H5):登录、登出、Token刷新、密码修改
- 完善商户管理和商户账号管理功能
- 补全单元测试(ShopService: 72.5%, ShopAccountService: 79.8%)
- 新增集成测试(商户管理+商户账号管理)
- 归档OpenSpec提案(add-shop-account-management, implement-b-end-auth-system)
- 完善文档(使用指南、API文档、认证架构说明)

测试统计:
- 13个测试套件,37个测试用例,100%通过率
- 平均覆盖率76.2%,达标

OpenSpec验证:通过(strict模式)
2026-01-15 18:15:17 +08:00

113 lines
2.8 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
server:
address: ":3000"
read_timeout: "10s"
write_timeout: "10s"
shutdown_timeout: "30s"
prefork: false
redis:
address: "cxd.whcxd.cn"
password: "cpNbWtAaqgo1YJmbMp3h"
port: 16299
db: 0
pool_size: 10
min_idle_conns: 5
dial_timeout: "5s"
read_timeout: "3s"
write_timeout: "3s"
database:
host: "cxd.whcxd.cn"
port: 16159
user: "erp_pgsql"
password: "erp_2025"
dbname: "junhong_cmp_test"
sslmode: "disable"
max_open_conns: 25
max_idle_conns: 10
conn_max_lifetime: "5m"
queue:
concurrency: 10
queues:
critical: 6
default: 3
low: 1
retry_max: 5
timeout: "10m"
logging:
level: "info"
development: false
app_log:
filename: "logs/app.log"
max_size: 100 # MB
max_backups: 30
max_age: 30 # 天
compress: true
access_log:
filename: "logs/access.log"
max_size: 500 # MB
max_backups: 90
max_age: 90 # 天
compress: true
middleware:
# 认证中间件开关
enable_auth: true
# 限流中间件开关(默认禁用,按需启用)
enable_rate_limiter: false
# 限流器配置
rate_limiter:
# 每个时间窗口允许的最大请求数
# 建议值:
# - 公开 API严格: 60-100
# - 公开 API宽松: 1000-5000
# - 内部 API: 5000-10000
max: 100
# 时间窗口(限流重置周期)
# 支持格式:
# - "30s" (30秒)
# - "1m" (1分钟推荐)
# - "5m" (5分钟)
# - "1h" (1小时)
expiration: "1m"
# 限流存储方式
# 选项:
# - "memory": 内存存储(单机部署,快速,重启后重置)
# - "redis": Redis存储分布式部署持久化跨服务器共享
# 建议:
# - 开发/测试环境:使用 "memory"
# - 生产环境(单机):使用 "memory"
# - 生产环境(多机):使用 "redis"
storage: "memory"
# 短信服务配置
sms:
gateway_url: "https://gateway.sms.whjhft.com:8443/sms"
username: "JH0001" # TODO: 替换为实际的短信服务账号
password: "wwR8E4qnL6F0" # TODO: 替换为实际的短信服务密码
signature: "【JHFTIOT】" # TODO: 替换为报备通过的短信签名
timeout: "10s"
# JWT 配置
jwt:
secret_key: "your-secret-key-change-this-in-production" # TODO: 生产环境必须修改
token_duration: "168h" # C 端个人客户 JWT Token 有效期7天
access_token_ttl: "24h" # B 端访问令牌有效期24小时
refresh_token_ttl: "168h" # B 端刷新令牌有效期7天
# 默认超级管理员配置(可选,系统启动时自动创建)
# 如果配置为空,系统使用代码默认值:
# - 用户名: admin
# - 密码: Admin@123456
# - 手机号: 13800000000
# default_admin:
# username: "admin"
# password: "Admin@123456"
# phone: "13800000000"