|
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
+import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import com.zanxiang.erp.security.util.SecurityUtil;
|
|
@@ -28,6 +29,7 @@ import org.apache.logging.log4j.util.Strings;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
+import reactor.util.function.Tuple2;
|
|
|
|
|
|
import java.time.LocalDateTime;
|
|
|
import java.time.LocalTime;
|
|
@@ -100,15 +102,15 @@ public class GameServerServiceImpl extends ServiceImpl<GameServerMapper, GameSer
|
|
|
@Override
|
|
|
public IPage<GameServerListVO> listOfPage(GameServerListParam param) {
|
|
|
//游戏获取
|
|
|
-// Tuple2<String, List<Long>> gameTuple = gameAuthService.getUserGameList(null);
|
|
|
-// List<Long> gameIdList = gameTuple.getT2();
|
|
|
-// if (CollectionUtils.isEmpty(gameIdList)) {
|
|
|
-// return new Page<>();
|
|
|
-// }
|
|
|
-// //不包含参数游戏
|
|
|
-// if (param.getGameId() != null && !gameIdList.contains(param.getGameId())) {
|
|
|
-// return new Page<>();
|
|
|
-// }
|
|
|
+ Tuple2<String, List<Long>> gameTuple = gameAuthService.getUserGameList(null);
|
|
|
+ List<Long> gameIdList = gameTuple.getT2();
|
|
|
+ if (CollectionUtils.isEmpty(gameIdList)) {
|
|
|
+ return new Page<>();
|
|
|
+ }
|
|
|
+ //不包含参数游戏
|
|
|
+ if (param.getGameId() != null && !gameIdList.contains(param.getGameId())) {
|
|
|
+ return new Page<>();
|
|
|
+ }
|
|
|
Long gameId = null;
|
|
|
if (param.getGameId() != null) {
|
|
|
GameDTO gameDTO = gameService.getById(param.getGameId());
|
|
@@ -242,6 +244,7 @@ public class GameServerServiceImpl extends ServiceImpl<GameServerMapper, GameSer
|
|
|
.sonServerIds(String.join(",", param.getServerIdList()))
|
|
|
.sourceServerIds(String.join(",", sourceServerIds))
|
|
|
.mergeTime(param.getMergeTime())
|
|
|
+ .startTime(param.getMergeTime())
|
|
|
.isDelete(DeleteEnum.NO.getCode())
|
|
|
.createBy(SecurityUtil.getUserId())
|
|
|
.createTime(LocalDateTime.now())
|