feat: 新增账号编码和HTTP连接功能

This commit is contained in:
2026-04-11 18:22:52 +08:00
parent 2f5c4f7e54
commit f8927afa9c
94 changed files with 1213 additions and 10230 deletions

View File

@@ -1,7 +1,6 @@
server:
address: ":3000"
name: "customer-server"
workerId: 1
cache:
localTTL: 60
redisTTL: 300
@@ -9,14 +8,14 @@ cache:
database:
default:
- type: "pgsql"
host: "localhost"
port: "5432"
host: "116.204.74.41"
port: "15432"
user: "postgres"
pass: "123456"
name: "customer_server"
pass: "Bjang09@686^*^"
name: "tenant-1"
prefix: "customer_server_" # (可选)表名前缀
role: "master" # (可选)数据库主从角色(master/slave)默认为master。如果不使用应用主从机制请不配置或留空即可。
debug: false # (可选)开启调试模式
debug: true # (可选)开启调试模式
dryRun: false # (可选)ORM空跑(只读不写)
charset: "utf8" # (可选)数据库编码(如: utf8mb4/utf8/gbk/gb2312)一般设置为utf8mb4。默认为utf8。
timezone: "Asia/Shanghai" # (可选)时区配置,例如:Local
@@ -29,11 +28,11 @@ database:
deletedAt: "deleted_at" # (可选)软删除时间字段名称
timeMaintainDisabled: false # (可选)是否完全关闭时间更新特性为true时CreatedAt/UpdatedAt/DeletedAt都将失效
- type: "pgsql"
host: "localhost"
port: "5432"
host: "116.204.74.41"
port: "15432"
user: "postgres"
pass: "123456"
name: "customer_server"
pass: "Bjang09@686^*^"
name: "tenant-1"
prefix: "customer_server_" # (可选)表名前缀
role: "slave" # (可选)数据库主从角色(master/slave)默认为master。如果不使用应用主从机制请不配置或留空即可。
debug: false # (可选)开启调试模式
@@ -48,23 +47,32 @@ database:
updatedAt: "updated_at" # (可选)自动更新时间字段名称
deletedAt: "deleted_at" # (可选)软删除时间字段名称
timeMaintainDisabled: false # (可选)是否完全关闭时间更新特性为true时CreatedAt/UpdatedAt/DeletedAt都将失效
jwt:
secret: "abcdefghijklmnopqrstuvwxyz"
tenant-1:
- type: "pgsql"
host: "116.204.74.41"
port: "15432"
user: "postgres"
pass: "Bjang09@686^*^"
name: "tenant-1"
prefix: "customer_server_" # (可选)表名前缀
role: "master" # (可选)数据库主从角色(master/slave)默认为master。如果不使用应用主从机制请不配置或留空即可。
debug: true # (可选)开启调试模式
dryRun: false # (可选)ORM空跑(只读不写)
charset: "utf8" # (可选)数据库编码(如: utf8mb4/utf8/gbk/gb2312)一般设置为utf8mb4。默认为utf8。
timezone: "Asia/Shanghai" # (可选)时区配置,例如:Local
maxIdle: 5 # (可选)连接池最大闲置的连接数(默认10)
maxOpen: 20 # (可选)连接池最大打开的连接数(默认无限制)
maxLifetime: "30s" # (可选)连接对象可重复使用的时间长度(默认30秒)
maxIdleConnTime: "30s" # (可选v2.10新增)连接池中空闲连接的最大生存时间(默认30秒)。可以通过配置文件或SetConnMaxIdleTime方法设置避免长时间空闲连接占用资源。
createdAt: "created_at" # (可选)自动创建时间字段名称
updatedAt: "updated_at" # (可选)自动更新时间字段名称
deletedAt: "deleted_at" # (可选)软删除时间字段名称
timeMaintainDisabled: false # (可选)是否完全关闭时间更新特性为true时CreatedAt/UpdatedAt/DeletedAt都将失效
rate:
limit: 200
burst: 300
# --- 华为云服务器116.204.74.41:17027带认证 ---
#mongo:
# default:
# address: "mongodb://root:M0ng0DB%40Pass2026%21@116.204.74.41:17027?authSource=admin"
# database: "customer_service"
# logger:
# level: "all"
# stdout: true
# --- 内网服务器192.168.3.200:27017无认证 ---
mongo:
default:
@@ -76,7 +84,7 @@ mongo:
redis:
default:
address: localhost:6379
address: 116.204.74.41:6379
db: 0
idleTimeout: "60s"
maxConnLifetime: "90s"
@@ -87,28 +95,21 @@ redis:
maxActive: 100
consul:
address: localhost:8500
address: 116.204.74.41:8500
jaeger:
addr: 116.204.74.41:4318
rabbitmq:
host: localhost
port: 5672
username: admin
password: 123456
# 响应队列配置从message迁移
responseExchange: "ragflow.response"
responseQueue: "ragflow.response.queue"
responseRoutingKey: "#" # 匹配所有routing key
# 不配置instanceName直接使用os.Hostname()获取容器名/主机名作为实例ID
jaeger:
addr: localhost:4318
# RAGFlow配置customerservice只需要base_url和api_key用于更新prompt接口
ragflow:
base_url: "http://116.204.74.41"
api_key: "ragflow-tg4BrmCIDXbZDB80JGyq1cDNFyr2_kfAEd053YuDV58"
default_model: "qwen3-235b-a22b-instruct-2507" # 默认LLM模型可通过Consul动态覆盖
embedding_model: "text-embedding-v4@Tongyi-Qianwen" # embedding模型创建知识库时使用格式model@factory
nats:
default:
addr: localhost
port: 4222
followUp:
enable: true
@@ -121,19 +122,6 @@ followUp:
- "如果需要帮助,随时告诉我~"
- "我一直在线,有问题随时找我~"
archive:
enable: true
queue: "archive.queue"
exchange: "archive.delayed"
routingKey: "archive"
delay: 3600 # 归档延时默认1小时
# 月度归档配置
enabled: true # 是否启用月度归档
cron: "0 0 0 1 * *" # 每月1号0点执行归档上个月整月数据
mongoBatchSize: 1000 # 从原表复制到临时表的批量大小
esBatchSize: 500 # 从临时表写入 ES 的批量大小
testMode: true # 测试模式true=归档最近7天false=归档上个月生产环境设为false
# 卡片触发配置
card:
triggerCount: 5 # 触发发送卡片的对话轮数(对话>=此值时触发)
@@ -141,10 +129,3 @@ card:
# 历史上下文配置
history:
contextLimit: 5 # 读取历史对话轮数用于新Session上下文注入
# Elasticsearch 配置
elasticsearch:
addresses:
- "http://116.204.74.41:9200"
username: ""
password: ""