1.修改大哥数据入库方法名
2.增加大哥数据入库时总金币判断 3.修改生产环境配置
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user