|
@@ -60,12 +60,13 @@ public class KfMsgContentServiceImpl extends ServiceImpl<KfMsgContentMapper, KfM
|
|
|
public List<KfGameVO> getKfGameList() {
|
|
|
List<GameAuth> gameAuthList = gameAuthService.list(new LambdaQueryWrapper<GameAuth>()
|
|
|
.eq(!SecurityUtil.isAdmin(), GameAuth::getUserId, SecurityUtil.getUserId()));
|
|
|
- if (CollectionUtils.isEmpty(gameAuthList)) {
|
|
|
+ if (!SecurityUtil.isAdmin() && CollectionUtils.isEmpty(gameAuthList)) {
|
|
|
return Collections.emptyList();
|
|
|
}
|
|
|
return gameAppletService.list(new LambdaQueryWrapper<GameApplet>()
|
|
|
.eq(GameApplet::getType, 1)
|
|
|
- .in(GameApplet::getGameId, gameAuthList.stream().map(GameAuth::getGameId).collect(Collectors.toSet()))
|
|
|
+ .in(!SecurityUtil.isAdmin(), GameApplet::getGameId,
|
|
|
+ gameAuthList.stream().map(GameAuth::getGameId).collect(Collectors.toSet()))
|
|
|
).stream().map(gameApplet -> BeanUtil.copy(gameApplet, KfGameVO.class)).collect(Collectors.toList());
|
|
|
}
|
|
|
|