|
@@ -12,13 +12,16 @@ import org.dromara.common.core.utils.StringUtils;
|
|
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
|
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
|
|
import org.dromara.system.domain.GameNavigator;
|
|
|
-import org.dromara.system.domain.bo.EventMenuBo;
|
|
|
+import org.dromara.system.domain.app.AppIndexVo;
|
|
|
import org.dromara.system.domain.bo.GameNavigatorBo;
|
|
|
import org.dromara.system.domain.vo.EventMenuVo;
|
|
|
import org.dromara.system.domain.vo.GameNavigatorVo;
|
|
|
+import org.dromara.system.domain.vo.SysOssVo;
|
|
|
import org.dromara.system.mapper.GameNavigatorMapper;
|
|
|
import org.dromara.system.service.IEventMenuService;
|
|
|
+import org.dromara.system.service.IGameEventConfigService;
|
|
|
import org.dromara.system.service.IGameNavigatorService;
|
|
|
+import org.dromara.system.service.ISysOssService;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import java.util.*;
|
|
@@ -36,6 +39,8 @@ public class IGameNavigatorServiceImpl implements IGameNavigatorService {
|
|
|
|
|
|
private final GameNavigatorMapper baseMapper;
|
|
|
private final IEventMenuService eventMenuService;
|
|
|
+ private final IGameEventConfigService gameEventConfigService;
|
|
|
+ private final ISysOssService ossService;
|
|
|
|
|
|
/**
|
|
|
* 查询主导航表
|
|
@@ -186,19 +191,30 @@ public class IGameNavigatorServiceImpl implements IGameNavigatorService {
|
|
|
* @return
|
|
|
*/
|
|
|
@Override
|
|
|
- public List<GameNavigatorVo> listAppNavByEventId(Long eventId) {
|
|
|
+ public AppIndexVo listAppNavByEventId(Long eventId) {
|
|
|
EventMenuVo vo = eventMenuService.queryByEventId(eventId);
|
|
|
+ AppIndexVo appIndexVo = new AppIndexVo();
|
|
|
List<Long> navIdList = Optional.ofNullable(vo)
|
|
|
.map(v -> JSONUtil.toList(v.getMenuList(), Long.class))
|
|
|
.orElse(Collections.emptyList());
|
|
|
// 如果 navIdList 为空,直接返回空分页
|
|
|
if (navIdList.isEmpty()) {
|
|
|
- return List.of();
|
|
|
+ appIndexVo.setNavigatorVos(List.of());
|
|
|
}
|
|
|
List<GameNavigatorVo> result = baseMapper.selectVoList(
|
|
|
Wrappers.lambdaQuery(GameNavigator.class)
|
|
|
.in(GameNavigator::getNavId, navIdList)
|
|
|
);
|
|
|
- return result;
|
|
|
+ appIndexVo.setNavigatorVos(result);
|
|
|
+
|
|
|
+ // 根据赛事id查询赛事配置表获取ossId
|
|
|
+ Long ossId = gameEventConfigService.queryBgUrlByEventId(eventId);
|
|
|
+ if (ossId != null) {
|
|
|
+ SysOssVo oss = ossService.getById(ossId);
|
|
|
+ if (oss != null) {
|
|
|
+ appIndexVo.setBgUrl(oss.getUrl());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return appIndexVo;
|
|
|
}
|
|
|
}
|