1.修改大哥数据入库方法名

2.增加大哥数据入库时总金币判断
3.修改生产环境配置
This commit is contained in:
2025-06-27 21:54:09 +08:00
parent d1386b5cda
commit a481740d5b
5 changed files with 11 additions and 8 deletions

View File

@@ -16,7 +16,7 @@
<version>0.0.1-SNAPSHOT</version> <version>0.0.1-SNAPSHOT</version>
<name>tk-dataSave</name> <name>tk-dataSave</name>
<properties> <properties>
<java.version>11</java.version> <java.version>17</java.version>
</properties> </properties>
<dependencies> <dependencies>
<dependency> <dependency>

View File

@@ -27,7 +27,7 @@ public class BigBrotherController {
@PostMapping("add_brother") @PostMapping("add_brother")
public BaseResponse<Boolean> addHost(@RequestBody ServerBigBrother bigBrothers){ public BaseResponse<Boolean> addBigBrother(@RequestBody ServerBigBrother bigBrothers){
mqSender.bigBrotherSend(bigBrothers); mqSender.bigBrotherSend(bigBrothers);
return ResultUtils.success(true); return ResultUtils.success(true);
} }

View File

@@ -38,6 +38,9 @@ public class ServerBigBrotherServiceImpl extends ServiceImpl<ServerBigBrotherMap
log.info("当前存储花费: {}ms",totalTimeMillis); log.info("当前存储花费: {}ms",totalTimeMillis);
} else { } else {
bigBrother.setId(serverBigBrother.getId()); bigBrother.setId(serverBigBrother.getId());
if (serverBigBrother.getTotalGiftCoins() == null || serverBigBrother.getTotalGiftCoins() <= 0) {
serverBigBrother.setTotalGiftCoins(0);
}
bigBrother.setTotalGiftCoins(bigBrother.getHistoricHighCoins()+serverBigBrother.getTotalGiftCoins()); bigBrother.setTotalGiftCoins(bigBrother.getHistoricHighCoins()+serverBigBrother.getTotalGiftCoins());
updateById(bigBrother); updateById(bigBrother);
stopWatch.stop(); stopWatch.stop();

View File

@@ -8,7 +8,7 @@ spring:
# todo 需替换配置 # todo 需替换配置
datasource: datasource:
driver-class-name: com.mysql.cj.jdbc.Driver driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://120.26.251.180:3326/new_tkdata?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true url: jdbc:mysql://localhost:3326/ruoyi-vue-pro?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true
username: root username: root
password: wfn53400 password: wfn53400
# Redis 配置 # Redis 配置
@@ -16,14 +16,14 @@ spring:
redis: redis:
database: 0 database: 0
host: localhost host: localhost
port: 6379 port: 16379
timeout: 5000 timeout: 5000
password: Ofl1xafvbJFtQFo password: ezyPM2UQkPO8O6i8s9
rabbitmq: rabbitmq:
host: localhost host: localhost
port: 5672 port: 5672
username: root username: tkdata
password: kB;V=wOH0iD#s3cW1) password: 6rARaRj8Z7UG3ahLzh
listener: listener:
simple: simple:
acknowledge-mode: manual acknowledge-mode: manual

View File

@@ -73,7 +73,7 @@ mybatis-plus:
# 接口文档配置 # 接口文档配置
knife4j: knife4j:
enable: true enable: false
openapi: openapi:
title: "接口文档" title: "接口文档"
version: 1.0 version: 1.0