Kaynağa Gözat

feat : 支付模块修改

bilingfeng 2 yıl önce
ebeveyn
işleme
f13ec74f61

+ 2 - 2
game-module/game-sdk/src/main/java/com/zanxiang/sdk/service/Impl/GameUserRoleServiceImpl.java

@@ -73,7 +73,7 @@ public class GameUserRoleServiceImpl extends ServiceImpl<GameUserRoleMapper, Gam
                     .set(param.getRoleVipLevel() != null, GameUserRole::getRoleVipLevel, param.getRoleVipLevel())
                     .set(param.getRolePower() != null, GameUserRole::getRolePower, param.getRolePower())
                     .set(param.getPlatformCoin() != null, GameUserRole::getPlatformCoin, param.getPlatformCoin())
-                    .set(GameUserRole::getUpdateTime, param.getRoleGradeUpdateTime() == null ? LocalDateTime.now() : DateUtil.secondToLocalDateTime(param.getRoleGradeUpdateTime()))
+                    .set(GameUserRole::getUpdateTime, param.getRoleGradeUpdateTime() == null || param.getRoleGradeUpdateTime() <= 0 ? LocalDateTime.now() : DateUtil.secondToLocalDateTime(param.getRoleGradeUpdateTime()))
                     .eq(GameUserRole::getGameId, userData.getGameId())
                     .eq(GameUserRole::getRoleId, param.getRoleId()));
         }
@@ -113,7 +113,7 @@ public class GameUserRoleServiceImpl extends ServiceImpl<GameUserRoleMapper, Gam
                 .rolePower(param.getRolePower())
                 .platformCoin(param.getPlatformCoin())
                 .os(userData.getDeviceSystem())
-                .createTime(param.getRoleGradeUpdateTime() == null ? LocalDateTime.now() : DateUtil.secondToLocalDateTime(param.getRoleGradeUpdateTime()))
+                .createTime(param.getRoleGradeUpdateTime() == null || param.getRoleGradeUpdateTime() <= 0 ? LocalDateTime.now() : DateUtil.secondToLocalDateTime(param.getRoleGradeUpdateTime()))
                 .updateTime(LocalDateTime.now())
                 .lastLoginTime(LocalDateTime.now())
                 .build();