|
|
@@ -102,10 +102,18 @@ public class GameRankGroupServiceImpl implements IGameRankGroupService {
|
|
|
*/
|
|
|
@Override
|
|
|
public Boolean insertByBo(GameRankGroupBo bo) {
|
|
|
+ //设置赛事ID
|
|
|
+ if (bo.getEventId() == null) {
|
|
|
+ Object cacheObject = RedisUtils.getCacheObject(GameEventConstant.DEFAULT_EVENT_ID);
|
|
|
+ if (cacheObject instanceof Integer) {
|
|
|
+ bo.setEventId(((Integer) cacheObject).longValue()); // 显式转换为 Long 类型
|
|
|
+ } else if (cacheObject instanceof Long) {
|
|
|
+ bo.setEventId((Long) cacheObject);
|
|
|
+ }
|
|
|
+ }
|
|
|
GameRankGroup add = MapstructUtils.convert(bo, GameRankGroup.class);
|
|
|
-
|
|
|
+ if (add == null) return false;
|
|
|
validEntityBeforeSave(add);
|
|
|
-
|
|
|
// 设置祖级列表
|
|
|
if (add.getParentId() != 0) {
|
|
|
GameRankGroup parent = baseMapper.selectById(add.getParentId());
|