From f5d046882ee1df28c9d368ea435476ab76658eca Mon Sep 17 00:00:00 2001 From: shi Date: Sat, 22 Feb 2025 16:01:20 +0800 Subject: [PATCH 1/3] =?UTF-8?q?build(linux):=20=E6=9B=B4=E6=96=B0=E5=8F=91?= =?UTF-8?q?=E5=B8=83=E8=84=9A=E6=9C=AC=E7=9B=AE=E6=A0=87=E8=B7=AF=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 将 ff-admin 模块的构建产物从 /opt/sever/dist/ff-admin/ 复制到 /opt/gameApi/dist/game-api/ - 优化了 publish.sh 脚本中的文件复制逻辑 --- sh/linux/publish.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sh/linux/publish.sh b/sh/linux/publish.sh index 05c273f..7c92dbe 100644 --- a/sh/linux/publish.sh +++ b/sh/linux/publish.sh @@ -8,7 +8,7 @@ fi git pull mvn -Dmaven.test.skip=true clean package if [ $? -eq 0 ]; then - cp ff-admin/target/ff-*.jar /opt/sever/dist/ff-admin/ + cp ff-admin/target/ff-*.jar /opt/gameApi/dist/game-api/ else echo "fail" From 6785ac862f18e43c792f542b40929ed6264d2b32 Mon Sep 17 00:00:00 2001 From: shi Date: Sat, 22 Feb 2025 17:15:00 +0800 Subject: [PATCH 2/3] =?UTF-8?q?infrastructure(ff-admin):=20=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E7=94=9F=E4=BA=A7=E7=8E=AF=E5=A2=83=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 修改文件上传路径- 调整服务器端口 - 更新数据库连接URL --- ff-admin/src/main/resources/application-prod.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ff-admin/src/main/resources/application-prod.yml b/ff-admin/src/main/resources/application-prod.yml index 18e7937..473dd2e 100644 --- a/ff-admin/src/main/resources/application-prod.yml +++ b/ff-admin/src/main/resources/application-prod.yml @@ -1,15 +1,16 @@ # 项目相关配置 ff: # 文件路径 示例( Windows配置D:/ff/uploadPath,Linux配置 /home/ff/uploadPath) - profile: D:/opt/sever/dist/ff-admin/uploadPath + profile: /opt/gameApi/dist/game-api/uploadPath # 开发环境配置 server: # 服务器的HTTP端口,默认为8080 - port: 28080 + port: 38080 servlet: # 应用的访问路径 context-path: /ff-api + # 日志配置 logging: level: @@ -49,7 +50,7 @@ spring: druid: # 主库数据源 master: - url: jdbc:mysql://192.168.1.11:23306/ff-admin?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&allowMultiQueries=true + url: jdbc:mysql://127.0.0.1:23306/ff-game?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&allowMultiQueries=true username: root password: myAa123456 # 初始连接数 From 1e495270a90d07628263858316d792da6a414218 Mon Sep 17 00:00:00 2001 From: shi Date: Sat, 22 Feb 2025 17:51:51 +0800 Subject: [PATCH 3/3] =?UTF-8?q?refactor(ff-admin):=20=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E4=BD=99=E9=A2=9D=E8=AE=A1=E7=AE=97=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在获取余额时使用 NumberUtil.add 方法,确保结果不会为 null - 避免潜在的 NullPointerException,提高代码健壮性 --- .../ff/common/service/impl/TenantGameQuotaServiceImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ff-admin/src/main/java/com/ff/common/service/impl/TenantGameQuotaServiceImpl.java b/ff-admin/src/main/java/com/ff/common/service/impl/TenantGameQuotaServiceImpl.java index de57751..e731a55 100644 --- a/ff-admin/src/main/java/com/ff/common/service/impl/TenantGameQuotaServiceImpl.java +++ b/ff-admin/src/main/java/com/ff/common/service/impl/TenantGameQuotaServiceImpl.java @@ -323,12 +323,12 @@ public class TenantGameQuotaServiceImpl implements ITenantGameQuotaService { .tenantKey(gameBalanceExchange.getTenantKey()) .memberId(member.getId()) .build()); - BigDecimal balanceOut = tenantGameQuotaFlowService.getExchangeMoneyByMemberId(TenantGameQuotaFlow.builder() + BigDecimal balanceOut = NumberUtil.add(tenantGameQuotaFlowService.getExchangeMoneyByMemberId(TenantGameQuotaFlow.builder() .isOut(Boolean.FALSE) .quotaType(quotaType) .tenantKey(gameBalanceExchange.getTenantKey()) .memberId(member.getId()) - .build()); + .build()),BigDecimal.ZERO); // 初始化平台额度 BigDecimal platformBalance = BigDecimal.ZERO;