3 Commits

Author SHA1 Message Date
zhangjf
797feff8c2 feat: fund-gateway增加/fund context path
修改内容:
1. fund-gateway/application.yml:
   - 所有路由Path添加/fund前缀
   - StripPrefix从1改为2(剥离/fund和模块名两级)
   - 例:/fund/sys/... -> 转发到 /api/v1/sys/...

2. 前端API配置:
   - fund-admin/src/api/request.ts: baseURL改为'/fund'
   - fund-mobile/src/api/request.ts: baseURL改为'/fund'

3. Nginx部署脚本:
   - 添加/fund/路径代理配置
   - 保留/api/代理兼容旧版

API调用示例:
- 旧版:/sys/auth/login
- 新版:/fund/sys/auth/login

网关路由:
- /fund/sys/** -> lb://fund-sys/api/v1/sys/**
- /fund/cust/** -> lb://fund-cust/api/v1/cust/**
- ...
2026-02-22 22:24:20 +08:00
zhangjf
8190887de8 feat: 数据库脚本优化、前端部署脚本、租户ID支持
- 数据库脚本优化
  - 新增01_create_user.sql创建fundsp用户
  - 新增02_grant_user.sql授权脚本
  - 新增fund_exp_init.sql、fund_receipt_init.sql
  - 修复SQL脚本与实体类一致性
  - 密码更新为fundSP@123

- 前端部署脚本
  - 新增build-frontend.sh前端构建脚本
  - 新增deploy-frontend-nginx.sh Nginx部署脚本
  - 打包输出到deploy目录

- 租户ID支持
  - fund-admin/fund-mobile支持query参数读取tid
  - 新增tenant.ts store管理租户状态
  - 请求拦截器添加X-Tenant-Id header

- 启动脚本修复
  - 修复INSTANCE_NAME变量替换问题
  - 更新所有service.properties配置

- 配置更新
  - 更新所有服务数据库密码
  - 更新docker-compose.yml配置
2026-02-22 19:45:52 +08:00
zhangjf
8e4afcd1a5 feat: TenantAwareLoadBalancer 整合 TenantRoutingProperties 配置
问题:TenantRoutingProperties 定义了配置但未被使用

解决方案:
1. TenantAwareLoadBalancer 注入 TenantRoutingProperties
   - 使用配置的 tenantHeader 名称
   - 使用配置的 buildTenantGroup 方法
   - 使用配置的 isSharedService 判断
   - 使用配置的 isFallbackToShared 策略

2. 新增功能
   - 支持 enabled=false 禁用租户路由
   - 共享服务跳过租户过滤
   - 可配置是否回退到共享实例

3. 更新测试适配新构造函数
2026-02-19 21:02:25 +08:00