|
@@ -111,15 +111,8 @@ public class GameUserRoleServiceImpl extends ServiceImpl<GameUserRoleMapper, Gam
|
|
|
.eq(GameUserRole::getRoleId, gameUserRoleParam.getRoleId()));
|
|
|
|
|
|
if (gameUserRole != null) {
|
|
|
-
|
|
|
- boolean updateRoleLevel = gameUserRoleParam.getRoleLevel() > gameUserRole.getRoleLevel();
|
|
|
|
|
|
- this.gameRoleUpdate(gameUserRoleParam, gameUserRole, userData);
|
|
|
-
|
|
|
- if (updateRoleLevel) {
|
|
|
- pushMsgService.pushMsgByLevelUpdate(gameUserRoleParam, userData);
|
|
|
- }
|
|
|
- return Boolean.TRUE;
|
|
|
+ return this.gameRoleUpdate(gameUserRoleParam, gameUserRole, userData);
|
|
|
}
|
|
|
|
|
|
this.gameRoleCreate(gameUserRoleParam, userData);
|
|
@@ -168,15 +161,8 @@ public class GameUserRoleServiceImpl extends ServiceImpl<GameUserRoleMapper, Gam
|
|
|
}
|
|
|
|
|
|
if (gameUserRole != null && Objects.equals(dataType, DataTypeEnum.TYPE_LEVEL_UP.getDateType())) {
|
|
|
-
|
|
|
- boolean updateRoleLevel = param.getRoleLevel() > gameUserRole.getRoleLevel();
|
|
|
|
|
|
- boolean result = this.gameRoleUpdate(param, gameUserRole, userData);
|
|
|
-
|
|
|
- if (updateRoleLevel) {
|
|
|
- pushMsgService.pushMsgByLevelUpdate(param, userData);
|
|
|
- }
|
|
|
- return result;
|
|
|
+ return this.gameRoleUpdate(param, gameUserRole, userData);
|
|
|
}
|
|
|
|
|
|
if (Objects.equals(dataType, DataTypeEnum.TYPE_EXIT_GAME.getDateType())) {
|
|
@@ -193,6 +179,8 @@ public class GameUserRoleServiceImpl extends ServiceImpl<GameUserRoleMapper, Gam
|
|
|
0L, 20L, TimeUnit.SECONDS)) {
|
|
|
return Boolean.TRUE;
|
|
|
}
|
|
|
+
|
|
|
+ boolean updateRoleLevel = param.getRoleLevel() > gameUserRole.getRoleLevel();
|
|
|
|
|
|
GameUser gameUser = gameUserService.getOne(new LambdaQueryWrapper<GameUser>()
|
|
|
.eq(GameUser::getGameId, userData.getGameId())
|
|
@@ -218,6 +206,13 @@ public class GameUserRoleServiceImpl extends ServiceImpl<GameUserRoleMapper, Gam
|
|
|
gameUserRole.setServerName(param.getServerName());
|
|
|
gameUserRole.setUpdateTime(LocalDateTime.now());
|
|
|
boolean result = super.updateById(gameUserRole);
|
|
|
+
|
|
|
+ if (updateRoleLevel) {
|
|
|
+
|
|
|
+ callBackService.roleCallBack(gameUserRole);
|
|
|
+
|
|
|
+ pushMsgService.pushMsgByLevelUpdate(param, userData);
|
|
|
+ }
|
|
|
|
|
|
kafkaService.eventTrack(KafkaEventTrackEnum.KAFKA_EVENT_TRACK_ROLE_UPDATE, JsonUtil.toString(gameUserRole));
|
|
|
return result;
|