- Update BaseEntity to use String IDs (snowflake algorithm format) - Migrate context holders (UserContextHolder, TenantContextHolder) to String - Update MyBatis-Plus configs: LongValue -> StringValue for tenant ID - Fix type conversions in 6 modules: common, sys, cust, proj, req, exp (partial) Changes by module: - fund-common: Context holders, interceptors, test fixes - fund-sys: Test files updated for String IDs - fund-cust: Service, DTO, VO, Controller, Config updates - fund-proj: Complete service layer and controller migration - fund-req: Complete service layer and controller migration - fund-exp: ExpenseType service layer complete (FundExpense in progress) Note: JavaScript precision issue resolved by using String for large IDs
76 lines
1.8 KiB
Bash
Executable File
76 lines
1.8 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
# 资金服务平台 - 服务启动脚本
|
|
# 使用 Maven spring-boot:run 启动各个微服务
|
|
|
|
# 设置环境变量
|
|
export MAVEN_HOME=/home/along/MyApp/apache-maven-3.9.9
|
|
export PATH=$MAVEN_HOME/bin:$PATH
|
|
export JAVA_HOME=/home/along/MyApp/jdk-21.0.7
|
|
export PATH=$JAVA_HOME/bin:$PATH
|
|
|
|
# 项目根目录
|
|
PROJECT_DIR="/home/along/MyCode/wjbl/fundplatform"
|
|
LOG_DIR="/tmp/fundplatform-logs"
|
|
|
|
# 创建日志目录
|
|
mkdir -p $LOG_DIR
|
|
|
|
echo "========================================="
|
|
echo "资金服务平台 - 启动所有服务"
|
|
echo "========================================="
|
|
|
|
cd $PROJECT_DIR
|
|
|
|
# 服务列表(按启动顺序)
|
|
SERVICES=(
|
|
"fund-sys:8100"
|
|
"fund-gateway:9000"
|
|
"fund-cust:8200"
|
|
"fund-proj:8300"
|
|
"fund-req:8400"
|
|
"fund-exp:8500"
|
|
"fund-receipt:8600"
|
|
"fund-report:8700"
|
|
"fund-file:8800"
|
|
)
|
|
|
|
# 启动服务函数
|
|
start_service() {
|
|
local service_module=$1
|
|
local service_port=$2
|
|
|
|
echo "启动服务: $service_module (端口: $service_port)"
|
|
|
|
nohup mvn spring-boot:run -pl $service_module -am \
|
|
> $LOG_DIR/$service_module.log 2>&1 &
|
|
|
|
echo " PID: $!"
|
|
echo " 日志: $LOG_DIR/$service_module.log"
|
|
|
|
# 等待一小段时间让服务开始启动
|
|
sleep 3
|
|
}
|
|
|
|
# 启动所有服务
|
|
for service in "${SERVICES[@]}"; do
|
|
IFS=':' read -r module port <<< "$service"
|
|
start_service "$module" "$port"
|
|
done
|
|
|
|
echo ""
|
|
echo "========================================="
|
|
echo "所有服务已开始启动"
|
|
echo "========================================="
|
|
echo "日志目录: $LOG_DIR"
|
|
echo ""
|
|
echo "检查服务状态:"
|
|
echo " ps aux | grep 'spring-boot:run'"
|
|
echo ""
|
|
echo "查看服务日志:"
|
|
echo " tail -f $LOG_DIR/fund-sys.log"
|
|
echo ""
|
|
echo "访问 Nacos 控制台查看服务注册状态:"
|
|
echo " http://localhost:8048"
|
|
echo "========================================="
|