forked from Cookies_Github_mirror/AquaDX
[chuni] Add all old version event and enable flag
This commit is contained in:
@@ -4,9 +4,13 @@ import icu.samnyan.aqua.sega.chunithm.model.gamedata.GameEvent;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Repository
|
||||
public interface GameEventRepository extends JpaRepository<GameEvent, Integer> {
|
||||
|
||||
List<GameEvent> findByEnable(boolean enable);
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ public class GetGameEventHandler implements BaseHandler {
|
||||
public String handle(Map<String, Object> request) throws JsonProcessingException {
|
||||
String type = (String) request.get("type");
|
||||
|
||||
List<GameEvent> gameEventList = gameEventRepository.findAll();
|
||||
List<GameEvent> gameEventList = gameEventRepository.findByEnable(true);
|
||||
|
||||
Map<String, Object> resultMap = new LinkedHashMap<>();
|
||||
resultMap.put("type", type);
|
||||
|
||||
@@ -30,4 +30,6 @@ public class GameEvent implements Serializable {
|
||||
private LocalDateTime startDate;
|
||||
|
||||
private LocalDateTime endDate;
|
||||
|
||||
private boolean enable;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user