Files
junhong_cmp_fiber/pkg/config/defaults/config.yaml
huang b9733c4913
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 7m12s
fix: 修正零售价架构错误 + 清理旧微信配置 + 归档提案 + 前端接口文档
1. 修正 retail_price 架构:
   - 删除 batch-pricing 接口的 pricing_target 字段和 retail_price 分支
     (上级只能改下级成本价,不能改零售价)
   - 新增 PATCH /api/admin/packages/:id/retail-price 接口
     (代理自己改自己的零售价,校验 retail_price >= cost_price)

2. 清理旧微信 YAML 配置(已全部迁移到数据库 tb_wechat_config):
   - 删除 config.yaml 中 wechat.official_account 配置节
   - 删除 NewOfficialAccountApp() 旧工厂函数
   - 清理 personal_customer service 中的死代码(旧登录/绑定微信方法)
   - 清理 docker-compose.prod.yml 中旧微信环境变量和证书挂载注释

3. 归档四个已完成提案到 openspec/changes/archive/

4. 新增前端接口变更说明文档(docs/前端接口变更说明.md)

5. 修正归档提案和 specs 中关于 pricing_target 的错误描述
2026-03-19 17:39:43 +08:00

119 lines
3.0 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.
# 默认配置文件(嵌入二进制)
# 敏感配置和必填配置为空,必须通过环境变量设置
# 环境变量格式JUNHONG_{SECTION}_{KEY}
server:
address: ":3000"
read_timeout: "30s"
write_timeout: "30s"
shutdown_timeout: "30s"
prefork: false
# 数据库配置(必填项需通过环境变量设置)
database:
host: "" # 必填JUNHONG_DATABASE_HOST
port: 5432
user: "" # 必填JUNHONG_DATABASE_USER
password: "" # 必填JUNHONG_DATABASE_PASSWORD敏感
dbname: "" # 必填JUNHONG_DATABASE_DBNAME
sslmode: "disable"
max_open_conns: 25
max_idle_conns: 10
conn_max_lifetime: "5m"
# Redis 配置(必填项需通过环境变量设置)
redis:
address: "" # 必填JUNHONG_REDIS_ADDRESS
port: 6379
password: "" # 可选JUNHONG_REDIS_PASSWORD敏感
db: 0
pool_size: 10
min_idle_conns: 5
dial_timeout: "5s"
read_timeout: "3s"
write_timeout: "3s"
# 对象存储配置
storage:
provider: "s3"
temp_dir: "/tmp/junhong-storage"
s3:
endpoint: "" # 可选JUNHONG_STORAGE_S3_ENDPOINT
region: "" # 可选JUNHONG_STORAGE_S3_REGION
bucket: "" # 可选JUNHONG_STORAGE_S3_BUCKET
access_key_id: "" # 可选JUNHONG_STORAGE_S3_ACCESS_KEY_ID敏感
secret_access_key: "" # 可选JUNHONG_STORAGE_S3_SECRET_ACCESS_KEY敏感
use_ssl: false
path_style: true
presign:
upload_expires: "15m"
download_expires: "24h"
# 日志配置
logging:
level: "info"
development: false
app_log:
filename: "/app/logs/app.log"
max_size: 100
max_backups: 3
max_age: 7
compress: true
access_log:
filename: "/app/logs/access.log"
max_size: 100
max_backups: 3
max_age: 7
compress: true
# 任务队列配置
queue:
concurrency: 10
queues:
critical: 6
default: 3
low: 1
retry_max: 5
timeout: "10m"
# JWT 配置(必填项需通过环境变量设置)
jwt:
secret_key: "" # 必填JUNHONG_JWT_SECRET_KEY敏感
token_duration: "24h"
access_token_ttl: "24h"
refresh_token_ttl: "168h"
# 中间件配置
middleware:
enable_rate_limiter: false
rate_limiter:
max: 100
expiration: "1m"
storage: "memory"
# 客户端配置
client:
require_phone_binding: true # 是否要求个人客户绑定手机号
# 短信服务配置
sms:
gateway_url: "" # 可选JUNHONG_SMS_GATEWAY_URL
username: "" # 可选JUNHONG_SMS_USERNAME
password: "" # 可选JUNHONG_SMS_PASSWORD敏感
signature: "" # 可选JUNHONG_SMS_SIGNATURE
timeout: "10s"
# 默认超级管理员配置(可选)
default_admin:
username: ""
password: ""
phone: ""
# Gateway 服务配置
gateway:
base_url: "https://lplan.whjhft.com/openapi"
app_id: "60bgt1X8i7AvXqkd"
app_secret: "BZeQttaZQt0i73moF"
timeout: 30