|
@@ -148,29 +148,21 @@ public class GameUserRoleServiceImpl extends ServiceImpl<GameUserRoleMapper, Gam
|
|
|
if (gameUserRole == null) {
|
|
|
|
|
|
this.gameRoleCreate(param, userData);
|
|
|
-
|
|
|
- if (Objects.equals(dataType, DataTypeEnum.TYPE_LEVEL_UP.getDateType())) {
|
|
|
- return Boolean.TRUE;
|
|
|
- }
|
|
|
+ } else {
|
|
|
+
|
|
|
+ this.gameRoleUpdate(param, gameUserRole, userData);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
if (Objects.equals(dataType, DataTypeEnum.TYPE_ENTER_GAME.getDateType())) {
|
|
|
-
|
|
|
- return userLoginLogService.createRoleLoginLog(userData, param.getRoleId(), param.getRoleName(),
|
|
|
+ userLoginLogService.createRoleLoginLog(userData, param.getRoleId(), param.getRoleName(),
|
|
|
LoginTypeEnum.LOGIN_IN.getLoginType());
|
|
|
}
|
|
|
-
|
|
|
- if (gameUserRole != null && Objects.equals(dataType, DataTypeEnum.TYPE_LEVEL_UP.getDateType())) {
|
|
|
-
|
|
|
- return this.gameRoleUpdate(param, gameUserRole, userData);
|
|
|
- }
|
|
|
-
|
|
|
+
|
|
|
if (Objects.equals(dataType, DataTypeEnum.TYPE_EXIT_GAME.getDateType())) {
|
|
|
-
|
|
|
- return userLoginLogService.createRoleLoginLog(userData, param.getRoleId(), param.getRoleName(),
|
|
|
+ userLoginLogService.createRoleLoginLog(userData, param.getRoleId(), param.getRoleName(),
|
|
|
LoginTypeEnum.LOGIN_OUT.getLoginType());
|
|
|
}
|
|
|
- return Boolean.FALSE;
|
|
|
+ return Boolean.TRUE;
|
|
|
}
|
|
|
|
|
|
private boolean gameRoleUpdate(GameUserRoleUpdateParam param, GameUserRole gameUserRole, UserData userData) {
|