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

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

View File

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