|
@@ -23,7 +23,10 @@ import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
import java.time.LocalDateTime;
|
|
|
import java.time.LocalTime;
|
|
|
+import java.util.Collections;
|
|
|
+import java.util.List;
|
|
|
import java.util.Objects;
|
|
|
+import java.util.stream.Collectors;
|
|
|
|
|
|
/**
|
|
|
* @author : lingfeng
|
|
@@ -37,6 +40,17 @@ public class GameServerServiceImpl extends ServiceImpl<GameServerMapper, GameSer
|
|
|
@Autowired
|
|
|
private IGameService gameService;
|
|
|
|
|
|
+ @Override
|
|
|
+ public List<String> listServerId(Long gameId, String serverName) {
|
|
|
+ if (gameId == null && Strings.isBlank(serverName)) {
|
|
|
+ return Collections.emptyList();
|
|
|
+ }
|
|
|
+ return super.list(new LambdaQueryWrapper<GameServer>()
|
|
|
+ .eq(GameServer::getGameId, gameId)
|
|
|
+ .like(GameServer::getServerName, serverName)
|
|
|
+ ).stream().map(GameServer::getServerId).collect(Collectors.toList());
|
|
|
+ }
|
|
|
+
|
|
|
@Override
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
public boolean addOrUpdate(GameServerAddUpdateParam param) {
|