mirror of
https://github.com/MewoLab/AquaDX.git
synced 2025-10-25 20:12:39 +00:00
[chusan] Add Chunithm New support
This commit is contained in:
parent
ee6d28bd00
commit
1c6f12752e
@ -142,6 +142,8 @@ public class AllNetController {
|
||||
return "http://" + addr + ":" + port + "/MaimaiServlet/";
|
||||
case "SDEZ":
|
||||
return "http://" + addr + ":" + port + "/Maimai2Servlet/";
|
||||
case "SDHD":
|
||||
return "http://" + addr + ":" + port + "/ChusanServlet/";
|
||||
default:
|
||||
return "http://" + addr + ":" + port + "/";
|
||||
}
|
||||
|
||||
@ -0,0 +1,292 @@
|
||||
package icu.samnyan.aqua.sega.chusan.controller;
|
||||
|
||||
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import icu.samnyan.aqua.sega.chusan.handler.impl.*;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping({"/ChusanServlet/ChuniServlet", "/ChusanServlet"})
|
||||
public class ChusanServletController {
|
||||
|
||||
private final GameLoginHandler gameLoginHandler;
|
||||
private final GameLogoutHandler gameLogoutHandler;
|
||||
private final GetGameChargeHandler getGameChargeHandler;
|
||||
private final GetGameEventHandler getGameEventHandler;
|
||||
private final GetGameIdlistHandler getGameIdlistHandler;
|
||||
private final GetGameRankingHandler getGameRankingHandler;
|
||||
private final GetGameSettingHandler getGameSettingHandler;
|
||||
private final GetTeamCourseRuleHandler getTeamCourseRuleHandler;
|
||||
private final GetTeamCourseSettingHandler getTeamCourseSettingHandler;
|
||||
private final GetUserActivityHandler getUserActivityHandler;
|
||||
private final GetUserCharacterHandler getUserCharacterHandler;
|
||||
private final GetUserChargeHandler getUserChargeHandler;
|
||||
private final GetUserCourseHandler getUserCourseHandler;
|
||||
private final GetUserDataHandler getUserDataHandler;
|
||||
private final GetUserDuelHandler getUserDuelHandler;
|
||||
private final GetUserFavoriteItemHandler getUserFavoriteItemHandler;
|
||||
private final GetUserItemHandler getUserItemHandler;
|
||||
private final GetUserLoginBonusHandler getUserLoginBonusHandler;
|
||||
private final GetUserMapAreaHandler getUserMapAreaHandler;
|
||||
private final GetUserMusicHandler getUserMusicHandler;
|
||||
private final GetUserOptionHandler getUserOptionHandler;
|
||||
private final GetUserPreviewHandler getUserPreviewHandler;
|
||||
private final GetUserRecentRatingHandler getUserRecentRatingHandler;
|
||||
private final GetUserRegionHandler getUserRegionHandler;
|
||||
private final GetUserRivalDataHandler getUserRivalDataHandler;
|
||||
private final GetUserRivalMusicHandler getUserRivalMusicHandler;
|
||||
private final GetUserSymbolChatSettingHandler getUserSymbolChatSettingHandler;
|
||||
private final GetUserTeamHandler getUserTeamHandler;
|
||||
private final UpsertUserAllHandler upsertUserAllHandler;
|
||||
private final UpsertUserChargelogHandler upsertUserChargelogHandler;
|
||||
|
||||
@Autowired
|
||||
public ChusanServletController(GameLoginHandler gameLoginHandler, GameLogoutHandler gameLogoutHandler, GetGameChargeHandler getGameChargeHandler, GetGameEventHandler getGameEventHandler, GetGameIdlistHandler getGameIdlistHandler, GetGameRankingHandler getGameRankingHandler, GetGameSettingHandler getGameSettingHandler, GetTeamCourseRuleHandler getTeamCourseRuleHandler, GetTeamCourseSettingHandler getTeamCourseSettingHandler, GetUserActivityHandler getUserActivityHandler, GetUserCharacterHandler getUserCharacterHandler, GetUserChargeHandler getUserChargeHandler, GetUserCourseHandler getUserCourseHandler, GetUserDataHandler getUserDataHandler, GetUserDuelHandler getUserDuelHandler, GetUserFavoriteItemHandler getUserFavoriteItemHandler, GetUserItemHandler getUserItemHandler, GetUserLoginBonusHandler getUserLoginBonusHandler, GetUserMapAreaHandler getUserMapAreaHandler, GetUserMusicHandler getUserMusicHandler, GetUserOptionHandler getUserOptionHandler, GetUserPreviewHandler getUserPreviewHandler, GetUserRecentRatingHandler getUserRecentRatingHandler, GetUserRegionHandler getUserRegionHandler, GetUserRivalDataHandler getUserRivalDataHandler, GetUserRivalMusicHandler getUserRivalMusicHandler, GetUserTeamHandler getUserTeamHandler, UpsertUserAllHandler upsertUserAllHandler, UpsertUserChargelogHandler upsertUserChargelogHandler, GetUserSymbolChatSettingHandler getUserSymbolChatSettingHandler) {
|
||||
this.gameLoginHandler = gameLoginHandler;
|
||||
this.gameLogoutHandler = gameLogoutHandler;
|
||||
this.getGameChargeHandler = getGameChargeHandler;
|
||||
this.getGameEventHandler = getGameEventHandler;
|
||||
this.getGameIdlistHandler = getGameIdlistHandler;
|
||||
this.getGameRankingHandler = getGameRankingHandler;
|
||||
this.getGameSettingHandler = getGameSettingHandler;
|
||||
this.getTeamCourseRuleHandler = getTeamCourseRuleHandler;
|
||||
this.getTeamCourseSettingHandler = getTeamCourseSettingHandler;
|
||||
this.getUserActivityHandler = getUserActivityHandler;
|
||||
this.getUserCharacterHandler = getUserCharacterHandler;
|
||||
this.getUserChargeHandler = getUserChargeHandler;
|
||||
this.getUserCourseHandler = getUserCourseHandler;
|
||||
this.getUserDataHandler = getUserDataHandler;
|
||||
this.getUserDuelHandler = getUserDuelHandler;
|
||||
this.getUserFavoriteItemHandler = getUserFavoriteItemHandler;
|
||||
this.getUserItemHandler = getUserItemHandler;
|
||||
this.getUserLoginBonusHandler = getUserLoginBonusHandler;
|
||||
this.getUserMapAreaHandler = getUserMapAreaHandler;
|
||||
this.getUserMusicHandler = getUserMusicHandler;
|
||||
this.getUserOptionHandler = getUserOptionHandler;
|
||||
this.getUserPreviewHandler = getUserPreviewHandler;
|
||||
this.getUserRecentRatingHandler = getUserRecentRatingHandler;
|
||||
this.getUserRegionHandler = getUserRegionHandler;
|
||||
this.getUserRivalDataHandler = getUserRivalDataHandler;
|
||||
this.getUserRivalMusicHandler = getUserRivalMusicHandler;
|
||||
this.getUserTeamHandler = getUserTeamHandler;
|
||||
this.upsertUserAllHandler = upsertUserAllHandler;
|
||||
this.upsertUserChargelogHandler = upsertUserChargelogHandler;
|
||||
this.getUserSymbolChatSettingHandler = getUserSymbolChatSettingHandler;
|
||||
}
|
||||
|
||||
@PostMapping("GameLoginApi")
|
||||
String gameLogin(@ModelAttribute Map<String, Object> request) throws JsonProcessingException {
|
||||
return gameLoginHandler.handle(request);
|
||||
}
|
||||
|
||||
@PostMapping("GameLogoutApi")
|
||||
String gameLogout(@ModelAttribute Map<String, Object> request) throws JsonProcessingException {
|
||||
return gameLogoutHandler.handle(request);
|
||||
}
|
||||
|
||||
@PostMapping("GetGameChargeApi")
|
||||
String getGameCharge(@ModelAttribute Map<String, Object> request) throws JsonProcessingException {
|
||||
return getGameChargeHandler.handle(request);
|
||||
}
|
||||
|
||||
@PostMapping("GetGameEventApi")
|
||||
String getGameEvent(@ModelAttribute Map<String, Object> request) throws JsonProcessingException {
|
||||
return getGameEventHandler.handle(request);
|
||||
}
|
||||
|
||||
@PostMapping("GetGameIdlistApi")
|
||||
String getGameIdList(@ModelAttribute Map<String, Object> request) throws JsonProcessingException {
|
||||
return getGameIdlistHandler.handle(request);
|
||||
}
|
||||
|
||||
@PostMapping("GetGameRankingApi")
|
||||
String getGameRanking(@ModelAttribute Map<String, Object> request) throws JsonProcessingException {
|
||||
return getGameRankingHandler.handle(request);
|
||||
}
|
||||
|
||||
@PostMapping("GetGameSettingApi")
|
||||
String getGameSetting(@ModelAttribute Map<String, Object> request) throws JsonProcessingException {
|
||||
return getGameSettingHandler.handle(request);
|
||||
}
|
||||
|
||||
@PostMapping("GetTeamCourseRuleApi")
|
||||
String getTeamCourseRule(@ModelAttribute Map<String, Object> request) throws JsonProcessingException {
|
||||
return getTeamCourseRuleHandler.handle(request);
|
||||
}
|
||||
|
||||
@PostMapping("GetTeamCourseSettingApi")
|
||||
String getTeamCourseSetting(@ModelAttribute Map<String, Object> request) throws JsonProcessingException {
|
||||
return getTeamCourseSettingHandler.handle(request);
|
||||
}
|
||||
|
||||
@PostMapping("GetUserActivityApi")
|
||||
String getUserActivity(@ModelAttribute Map<String, Object> request) throws JsonProcessingException {
|
||||
return getUserActivityHandler.handle(request);
|
||||
}
|
||||
|
||||
@PostMapping("GetUserCharacterApi")
|
||||
String getUserCharacter(@ModelAttribute Map<String, Object> request) throws JsonProcessingException {
|
||||
return getUserCharacterHandler.handle(request);
|
||||
}
|
||||
|
||||
@PostMapping("GetUserChargeApi")
|
||||
String getUserCharge(@ModelAttribute Map<String, Object> request) throws JsonProcessingException {
|
||||
return getUserChargeHandler.handle(request);
|
||||
}
|
||||
|
||||
@PostMapping("GetUserCourseApi")
|
||||
String getUserCourse(@ModelAttribute Map<String, Object> request) throws JsonProcessingException {
|
||||
return getUserCourseHandler.handle(request);
|
||||
}
|
||||
|
||||
@PostMapping("GetUserDataApi")
|
||||
String getUserData(@ModelAttribute Map<String, Object> request) throws JsonProcessingException {
|
||||
return getUserDataHandler.handle(request);
|
||||
}
|
||||
|
||||
@PostMapping("GetUserDuelApi")
|
||||
String getUserDuel(@ModelAttribute Map<String, Object> request) throws JsonProcessingException {
|
||||
return getUserDuelHandler.handle(request);
|
||||
}
|
||||
|
||||
@PostMapping("GetUserFavoriteItemApi")
|
||||
String getUserFavoriteItem(@ModelAttribute Map<String, Object> request) throws JsonProcessingException {
|
||||
return getUserFavoriteItemHandler.handle(request);
|
||||
}
|
||||
|
||||
@PostMapping("GetUserItemApi")
|
||||
String getUserItem(@ModelAttribute Map<String, Object> request) throws JsonProcessingException {
|
||||
return getUserItemHandler.handle(request);
|
||||
}
|
||||
|
||||
@PostMapping("GetUserLoginBonusApi")
|
||||
String getUserLoginBonus(@ModelAttribute Map<String, Object> request) throws JsonProcessingException {
|
||||
return getUserLoginBonusHandler.handle(request);
|
||||
}
|
||||
|
||||
@PostMapping("GetUserMapAreaApi")
|
||||
String getUserMap(@ModelAttribute Map<String, Object> request) throws JsonProcessingException {
|
||||
return getUserMapAreaHandler.handle(request);
|
||||
}
|
||||
|
||||
@PostMapping("GetUserMusicApi")
|
||||
String getUserMusic(@ModelAttribute Map<String, Object> request) throws JsonProcessingException {
|
||||
return getUserMusicHandler.handle(request);
|
||||
}
|
||||
|
||||
@PostMapping("GetUserOptionApi")
|
||||
String getUserOption(@ModelAttribute Map<String, Object> request) throws JsonProcessingException {
|
||||
return getUserOptionHandler.handle(request);
|
||||
}
|
||||
|
||||
// Call when login. Return null if no profile exist
|
||||
@PostMapping("GetUserPreviewApi")
|
||||
String getUserPreview(@ModelAttribute Map<String, Object> request) throws JsonProcessingException {
|
||||
return getUserPreviewHandler.handle(request);
|
||||
}
|
||||
|
||||
@PostMapping("GetUserRecentRatingApi")
|
||||
String getUserRecentRating(@ModelAttribute Map<String, Object> request) throws JsonProcessingException {
|
||||
return getUserRecentRatingHandler.handle(request);
|
||||
}
|
||||
|
||||
@PostMapping("GetUserRegionApi")
|
||||
String getUserRegion(@ModelAttribute Map<String, Object> request) throws JsonProcessingException {
|
||||
return getUserRegionHandler.handle(request);
|
||||
}
|
||||
|
||||
@PostMapping("GetUserRivalDataApi")
|
||||
String getUserRivalData(@ModelAttribute Map<String, Object> request) throws JsonProcessingException {
|
||||
return getUserRivalDataHandler.handle(request);
|
||||
}
|
||||
@PostMapping("GetUserRivalMusicApi")
|
||||
String getUserRivalMusic(@ModelAttribute Map<String, Object> request) throws JsonProcessingException {
|
||||
return getUserRivalMusicHandler.handle(request);
|
||||
}
|
||||
|
||||
@PostMapping("GetUserTeamApi")
|
||||
String getUserTeam(@ModelAttribute Map<String, Object> request) throws JsonProcessingException {
|
||||
return getUserTeamHandler.handle(request);
|
||||
}
|
||||
|
||||
@PostMapping("GetUserSymbolChatSettingApi")
|
||||
String getUserSymbolChatSetting(@ModelAttribute Map<String, Object> request) throws JsonProcessingException {
|
||||
return getUserSymbolChatSettingHandler.handle(request);
|
||||
}
|
||||
|
||||
@PostMapping("UpsertClientBookkeepingApi")
|
||||
String upsertClientBookkeeping(@ModelAttribute Map<String, Object> request) {
|
||||
return "{\"returnCode\":\"1\"}";
|
||||
}
|
||||
|
||||
@PostMapping("UpsertClientDevelopApi")
|
||||
String upsertClientDevelop(@ModelAttribute Map<String, Object> request) {
|
||||
return "{\"returnCode\":\"1\"}";
|
||||
}
|
||||
|
||||
@PostMapping("UpsertClientErrorApi")
|
||||
String upsertClientError(@ModelAttribute Map<String, Object> request) {
|
||||
return "{\"returnCode\":\"1\"}";
|
||||
}
|
||||
|
||||
@PostMapping("UpsertClientSettingApi")
|
||||
String upsertClientSetting(@ModelAttribute Map<String, Object> request) {
|
||||
return "{\"returnCode\":\"1\"}";
|
||||
}
|
||||
|
||||
@PostMapping("UpsertClientTestmodeApi")
|
||||
String upsertClientTestmode(@ModelAttribute Map<String, Object> request) {
|
||||
return "{\"returnCode\":\"1\"}";
|
||||
}
|
||||
|
||||
@PostMapping("UpsertUserAllApi")
|
||||
String upsertUserAll(@ModelAttribute Map<String, Object> request) throws JsonProcessingException {
|
||||
return upsertUserAllHandler.handle(request);
|
||||
}
|
||||
|
||||
@PostMapping("UpsertUserChargelogApi")
|
||||
String upsertUserChargelog(@ModelAttribute Map<String, Object> request) throws JsonProcessingException {
|
||||
return upsertUserChargelogHandler.handle(request);
|
||||
}
|
||||
|
||||
@PostMapping("CreateTokenApi")
|
||||
String createToken(@ModelAttribute Map<String, Object> request) {
|
||||
return "{\"returnCode\":\"1\"}";
|
||||
}
|
||||
|
||||
@PostMapping("RemoveTokenApi")
|
||||
String removeToken(@ModelAttribute Map<String, Object> request) {
|
||||
return "{\"returnCode\":\"1\"}";
|
||||
}
|
||||
|
||||
@PostMapping("UpsertClientUploadApi")
|
||||
String upsertClientUpload(@ModelAttribute Map<String, Object> request) {
|
||||
return "{\"returnCode\":\"1\"}";
|
||||
}
|
||||
|
||||
@PostMapping("MatchingServer/Ping")
|
||||
String ping(@ModelAttribute Map<String, Object> request) {
|
||||
return "{\"returnCode\":\"1\"}";
|
||||
}
|
||||
|
||||
/* TBD matching endpoints
|
||||
|
||||
@PostMapping("MatchingServer/BeginMatchingApi")
|
||||
|
||||
@PostMapping("MatchingServer/EndMatchingApi")
|
||||
|
||||
@PostMapping("MatchingServer/BeginMatchingApi")
|
||||
|
||||
@PostMapping("MatchingServer/RemoveMatchingMemberApi")
|
||||
|
||||
@PostMapping("GetMatchingStateApi")
|
||||
|
||||
*/
|
||||
|
||||
}
|
||||
@ -0,0 +1,38 @@
|
||||
package icu.samnyan.aqua.sega.chusan.controller;
|
||||
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||
import org.springframework.web.bind.annotation.RestControllerAdvice;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.io.IOException;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@RestControllerAdvice(basePackages = "icu.samnyan.aqua.sega.chusan")
|
||||
public class ChusanServletControllerAdvice {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(ChusanServletControllerAdvice.class);
|
||||
|
||||
/**
|
||||
* Get the map object from json string
|
||||
*
|
||||
* @param request HttpServletRequest
|
||||
*/
|
||||
@ModelAttribute
|
||||
public Map<String, Object> preHandle(HttpServletRequest request) throws IOException {
|
||||
byte[] src = request.getInputStream().readAllBytes();
|
||||
String outputString = new String(src, StandardCharsets.UTF_8).trim();
|
||||
logger.info("Request {} : {}", request.getRequestURI(), outputString);
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
|
||||
return mapper.readValue(outputString, new TypeReference<>() {
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,12 @@
|
||||
package icu.samnyan.aqua.sega.chusan.dao.gamedata;
|
||||
|
||||
import icu.samnyan.aqua.sega.chusan.model.gamedata.GameCharge;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Repository("ChusanGameChargeRepository")
|
||||
public interface GameChargeRepository extends JpaRepository<GameCharge, Long> {
|
||||
}
|
||||
@ -0,0 +1,16 @@
|
||||
package icu.samnyan.aqua.sega.chusan.dao.gamedata;
|
||||
|
||||
import icu.samnyan.aqua.sega.chusan.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("ChusanGameEventRepository")
|
||||
public interface GameEventRepository extends JpaRepository<GameEvent, Integer> {
|
||||
|
||||
List<GameEvent> findByEnable(boolean enable);
|
||||
}
|
||||
@ -0,0 +1,22 @@
|
||||
package icu.samnyan.aqua.sega.chusan.dao.userdata;
|
||||
|
||||
import icu.samnyan.aqua.sega.chusan.model.userdata.UserActivity;
|
||||
import icu.samnyan.aqua.sega.chusan.model.userdata.UserData;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Repository("ChusanUserActivityRepository")
|
||||
public interface UserActivityRepository extends JpaRepository<UserActivity, Long> {
|
||||
|
||||
Optional<UserActivity> findTopByUserAndActivityIdAndKindOrderByIdDesc(UserData user, int activityId, int kind);
|
||||
|
||||
List<UserActivity> findAllByUser_Card_ExtIdAndKindOrderBySortNumberDesc(Long extId, int kind);
|
||||
|
||||
List<UserActivity> findAllByUser_Card_ExtId(Long extId);
|
||||
}
|
||||
@ -0,0 +1,27 @@
|
||||
package icu.samnyan.aqua.sega.chusan.dao.userdata;
|
||||
|
||||
import icu.samnyan.aqua.sega.chusan.model.userdata.UserCharacter;
|
||||
import icu.samnyan.aqua.sega.chusan.model.userdata.UserData;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Repository("ChusanUserCharacterRepository")
|
||||
public interface UserCharacterRepository extends JpaRepository<UserCharacter, Long> {
|
||||
|
||||
Page<UserCharacter> findByUser_Card_ExtId(Long extId, Pageable pageable);
|
||||
|
||||
List<UserCharacter> findByUser_Card_ExtId(Long extId);
|
||||
|
||||
Optional<UserCharacter> findTopByUserAndCharacterIdOrderByIdDesc(UserData user, int characterId);
|
||||
|
||||
Optional<UserCharacter> findByUser_Card_ExtIdAndCharacterId(Long extId, int characterId);
|
||||
|
||||
}
|
||||
@ -0,0 +1,19 @@
|
||||
package icu.samnyan.aqua.sega.chusan.dao.userdata;
|
||||
|
||||
import icu.samnyan.aqua.sega.chusan.model.userdata.UserCharge;
|
||||
import icu.samnyan.aqua.sega.chusan.model.userdata.UserData;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Repository("ChusanUserChargeRepository")
|
||||
public interface UserChargeRepository extends JpaRepository<UserCharge, Long> {
|
||||
List<UserCharge> findByUser_Card_ExtId(Long extId);
|
||||
|
||||
Optional<UserCharge> findByUserAndChargeId(UserData extId, int chargeId);
|
||||
}
|
||||
@ -0,0 +1,23 @@
|
||||
package icu.samnyan.aqua.sega.chusan.dao.userdata;
|
||||
|
||||
import icu.samnyan.aqua.sega.chusan.model.userdata.UserCourse;
|
||||
import icu.samnyan.aqua.sega.chusan.model.userdata.UserData;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Repository("ChusanUserCourseRepository")
|
||||
public interface UserCourseRepository extends JpaRepository<UserCourse, Long> {
|
||||
Optional<UserCourse> findTopByUserAndCourseIdOrderByIdDesc(UserData user, int courseId);
|
||||
|
||||
Page<UserCourse> findByUser_Card_ExtId(Long extId, Pageable page);
|
||||
|
||||
List<UserCourse> findByUser_Card_ExtId(Long extId);
|
||||
}
|
||||
@ -0,0 +1,19 @@
|
||||
package icu.samnyan.aqua.sega.chusan.dao.userdata;
|
||||
|
||||
import icu.samnyan.aqua.sega.chusan.model.userdata.UserData;
|
||||
import icu.samnyan.aqua.sega.general.model.Card;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Repository("ChusanUserDataRepository")
|
||||
public interface UserDataRepository extends JpaRepository<UserData, Long> {
|
||||
|
||||
Optional<UserData> findByCard(Card card);
|
||||
|
||||
Optional<UserData> findByCard_ExtId(Long extId);
|
||||
}
|
||||
@ -0,0 +1,20 @@
|
||||
package icu.samnyan.aqua.sega.chusan.dao.userdata;
|
||||
|
||||
import icu.samnyan.aqua.sega.chusan.model.userdata.UserData;
|
||||
import icu.samnyan.aqua.sega.chusan.model.userdata.UserDuel;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Repository("ChusanUserDuelRepository")
|
||||
public interface UserDuelRepository extends JpaRepository<UserDuel, Long> {
|
||||
|
||||
Optional<UserDuel> findTopByUserAndDuelIdOrderByIdDesc(UserData user, int duelId);
|
||||
|
||||
List<UserDuel> findByUser_Card_ExtId(Long extId);
|
||||
}
|
||||
@ -0,0 +1,19 @@
|
||||
package icu.samnyan.aqua.sega.chusan.dao.userdata;
|
||||
|
||||
import icu.samnyan.aqua.sega.chusan.model.userdata.UserData;
|
||||
import icu.samnyan.aqua.sega.chusan.model.userdata.UserGameOption;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Repository("ChusanUserGameOptionRepository")
|
||||
public interface UserGameOptionRepository extends JpaRepository<UserGameOption, Long> {
|
||||
|
||||
Optional<UserGameOption> findByUser(UserData user);
|
||||
|
||||
Optional<UserGameOption> findByUser_Card_ExtId(Long extId);
|
||||
}
|
||||
@ -0,0 +1,20 @@
|
||||
package icu.samnyan.aqua.sega.chusan.dao.userdata;
|
||||
|
||||
import icu.samnyan.aqua.sega.chusan.model.userdata.UserData;
|
||||
import icu.samnyan.aqua.sega.chusan.model.userdata.UserGeneralData;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Repository("ChusanUserGeneralDataRepository")
|
||||
public interface UserGeneralDataRepository extends JpaRepository<UserGeneralData, Long> {
|
||||
|
||||
Optional<UserGeneralData> findByUserAndPropertyKey(UserData user, String key);
|
||||
|
||||
Optional<UserGeneralData> findByUser_Card_ExtIdAndPropertyKey(Long extId, String key);
|
||||
|
||||
}
|
||||
@ -0,0 +1,26 @@
|
||||
package icu.samnyan.aqua.sega.chusan.dao.userdata;
|
||||
|
||||
import icu.samnyan.aqua.sega.chusan.model.userdata.UserData;
|
||||
import icu.samnyan.aqua.sega.chusan.model.userdata.UserItem;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Repository("ChusanUserItemRepository")
|
||||
public interface UserItemRepository extends JpaRepository<UserItem, Long> {
|
||||
|
||||
Optional<UserItem> findTopByUserAndItemIdAndItemKindOrderByIdDesc(UserData user, int itemId, int itemKind);
|
||||
|
||||
Page<UserItem> findAllByUser_Card_ExtIdAndItemKind(Long extId, int itemKind, Pageable pageable);
|
||||
|
||||
List<UserItem> findAllByUser_Card_ExtId(Long extId);
|
||||
|
||||
Page<UserItem> findByUser_Card_ExtId(Long extId, Pageable pageable);
|
||||
}
|
||||
@ -0,0 +1,21 @@
|
||||
package icu.samnyan.aqua.sega.chusan.dao.userdata;
|
||||
|
||||
import icu.samnyan.aqua.sega.chusan.model.userdata.UserData;
|
||||
import icu.samnyan.aqua.sega.chusan.model.userdata.UserMapArea;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Repository
|
||||
public interface UserMapAreaRepository extends JpaRepository<UserMapArea, Long> {
|
||||
List<UserMapArea> findAllByUser(UserData user);
|
||||
|
||||
List<UserMapArea> findAllByUser_Card_ExtId(Long extId);
|
||||
|
||||
Optional<UserMapArea> findTopByUserAndMapAreaIdOrderByIdDesc(UserData user, int mapAreaId);
|
||||
}
|
||||
@ -0,0 +1,26 @@
|
||||
package icu.samnyan.aqua.sega.chusan.dao.userdata;
|
||||
|
||||
import icu.samnyan.aqua.sega.chusan.model.userdata.UserData;
|
||||
import icu.samnyan.aqua.sega.chusan.model.userdata.UserMusicDetail;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Repository("ChusanUserMusicDetailRepository")
|
||||
public interface UserMusicDetailRepository extends JpaRepository<UserMusicDetail, Long> {
|
||||
|
||||
Optional<UserMusicDetail> findTopByUserAndMusicIdAndLevelOrderByIdDesc(UserData user, int musicId, int level);
|
||||
|
||||
List<UserMusicDetail> findByUser_Card_ExtId(Long extId);
|
||||
|
||||
List<UserMusicDetail> findByUser_Card_ExtIdAndMusicId(Long extId, int musicId);
|
||||
|
||||
Page<UserMusicDetail> findByUser_Card_ExtId(Long extId, Pageable page);
|
||||
}
|
||||
@ -0,0 +1,23 @@
|
||||
package icu.samnyan.aqua.sega.chusan.dao.userdata;
|
||||
|
||||
import icu.samnyan.aqua.sega.chusan.model.userdata.UserPlaylog;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Repository("ChusanUserPlaylogRepository")
|
||||
public interface UserPlaylogRepository extends JpaRepository<UserPlaylog, Long> {
|
||||
List<UserPlaylog> findByUser_Card_ExtIdAndLevelNot(Long extId, int levelNot, Pageable page);
|
||||
|
||||
Page<UserPlaylog> findByUser_Card_ExtId(Long extId, Pageable page);
|
||||
|
||||
List<UserPlaylog> findByUser_Card_ExtIdAndMusicIdAndLevel(Long extId, int musicId, int level);
|
||||
|
||||
List<UserPlaylog> findByUser_Card_ExtId(Long extId);
|
||||
}
|
||||
@ -0,0 +1,13 @@
|
||||
package icu.samnyan.aqua.sega.chusan.handler;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
public interface BaseHandler {
|
||||
|
||||
String handle(Map<String, Object> request) throws JsonProcessingException;
|
||||
}
|
||||
@ -0,0 +1,43 @@
|
||||
package icu.samnyan.aqua.sega.chusan.handler.impl;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import icu.samnyan.aqua.sega.chusan.handler.BaseHandler;
|
||||
import icu.samnyan.aqua.sega.chusan.model.response.CodeResp;
|
||||
import icu.samnyan.aqua.sega.chusan.model.userdata.UserData;
|
||||
import icu.samnyan.aqua.sega.chusan.service.UserDataService;
|
||||
import icu.samnyan.aqua.sega.util.jackson.StringMapper;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Component("ChusanGameLoginHandler")
|
||||
public class GameLoginHandler implements BaseHandler {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(GameLoginHandler.class);
|
||||
|
||||
private final StringMapper mapper;
|
||||
|
||||
private final UserDataService userDataService;
|
||||
|
||||
public GameLoginHandler(StringMapper mapper, UserDataService userDataService) {
|
||||
this.mapper = mapper;
|
||||
this.userDataService = userDataService;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String handle(Map<String, Object> request) throws JsonProcessingException {
|
||||
String userId = (String) request.get("userId");
|
||||
Optional<UserData> userDataOptional = userDataService.getUserByExtId(userId);
|
||||
userDataOptional.ifPresent(userDataService::updateLoginTime);
|
||||
|
||||
String json = mapper.write(new CodeResp(1));
|
||||
logger.info("Response: " + json);
|
||||
return json;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,34 @@
|
||||
package icu.samnyan.aqua.sega.chusan.handler.impl;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import icu.samnyan.aqua.sega.chusan.handler.BaseHandler;
|
||||
import icu.samnyan.aqua.sega.chusan.model.response.CodeResp;
|
||||
import icu.samnyan.aqua.sega.util.jackson.StringMapper;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Component("ChusanGameLogoutHandler")
|
||||
public class GameLogoutHandler implements BaseHandler {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(GameLogoutHandler.class);
|
||||
|
||||
private final StringMapper mapper;
|
||||
|
||||
public GameLogoutHandler(StringMapper mapper) {
|
||||
this.mapper = mapper;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String handle(Map<String, Object> request) throws JsonProcessingException {
|
||||
|
||||
String json = mapper.write(new CodeResp(1));
|
||||
logger.info("Response: " + json);
|
||||
return json;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,46 @@
|
||||
package icu.samnyan.aqua.sega.chusan.handler.impl;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import icu.samnyan.aqua.sega.chusan.dao.gamedata.GameChargeRepository;
|
||||
import icu.samnyan.aqua.sega.chusan.handler.BaseHandler;
|
||||
import icu.samnyan.aqua.sega.chusan.model.gamedata.GameCharge;
|
||||
import icu.samnyan.aqua.sega.util.jackson.StringMapper;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Component("ChusanGetGameChargeHandler")
|
||||
public class GetGameChargeHandler implements BaseHandler {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(GetGameChargeHandler.class);
|
||||
private final GameChargeRepository gameChargeRepository;
|
||||
private final StringMapper mapper;
|
||||
|
||||
@Autowired
|
||||
public GetGameChargeHandler(GameChargeRepository gameChargeRepository, StringMapper mapper) {
|
||||
this.gameChargeRepository = gameChargeRepository;
|
||||
this.mapper = mapper;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String handle(Map<String, Object> request) throws JsonProcessingException {
|
||||
|
||||
List<GameCharge> gameChargeList = gameChargeRepository.findAll();
|
||||
|
||||
Map<String, Object> resultMap = new LinkedHashMap<>();
|
||||
resultMap.put("length", gameChargeList.size());
|
||||
resultMap.put("gameChargeList", gameChargeList);
|
||||
|
||||
String json = mapper.write(resultMap);
|
||||
logger.info("Response: " + json);
|
||||
return json;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,50 @@
|
||||
package icu.samnyan.aqua.sega.chusan.handler.impl;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import icu.samnyan.aqua.sega.chusan.dao.gamedata.GameEventRepository;
|
||||
import icu.samnyan.aqua.sega.chusan.handler.BaseHandler;
|
||||
import icu.samnyan.aqua.sega.chusan.model.gamedata.GameEvent;
|
||||
import icu.samnyan.aqua.sega.util.jackson.StringMapper;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Component("ChusanGetGameEventHandler")
|
||||
public class GetGameEventHandler implements BaseHandler {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(GetGameEventHandler.class);
|
||||
|
||||
private final GameEventRepository gameEventRepository;
|
||||
|
||||
private final StringMapper mapper;
|
||||
|
||||
@Autowired
|
||||
public GetGameEventHandler(GameEventRepository gameEventRepository, StringMapper mapper) {
|
||||
this.gameEventRepository = gameEventRepository;
|
||||
this.mapper = mapper;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String handle(Map<String, Object> request) throws JsonProcessingException {
|
||||
String type = (String) request.get("type");
|
||||
|
||||
List<GameEvent> gameEventList = gameEventRepository.findByEnable(true);
|
||||
|
||||
Map<String, Object> resultMap = new LinkedHashMap<>();
|
||||
resultMap.put("type", type);
|
||||
resultMap.put("length", gameEventList.size());
|
||||
resultMap.put("gameEventList", gameEventList);
|
||||
|
||||
String json = mapper.write(resultMap);
|
||||
logger.info("Response: " + json);
|
||||
return json;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,47 @@
|
||||
package icu.samnyan.aqua.sega.chusan.handler.impl;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import icu.samnyan.aqua.sega.chusan.handler.BaseHandler;
|
||||
import icu.samnyan.aqua.sega.util.jackson.StringMapper;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Component("ChusanGetGameIdlistHandler")
|
||||
public class GetGameIdlistHandler implements BaseHandler {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(GetGameIdlistHandler.class);
|
||||
|
||||
private final StringMapper mapper;
|
||||
|
||||
@Autowired
|
||||
public GetGameIdlistHandler(StringMapper mapper) {
|
||||
this.mapper = mapper;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String handle(Map<String, Object> request) throws JsonProcessingException {
|
||||
String type = (String) request.get("type");
|
||||
|
||||
List<Object> gameIdlistList = new ArrayList<>();
|
||||
|
||||
Map<String, Object> resultMap = new LinkedHashMap<>();
|
||||
resultMap.put("type", type);
|
||||
resultMap.put("length", 0);
|
||||
resultMap.put("gameIdlistList", gameIdlistList);
|
||||
|
||||
String json = mapper.write(resultMap);
|
||||
logger.info("Response: " + json);
|
||||
return json;
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,44 @@
|
||||
package icu.samnyan.aqua.sega.chusan.handler.impl;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
|
||||
import icu.samnyan.aqua.sega.chusan.handler.BaseHandler;
|
||||
import icu.samnyan.aqua.sega.util.jackson.StringMapper;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Component("ChusanGetGameRankingHandler")
|
||||
public class GetGameRankingHandler implements BaseHandler {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(GetGameRankingHandler.class);
|
||||
|
||||
private final StringMapper mapper;
|
||||
|
||||
@Autowired
|
||||
public GetGameRankingHandler(StringMapper mapper) {
|
||||
this.mapper = mapper;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String handle(Map<String, Object> request) throws JsonProcessingException {
|
||||
String type = (String) request.get("type");
|
||||
|
||||
Map<String, Object> resultMap = new LinkedHashMap<>();
|
||||
resultMap.put("type", type);
|
||||
resultMap.put("length", 0);
|
||||
resultMap.put("gameRankingList", List.of());
|
||||
|
||||
String json = mapper.write(resultMap);
|
||||
logger.info("Response: " + json);
|
||||
return json;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,99 @@
|
||||
package icu.samnyan.aqua.sega.chusan.handler.impl;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import icu.samnyan.aqua.sega.chusan.handler.BaseHandler;
|
||||
import icu.samnyan.aqua.sega.chusan.model.response.GetGameSettingResp;
|
||||
import icu.samnyan.aqua.sega.chusan.model.response.data.GameSetting;
|
||||
import icu.samnyan.aqua.sega.util.jackson.StringMapper;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.net.InetAddress;
|
||||
import java.net.UnknownHostException;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Component("ChusanGetGameSettingHandler")
|
||||
public class GetGameSettingHandler implements BaseHandler {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(GetGameSettingHandler.class);
|
||||
|
||||
private final StringMapper mapper;
|
||||
|
||||
private final String ALLNET_HOST;
|
||||
private final String ALLNET_PORT;
|
||||
private final String SERVER_PORT;
|
||||
private final String GAME_VERSION;
|
||||
|
||||
@Autowired
|
||||
public GetGameSettingHandler(StringMapper mapper, @Value("${allnet.server.host:}") String ALLNET_HOST, @Value("${allnet.server.port:}") String ALLNET_PORT, @Value("${server.port:}") String SERVER_PORT, @Value("${game.chusan.version:2.00.00}") String GAME_VERSION) {
|
||||
this.mapper = mapper;
|
||||
this.ALLNET_HOST = ALLNET_HOST;
|
||||
this.ALLNET_PORT = ALLNET_PORT;
|
||||
this.SERVER_PORT = SERVER_PORT;
|
||||
this.GAME_VERSION = GAME_VERSION;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String handle(Map<String, Object> request) throws JsonProcessingException {
|
||||
|
||||
// Fixed reboot time triggers chusan maintenance lockout, so let's try minime method which sets it dynamically
|
||||
// Special thanks to skogaby
|
||||
|
||||
// Hardcode so that the reboot time always started 3 hours ago and ended 2 hours ago
|
||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("uuuu-MM-dd HH:mm:ss");
|
||||
LocalDateTime rebootStartTime = LocalDateTime.now().minusHours(3);
|
||||
LocalDateTime rebootEndTime = LocalDateTime.now().minusHours(2);
|
||||
|
||||
// Unless ip and port is explicitly overridden, use the guessed ip and port as same as AllNet Controller does.
|
||||
String localAddr;
|
||||
try {
|
||||
localAddr = InetAddress.getLocalHost().getHostAddress();
|
||||
} catch (UnknownHostException e) {
|
||||
// If above didn't work then how did this run? I really don't know.
|
||||
localAddr = "localhost";
|
||||
}
|
||||
|
||||
String addr = ALLNET_HOST.equals("") ? localAddr : ALLNET_HOST;
|
||||
String port = ALLNET_PORT.equals("") ? SERVER_PORT : ALLNET_PORT;
|
||||
|
||||
GameSetting gameSetting = new GameSetting(
|
||||
"2.00.01",
|
||||
GAME_VERSION, // Chusan checks server version and disables some game modes if it not same
|
||||
false,
|
||||
0,
|
||||
rebootStartTime.format(formatter),
|
||||
rebootEndTime.format(formatter),
|
||||
false,
|
||||
300,
|
||||
300,
|
||||
300,
|
||||
rebootStartTime.format(formatter),
|
||||
rebootEndTime.format(formatter),
|
||||
10,
|
||||
1,
|
||||
"http://" + addr + ":" + port + "/ChusanServlet/",
|
||||
"http://" + addr + ":" + port + "/ChusanServlet/",
|
||||
"http://" + addr + ":" + port + "/ChusanServlet/"
|
||||
);
|
||||
|
||||
GetGameSettingResp resp = new GetGameSettingResp(
|
||||
gameSetting,
|
||||
false,
|
||||
false
|
||||
);
|
||||
|
||||
String json = mapper.write(resp);
|
||||
|
||||
logger.info("Response: " + json);
|
||||
return json;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,38 @@
|
||||
package icu.samnyan.aqua.sega.chusan.handler.impl;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import icu.samnyan.aqua.sega.chusan.handler.BaseHandler;
|
||||
import icu.samnyan.aqua.sega.util.jackson.StringMapper;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
@Component("ChusanGetTeamCourseRuleHandler")
|
||||
public class GetTeamCourseRuleHandler implements BaseHandler {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(GetTeamCourseRuleHandler.class);
|
||||
|
||||
private final StringMapper mapper;
|
||||
|
||||
|
||||
public GetTeamCourseRuleHandler(StringMapper mapper) {
|
||||
this.mapper = mapper;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String handle(Map<String, Object> request) throws JsonProcessingException {
|
||||
String userId = (String) request.get("userId");
|
||||
|
||||
Map<String, Object> resultMap = new LinkedHashMap<>();
|
||||
resultMap.put("userId", userId);
|
||||
resultMap.put("length", 0);
|
||||
resultMap.put("nextIndex", 0);
|
||||
resultMap.put("teamCourseRuleList", List.of());
|
||||
|
||||
String json = mapper.write(resultMap);
|
||||
logger.info("Response: " + json);
|
||||
return json;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,41 @@
|
||||
package icu.samnyan.aqua.sega.chusan.handler.impl;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import icu.samnyan.aqua.sega.chusan.handler.BaseHandler;
|
||||
import icu.samnyan.aqua.sega.util.jackson.StringMapper;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Component("ChusanGetTeamCourseSettingHandler")
|
||||
public class GetTeamCourseSettingHandler implements BaseHandler {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(GetTeamCourseSettingHandler.class);
|
||||
|
||||
private final StringMapper mapper;
|
||||
|
||||
|
||||
public GetTeamCourseSettingHandler(StringMapper mapper) {
|
||||
this.mapper = mapper;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String handle(Map<String, Object> request) throws JsonProcessingException {
|
||||
String userId = (String) request.get("userId");
|
||||
|
||||
|
||||
Map<String, Object> resultMap = new LinkedHashMap<>();
|
||||
resultMap.put("userId", userId);
|
||||
resultMap.put("length", 0);
|
||||
resultMap.put("nextIndex", 0);
|
||||
resultMap.put("teamCourseSettingList", List.of());
|
||||
|
||||
String json = mapper.write(resultMap);
|
||||
logger.info("Response: " + json);
|
||||
return json;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,53 @@
|
||||
package icu.samnyan.aqua.sega.chusan.handler.impl;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import icu.samnyan.aqua.sega.chusan.handler.BaseHandler;
|
||||
import icu.samnyan.aqua.sega.chusan.model.userdata.UserActivity;
|
||||
import icu.samnyan.aqua.sega.chusan.service.UserActivityService;
|
||||
import icu.samnyan.aqua.sega.util.jackson.StringMapper;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Component("ChusanGetUserActivityHandler")
|
||||
public class GetUserActivityHandler implements BaseHandler {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(GetUserActivityHandler.class);
|
||||
|
||||
private final StringMapper mapper;
|
||||
|
||||
private final UserActivityService userActivityService;
|
||||
|
||||
@Autowired
|
||||
public GetUserActivityHandler(StringMapper mapper, UserActivityService userActivityService) {
|
||||
this.mapper = mapper;
|
||||
this.userActivityService = userActivityService;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String handle(Map<String, Object> request) throws JsonProcessingException {
|
||||
String userId = (String) request.get("userId");
|
||||
String kind = (String) request.get("kind");
|
||||
|
||||
List<UserActivity> userActivityList = userActivityService.getAllByUserIdAndKind(userId, kind);
|
||||
|
||||
Map<String, Object> resultMap = new LinkedHashMap<>();
|
||||
resultMap.put("userId", userId);
|
||||
resultMap.put("length", userActivityList.size());
|
||||
resultMap.put("kind", kind);
|
||||
resultMap.put("userActivityList", userActivityList);
|
||||
|
||||
String json = mapper.write(resultMap);
|
||||
logger.info("Response: " + json);
|
||||
return json;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,60 @@
|
||||
package icu.samnyan.aqua.sega.chusan.handler.impl;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import icu.samnyan.aqua.sega.chusan.handler.BaseHandler;
|
||||
import icu.samnyan.aqua.sega.chusan.model.userdata.UserCharacter;
|
||||
import icu.samnyan.aqua.sega.chusan.service.UserCharacterService;
|
||||
import icu.samnyan.aqua.sega.util.jackson.StringMapper;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Handle getUserCharacter request
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Component("ChusanGetUserCharacterHandler")
|
||||
public class GetUserCharacterHandler implements BaseHandler {
|
||||
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(GetUserCharacterHandler.class);
|
||||
|
||||
private final StringMapper mapper;
|
||||
|
||||
private final UserCharacterService userCharacterService;
|
||||
|
||||
|
||||
@Autowired
|
||||
public GetUserCharacterHandler(StringMapper mapper, UserCharacterService userCharacterService) {
|
||||
this.mapper = mapper;
|
||||
this.userCharacterService = userCharacterService;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String handle(Map<String, Object> request) throws JsonProcessingException {
|
||||
String userId = (String) request.get("userId");
|
||||
int nextIndex = Integer.parseInt((String) request.get("nextIndex"));
|
||||
int maxCount = Integer.parseInt((String) request.get("maxCount"));
|
||||
|
||||
int pageNum = nextIndex / maxCount;
|
||||
|
||||
Page<UserCharacter> dbPage = userCharacterService.getByUserId(userId, pageNum, maxCount);
|
||||
|
||||
long currentIndex = maxCount * pageNum + dbPage.getNumberOfElements();
|
||||
|
||||
Map<String, Object> resultMap = new LinkedHashMap<>();
|
||||
resultMap.put("userId", userId);
|
||||
resultMap.put("length", dbPage.getNumberOfElements());
|
||||
resultMap.put("nextIndex", dbPage.getNumberOfElements() < maxCount ? -1 : currentIndex);
|
||||
resultMap.put("userCharacterList", dbPage.getContent());
|
||||
|
||||
String json = mapper.write(resultMap);
|
||||
logger.info("Response: " + json);
|
||||
return json;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,50 @@
|
||||
package icu.samnyan.aqua.sega.chusan.handler.impl;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import icu.samnyan.aqua.sega.chusan.handler.BaseHandler;
|
||||
import icu.samnyan.aqua.sega.chusan.model.userdata.UserCharge;
|
||||
import icu.samnyan.aqua.sega.chusan.service.UserChargeService;
|
||||
import icu.samnyan.aqua.sega.util.jackson.StringMapper;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Component("ChusanGetUserChargeHandler")
|
||||
public class GetUserChargeHandler implements BaseHandler {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(GetUserChargeHandler.class);
|
||||
|
||||
private final StringMapper mapper;
|
||||
|
||||
private final UserChargeService userChargeService;
|
||||
|
||||
@Autowired
|
||||
public GetUserChargeHandler(StringMapper mapper, UserChargeService userChargeService) {
|
||||
this.mapper = mapper;
|
||||
this.userChargeService = userChargeService;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String handle(Map<String, Object> request) throws JsonProcessingException {
|
||||
String userId = (String) request.get("userId");
|
||||
|
||||
List<UserCharge> userChargeList = userChargeService.getByUserId(userId);
|
||||
|
||||
Map<String, Object> resultMap = new LinkedHashMap<>();
|
||||
resultMap.put("userId", userId);
|
||||
resultMap.put("length", userChargeList.size());
|
||||
resultMap.put("userChargeList", userChargeList);
|
||||
|
||||
String json = mapper.write(resultMap);
|
||||
logger.info("Response: " + json);
|
||||
return json;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,67 @@
|
||||
package icu.samnyan.aqua.sega.chusan.handler.impl;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import icu.samnyan.aqua.sega.chusan.handler.BaseHandler;
|
||||
import icu.samnyan.aqua.sega.chusan.model.userdata.UserCourse;
|
||||
import icu.samnyan.aqua.sega.chusan.service.UserCourseService;
|
||||
import icu.samnyan.aqua.sega.util.jackson.StringMapper;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Handle GetUserCourse request
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Component("ChusanGetUserCourseHandler")
|
||||
public class GetUserCourseHandler implements BaseHandler {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(GetUserCourseHandler.class);
|
||||
|
||||
private final StringMapper mapper;
|
||||
|
||||
private final UserCourseService userCourseService;
|
||||
|
||||
@Autowired
|
||||
public GetUserCourseHandler(StringMapper mapper, UserCourseService userCourseService) {
|
||||
this.mapper = mapper;
|
||||
this.userCourseService = userCourseService;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String handle(Map<String, Object> request) throws JsonProcessingException {
|
||||
String userId = (String) request.get("userId");
|
||||
|
||||
Map<String, Object> resultMap = new LinkedHashMap<>();
|
||||
resultMap.put("userId", userId);
|
||||
|
||||
if(request.containsKey("nextIndex")) {
|
||||
int nextIndex = Integer.parseInt((String) request.get("nextIndex"));
|
||||
int maxCount = Integer.parseInt((String) request.get("maxCount"));
|
||||
|
||||
int pageNum = nextIndex / maxCount;
|
||||
|
||||
Page<UserCourse> dbPage = userCourseService.getByUserId(userId, pageNum, maxCount);
|
||||
|
||||
long currentIndex = maxCount * pageNum + dbPage.getNumberOfElements();
|
||||
|
||||
resultMap.put("length", dbPage.getNumberOfElements());
|
||||
resultMap.put("nextIndex", dbPage.getNumberOfElements() < maxCount ? -1 : currentIndex);
|
||||
resultMap.put("userCourseList", dbPage.getContent());
|
||||
} else {
|
||||
List<UserCourse> courseList = userCourseService.getByUserId(userId);
|
||||
resultMap.put("length", courseList.size());
|
||||
resultMap.put("userCourseList", courseList);
|
||||
}
|
||||
|
||||
String json = mapper.write(resultMap);
|
||||
logger.info("Response: " + json);
|
||||
return json;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,55 @@
|
||||
package icu.samnyan.aqua.sega.chusan.handler.impl;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import icu.samnyan.aqua.sega.chusan.handler.BaseHandler;
|
||||
import icu.samnyan.aqua.sega.chusan.model.userdata.UserData;
|
||||
import icu.samnyan.aqua.sega.chusan.service.UserDataService;
|
||||
import icu.samnyan.aqua.sega.general.service.ClientSettingService;
|
||||
import icu.samnyan.aqua.sega.util.VersionUtil;
|
||||
import icu.samnyan.aqua.sega.util.jackson.StringMapper;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Component("ChusanGetUserDataHandler")
|
||||
public class GetUserDataHandler implements BaseHandler {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(GetUserDataHandler.class);
|
||||
|
||||
private final StringMapper mapper;
|
||||
|
||||
private final UserDataService userDataService;
|
||||
|
||||
@Autowired
|
||||
public GetUserDataHandler(StringMapper mapper, UserDataService userDataService) {
|
||||
this.mapper = mapper;
|
||||
this.userDataService = userDataService;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String handle(Map<String, Object> request) throws JsonProcessingException {
|
||||
String userId = (String) request.get("userId");
|
||||
Optional<UserData> userDataOptional = userDataService.getUserByExtId(userId);
|
||||
|
||||
if (userDataOptional.isPresent()) {
|
||||
Map<String, Object> resultMap = new LinkedHashMap<>();
|
||||
resultMap.put("userId", userId);
|
||||
UserData user = userDataOptional.get();
|
||||
|
||||
resultMap.put("userData", user);
|
||||
String json = mapper.write(resultMap);
|
||||
logger.info("Response: " + json);
|
||||
return json;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,53 @@
|
||||
package icu.samnyan.aqua.sega.chusan.handler.impl;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import icu.samnyan.aqua.sega.chusan.handler.BaseHandler;
|
||||
import icu.samnyan.aqua.sega.chusan.model.userdata.UserDuel;
|
||||
import icu.samnyan.aqua.sega.chusan.service.UserDuelService;
|
||||
import icu.samnyan.aqua.sega.util.jackson.StringMapper;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Handle GetUserDuel request
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Component("ChusanGetUserDuelHandler")
|
||||
public class GetUserDuelHandler implements BaseHandler {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(GetUserDuelHandler.class);
|
||||
|
||||
private final StringMapper mapper;
|
||||
|
||||
private final UserDuelService userDuelService;
|
||||
|
||||
@Autowired
|
||||
public GetUserDuelHandler(StringMapper mapper, UserDuelService userDuelService) {
|
||||
this.mapper = mapper;
|
||||
this.userDuelService = userDuelService;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String handle(Map<String, Object> request) throws JsonProcessingException {
|
||||
String userId = (String) request.get("userId");
|
||||
String duelId = (String) request.get("duelId");
|
||||
String isAllDuel = (String) request.get("isAllDuel");
|
||||
|
||||
List<UserDuel> userDuelList = userDuelService.getByUserId(userId);
|
||||
|
||||
Map<String, Object> resultMap = new LinkedHashMap<>();
|
||||
resultMap.put("userId", userId);
|
||||
resultMap.put("length", userDuelList.size());
|
||||
resultMap.put("userDuelList", userDuelList);
|
||||
|
||||
String json = mapper.write(resultMap);
|
||||
logger.info("Response: " + json);
|
||||
return json;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,48 @@
|
||||
package icu.samnyan.aqua.sega.chusan.handler.impl;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import icu.samnyan.aqua.sega.chusan.handler.BaseHandler;
|
||||
import icu.samnyan.aqua.sega.util.jackson.StringMapper;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Handle GetUserFavoriteItem request
|
||||
* @author yueou (yueou.xu@gmail.com)
|
||||
*/
|
||||
|
||||
@Component("ChusanGetUserFavoriteItemHandler")
|
||||
public class GetUserFavoriteItemHandler implements BaseHandler {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(GetUserFavoriteItemHandler.class);
|
||||
|
||||
private final StringMapper mapper;
|
||||
|
||||
@Autowired
|
||||
public GetUserFavoriteItemHandler(StringMapper mapper) {
|
||||
this.mapper = mapper;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String handle(Map<String, Object> request) throws JsonProcessingException {
|
||||
String userId = (String) request.get("userId");
|
||||
String kind = (String) request.get("kind");
|
||||
|
||||
Map<String, Object> resultMap = new LinkedHashMap<>();
|
||||
resultMap.put("userId", userId);
|
||||
resultMap.put("length", 0);
|
||||
resultMap.put("kind", kind);
|
||||
resultMap.put("nextIndex", -1);
|
||||
resultMap.put("userFavoriteItemList", List.of());
|
||||
|
||||
String json = mapper.write(resultMap);
|
||||
logger.info("Response: " + json);
|
||||
return json;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,67 @@
|
||||
package icu.samnyan.aqua.sega.chusan.handler.impl;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import icu.samnyan.aqua.sega.chusan.handler.BaseHandler;
|
||||
import icu.samnyan.aqua.sega.chusan.model.userdata.UserItem;
|
||||
import icu.samnyan.aqua.sega.chusan.service.UserItemService;
|
||||
import icu.samnyan.aqua.sega.util.jackson.StringMapper;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Handler for getting user item.
|
||||
* This get call before profile create.
|
||||
*
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Component("ChusanGetUserItemHandler")
|
||||
public class GetUserItemHandler implements BaseHandler {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(GetUserItemHandler.class);
|
||||
|
||||
private final StringMapper mapper;
|
||||
|
||||
private final UserItemService userItemService;
|
||||
|
||||
public GetUserItemHandler(StringMapper mapper, UserItemService userItemService) {
|
||||
this.mapper = mapper;
|
||||
this.userItemService = userItemService;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String handle(Map<String, Object> request) throws JsonProcessingException {
|
||||
String userId = (String) request.get("userId");
|
||||
Long nextIndexVal = Long.parseLong((String) request.get("nextIndex"));
|
||||
int maxCount = Integer.parseInt((String) request.get("maxCount"));
|
||||
|
||||
Long mul = 10000000000L;
|
||||
|
||||
int kind = (int) (nextIndexVal / mul);
|
||||
int nextIndex = (int) (nextIndexVal % mul);
|
||||
int pageNum = nextIndex / maxCount;
|
||||
|
||||
Page<UserItem> userItemPage = userItemService.getByUserAndItemKind(userId, kind, pageNum, maxCount);
|
||||
|
||||
List<UserItem> userItemList = userItemPage.getContent();
|
||||
|
||||
long currentIndex = kind * mul + maxCount * pageNum + userItemPage.getNumberOfElements();
|
||||
|
||||
Map<String, Object> resultMap = new LinkedHashMap<>();
|
||||
resultMap.put("userId", userId);
|
||||
resultMap.put("length", userItemPage.getNumberOfElements());
|
||||
resultMap.put("nextIndex", userItemPage.getNumberOfElements() < maxCount ? -1 : currentIndex);
|
||||
resultMap.put("itemKind", kind);
|
||||
resultMap.put("userItemList", userItemList);
|
||||
|
||||
String json = mapper.write(resultMap);
|
||||
logger.info("Response: " + json);
|
||||
return json;
|
||||
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,40 @@
|
||||
package icu.samnyan.aqua.sega.chusan.handler.impl;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import icu.samnyan.aqua.sega.chusan.handler.BaseHandler;
|
||||
import icu.samnyan.aqua.sega.util.jackson.StringMapper;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Component("ChusanGetUserLoginBonusHandler")
|
||||
public class GetUserLoginBonusHandler implements BaseHandler {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(GetUserLoginBonusHandler.class);
|
||||
|
||||
private final StringMapper mapper;
|
||||
|
||||
@Autowired
|
||||
public GetUserLoginBonusHandler(StringMapper mapper) {
|
||||
this.mapper = mapper;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String handle(Map<String, Object> request) throws JsonProcessingException {
|
||||
String userId = (String) request.get("userId");
|
||||
|
||||
Map<String, Object> resultMap = new LinkedHashMap<>();
|
||||
resultMap.put("userId", userId);
|
||||
resultMap.put("length", 0);
|
||||
resultMap.put("userLoginBonusList", List.of());
|
||||
|
||||
String json = mapper.write(resultMap);
|
||||
logger.info("Response: " + json);
|
||||
return json;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,51 @@
|
||||
package icu.samnyan.aqua.sega.chusan.handler.impl;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import icu.samnyan.aqua.sega.chusan.handler.BaseHandler;
|
||||
import icu.samnyan.aqua.sega.chusan.model.userdata.UserMapArea;
|
||||
import icu.samnyan.aqua.sega.chusan.service.UserMapAreaService;
|
||||
import icu.samnyan.aqua.sega.util.jackson.StringMapper;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Handle GetUserMap request
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Component("ChusanGetUserMapAreaHandler")
|
||||
public class GetUserMapAreaHandler implements BaseHandler {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(GetUserMapAreaHandler.class);
|
||||
|
||||
private final StringMapper mapper;
|
||||
|
||||
private final UserMapAreaService userMapAreaService;
|
||||
|
||||
@Autowired
|
||||
public GetUserMapAreaHandler(StringMapper mapper, UserMapAreaService userMapService) {
|
||||
this.mapper = mapper;
|
||||
this.userMapAreaService = userMapService;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String handle(Map<String, Object> request) throws JsonProcessingException {
|
||||
String userId = (String) request.get("userId");
|
||||
|
||||
List<UserMapArea> userMapAreaList = userMapAreaService.getByUserId(userId);
|
||||
|
||||
Map<String, Object> resultMap = new LinkedHashMap<>();
|
||||
resultMap.put("userId", userId);
|
||||
resultMap.put("length", userMapAreaList.size());
|
||||
resultMap.put("userMapAreaList", userMapAreaList);
|
||||
|
||||
String json = mapper.write(resultMap);
|
||||
logger.info("Response: " + json);
|
||||
return json;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,93 @@
|
||||
package icu.samnyan.aqua.sega.chusan.handler.impl;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import icu.samnyan.aqua.sega.chusan.handler.BaseHandler;
|
||||
import icu.samnyan.aqua.sega.chusan.model.response.data.UserMusicListItem;
|
||||
import icu.samnyan.aqua.sega.chusan.model.userdata.UserMusicDetail;
|
||||
import icu.samnyan.aqua.sega.chusan.service.UserMusicDetailService;
|
||||
import icu.samnyan.aqua.sega.util.jackson.StringMapper;
|
||||
import icu.samnyan.aqua.spring.data.OffsetPageRequest;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.data.domain.Sort;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* Response:
|
||||
*
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Component("ChusanGetUserMusicHandler")
|
||||
public class GetUserMusicHandler implements BaseHandler {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(GetUserMusicHandler.class);
|
||||
|
||||
private final StringMapper mapper;
|
||||
|
||||
private final UserMusicDetailService userMusicDetailService;
|
||||
|
||||
@Autowired
|
||||
public GetUserMusicHandler(StringMapper mapper, UserMusicDetailService userMusicDetailService) {
|
||||
this.mapper = mapper;
|
||||
this.userMusicDetailService = userMusicDetailService;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String handle(Map<String, Object> request) throws JsonProcessingException {
|
||||
String userId = (String) request.get("userId");
|
||||
int currentIndex = Integer.parseInt((String) request.get("nextIndex"));
|
||||
int maxCount = Integer.parseInt((String) request.get("maxCount"));
|
||||
if(currentIndex < 0) {
|
||||
currentIndex = 0;
|
||||
}
|
||||
|
||||
Page<UserMusicDetail> dbPage = userMusicDetailService
|
||||
.getByUserId(userId, OffsetPageRequest.of(currentIndex, maxCount, Sort.by("musicId")));
|
||||
|
||||
|
||||
// Convert to result format
|
||||
// Result Map
|
||||
Map<Integer, UserMusicListItem> userMusicMap = new LinkedHashMap<>();
|
||||
|
||||
dbPage.getContent().forEach(userMusicDetail -> {
|
||||
UserMusicListItem list;
|
||||
if (userMusicMap.containsKey(userMusicDetail.getMusicId())) {
|
||||
list = userMusicMap.get(userMusicDetail.getMusicId());
|
||||
} else {
|
||||
list = new UserMusicListItem(0, new ArrayList<>());
|
||||
userMusicMap.put(userMusicDetail.getMusicId(), list);
|
||||
}
|
||||
list.getUserMusicDetailList().add(userMusicDetail);
|
||||
list.setLength(list.getUserMusicDetailList().size());
|
||||
});
|
||||
|
||||
// Remove the last music id if the result length is the same as maxCount,
|
||||
// to prevent a music id split across multiple page, which will cause some
|
||||
// problem with the game.
|
||||
int lastListSize = 0;
|
||||
if(dbPage.getNumberOfElements() >= maxCount) {
|
||||
// Get last key
|
||||
int lastMusicId = userMusicMap.keySet().stream().reduce((a, b) -> b).orElseThrow();
|
||||
List<UserMusicDetail> lastList = userMusicMap.get(lastMusicId).getUserMusicDetailList();
|
||||
lastListSize = lastList.size();
|
||||
// Remove last one from map
|
||||
userMusicMap.remove(lastMusicId);
|
||||
}
|
||||
|
||||
long nextIndex = currentIndex + dbPage.getNumberOfElements() - lastListSize;
|
||||
|
||||
Map<String, Object> resultMap = new LinkedHashMap<>();
|
||||
resultMap.put("userId", userId);
|
||||
resultMap.put("length", userMusicMap.size());
|
||||
resultMap.put("nextIndex", dbPage.getNumberOfElements() < maxCount ? -1 : nextIndex);
|
||||
resultMap.put("userMusicList", userMusicMap.values());
|
||||
|
||||
String json = mapper.write(resultMap);
|
||||
logger.info("Response: " + json);
|
||||
return json;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,52 @@
|
||||
package icu.samnyan.aqua.sega.chusan.handler.impl;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import icu.samnyan.aqua.sega.chusan.handler.BaseHandler;
|
||||
import icu.samnyan.aqua.sega.chusan.model.userdata.UserGameOption;
|
||||
import icu.samnyan.aqua.sega.chusan.service.UserGameOptionService;
|
||||
import icu.samnyan.aqua.sega.util.jackson.StringMapper;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Component("ChusanGetUserOptionHandler")
|
||||
public class GetUserOptionHandler implements BaseHandler {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(GetUserOptionHandler.class);
|
||||
|
||||
private final StringMapper mapper;
|
||||
|
||||
private final UserGameOptionService userGameOptionService;
|
||||
|
||||
@Autowired
|
||||
public GetUserOptionHandler(StringMapper mapper, UserGameOptionService userGameOptionService) {
|
||||
this.mapper = mapper;
|
||||
this.userGameOptionService = userGameOptionService;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String handle(Map<String, Object> request) throws JsonProcessingException {
|
||||
String userId = (String) request.get("userId");
|
||||
Optional<UserGameOption> userGameOption = userGameOptionService.getByUserId(userId);
|
||||
|
||||
if (userGameOption.isPresent()) {
|
||||
Map<String, Object> resultMap = new LinkedHashMap<>();
|
||||
resultMap.put("userId", userId);
|
||||
resultMap.put("userGameOption", userGameOption.get());
|
||||
String json = mapper.write(resultMap);
|
||||
logger.info("Response: " + json);
|
||||
return json;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,104 @@
|
||||
package icu.samnyan.aqua.sega.chusan.handler.impl;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import icu.samnyan.aqua.sega.chusan.handler.BaseHandler;
|
||||
import icu.samnyan.aqua.sega.chusan.model.response.GetUserPreviewResp;
|
||||
import icu.samnyan.aqua.sega.chusan.model.userdata.UserCharacter;
|
||||
import icu.samnyan.aqua.sega.chusan.model.userdata.UserData;
|
||||
import icu.samnyan.aqua.sega.chusan.model.userdata.UserGameOption;
|
||||
import icu.samnyan.aqua.sega.chusan.service.UserCharacterService;
|
||||
import icu.samnyan.aqua.sega.chusan.service.UserDataService;
|
||||
import icu.samnyan.aqua.sega.chusan.service.UserGameOptionService;
|
||||
import icu.samnyan.aqua.sega.general.service.ClientSettingService;
|
||||
import icu.samnyan.aqua.sega.util.jackson.StringMapper;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* The handler for loading basic profile information.
|
||||
* <p>
|
||||
* return null if no profile exist
|
||||
*
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Component("ChusanGetUserPreviewHandler")
|
||||
public class GetUserPreviewHandler implements BaseHandler {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(GetUserPreviewHandler.class);
|
||||
|
||||
private final StringMapper mapper;
|
||||
|
||||
private final UserDataService userDataService;
|
||||
private final UserCharacterService userCharacterService;
|
||||
private final UserGameOptionService userGameOptionService;
|
||||
|
||||
@Autowired
|
||||
public GetUserPreviewHandler(StringMapper mapper,
|
||||
ClientSettingService clientSettingService, UserDataService userDataService,
|
||||
UserCharacterService userCharacterService,
|
||||
UserGameOptionService userGameOptionService
|
||||
) {
|
||||
this.mapper = mapper;
|
||||
this.userDataService = userDataService;
|
||||
this.userCharacterService = userCharacterService;
|
||||
this.userGameOptionService = userGameOptionService;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String handle(Map<String, Object> request) throws JsonProcessingException {
|
||||
String userId = (String) request.get("userId");
|
||||
|
||||
Optional<UserData> userData = userDataService.getUserByExtId(userId);
|
||||
|
||||
if (userData.isEmpty()) {
|
||||
return null;
|
||||
}
|
||||
|
||||
UserData user = userData.get();
|
||||
|
||||
GetUserPreviewResp resp = new GetUserPreviewResp();
|
||||
resp.setUserId(userId);
|
||||
resp.setLogin(false);
|
||||
resp.setLastLoginDate(user.getLastPlayDate()); // Chusan seems doesn't save LastLoginDate, so use LastPlayDate instead
|
||||
resp.setUserName(user.getUserName());
|
||||
resp.setReincarnationNum(user.getReincarnationNum());
|
||||
resp.setLevel(user.getLevel());
|
||||
resp.setExp(user.getExp());
|
||||
resp.setPlayerRating(user.getPlayerRating());
|
||||
resp.setLastGameId(user.getLastGameId());
|
||||
|
||||
resp.setLastRomVersion(user.getLastRomVersion());
|
||||
resp.setLastDataVersion(user.getLastDataVersion());
|
||||
|
||||
resp.setLastPlayDate(user.getLastPlayDate());
|
||||
resp.setEmoneyBrandId(0);
|
||||
resp.setTrophyId(user.getTrophyId());
|
||||
|
||||
Optional<UserCharacter> userCharacterOptional = userCharacterService.getByUserAndCharacterId(user, user.getCharacterId());
|
||||
userCharacterOptional.ifPresent(resp::setUserCharacter);
|
||||
|
||||
Optional<UserGameOption> userGameOptionOptional = userGameOptionService.getByUser(user);
|
||||
userGameOptionOptional.ifPresent(userGameOption -> {
|
||||
resp.setPlayerLevel(userGameOption.getPlayerLevel());
|
||||
resp.setRating(userGameOption.getRating());
|
||||
resp.setHeadphone(userGameOption.getHeadphone());
|
||||
});
|
||||
|
||||
resp.setChargeState(1);
|
||||
resp.setUserNameEx(user.getUserName());
|
||||
resp.setBanState(0);
|
||||
resp.setClassEmblemMedal(user.getClassEmblemMedal());
|
||||
resp.setClassEmblemBase(user.getClassEmblemBase());
|
||||
resp.setBattleRankId(user.getBattleRankId());
|
||||
|
||||
String json = mapper.write(resp);
|
||||
logger.info("Response: " + json);
|
||||
return json;
|
||||
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,80 @@
|
||||
package icu.samnyan.aqua.sega.chusan.handler.impl;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import icu.samnyan.aqua.sega.chusan.handler.BaseHandler;
|
||||
import icu.samnyan.aqua.sega.chusan.model.userdata.UserGeneralData;
|
||||
import icu.samnyan.aqua.sega.chusan.service.UserGeneralDataService;
|
||||
import icu.samnyan.aqua.sega.general.model.response.UserRecentRating;
|
||||
import icu.samnyan.aqua.sega.chusan.model.userdata.UserPlaylog;
|
||||
import icu.samnyan.aqua.sega.chusan.service.UserPlaylogService;
|
||||
import icu.samnyan.aqua.sega.util.jackson.StringMapper;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* Return the recent play to calculate rating. Rating base on top 30 songs plus top 10 in recent 30 plays.
|
||||
*
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Component("ChusanGetUserRecentRatingHandler")
|
||||
public class GetUserRecentRatingHandler implements BaseHandler {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(GetUserRecentRatingHandler.class);
|
||||
|
||||
private final StringMapper mapper;
|
||||
|
||||
private final UserPlaylogService userPlaylogService;
|
||||
private final UserGeneralDataService userGeneralDataService;
|
||||
|
||||
@Autowired
|
||||
public GetUserRecentRatingHandler(StringMapper mapper, UserPlaylogService userPlaylogService, UserGeneralDataService userGeneralDataService) {
|
||||
this.mapper = mapper;
|
||||
this.userPlaylogService = userPlaylogService;
|
||||
this.userGeneralDataService = userGeneralDataService;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String handle(Map<String, Object> request) throws JsonProcessingException {
|
||||
String userId = (String) request.get("userId");
|
||||
|
||||
Optional<UserGeneralData> recentOptional = userGeneralDataService.getByUserIdAndKey(userId, "recent_rating_list");
|
||||
|
||||
List<UserRecentRating> ratingList;
|
||||
if(recentOptional.isPresent()) {
|
||||
ratingList = new LinkedList<>();
|
||||
String val = recentOptional.get().getPropertyValue();
|
||||
if(StringUtils.isNotBlank(val) && val.contains(",")) {
|
||||
String[] records = val.split(",");
|
||||
for (String record :
|
||||
records) {
|
||||
String[] value = record.split(":");
|
||||
ratingList.add(new UserRecentRating(
|
||||
Integer.parseInt(value[0]),
|
||||
Integer.parseInt(value[1]),
|
||||
"2000001",
|
||||
Integer.parseInt(value[2])
|
||||
));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
List<UserPlaylog> top = userPlaylogService.getRecent30Plays(userId);
|
||||
ratingList = top.stream().map(log -> new UserRecentRating(log.getMusicId(), log.getLevel(), "2000001", log.getScore()))
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
Map<String, Object> resultMap = new LinkedHashMap<>();
|
||||
resultMap.put("userId", userId);
|
||||
resultMap.put("length", ratingList.size());
|
||||
resultMap.put("userRecentRatingList", ratingList);
|
||||
|
||||
String json = mapper.write(resultMap);
|
||||
logger.info("Response: " + json);
|
||||
return json;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,46 @@
|
||||
package icu.samnyan.aqua.sega.chusan.handler.impl;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import icu.samnyan.aqua.sega.chusan.handler.BaseHandler;
|
||||
import icu.samnyan.aqua.sega.util.jackson.StringMapper;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Component("ChusanGetUserRegionHandler")
|
||||
public class GetUserRegionHandler implements BaseHandler {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(GetUserRegionHandler.class);
|
||||
|
||||
private final StringMapper mapper;
|
||||
|
||||
@Autowired
|
||||
public GetUserRegionHandler(StringMapper mapper) {
|
||||
this.mapper = mapper;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String handle(Map<String, Object> request) throws JsonProcessingException {
|
||||
String userId = (String) request.get("userId");
|
||||
|
||||
List<Object> userRegionList = new ArrayList<>();
|
||||
|
||||
Map<String, Object> resultMap = new LinkedHashMap<>();
|
||||
resultMap.put("userId", userId);
|
||||
resultMap.put("length", 0);
|
||||
resultMap.put("userRegionList", userRegionList);
|
||||
|
||||
String json = mapper.write(resultMap);
|
||||
logger.info("Response: " + json);
|
||||
return json;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,39 @@
|
||||
package icu.samnyan.aqua.sega.chusan.handler.impl;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import icu.samnyan.aqua.sega.chusan.handler.BaseHandler;
|
||||
import icu.samnyan.aqua.sega.util.jackson.StringMapper;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Component("ChusanGetUserRivalDataHandler")
|
||||
public class GetUserRivalDataHandler implements BaseHandler {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(GetUserRivalDataHandler.class);
|
||||
|
||||
private final StringMapper mapper;
|
||||
|
||||
|
||||
public GetUserRivalDataHandler(StringMapper mapper) {
|
||||
this.mapper = mapper;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String handle(Map<String, Object> request) throws JsonProcessingException {
|
||||
String userId = (String) request.get("userId");
|
||||
|
||||
Map<String, Object> resultMap = new LinkedHashMap<>();
|
||||
resultMap.put("userId", userId);
|
||||
resultMap.put("length", 0);
|
||||
resultMap.put("userRivalData", List.of());
|
||||
|
||||
String json = mapper.write(resultMap);
|
||||
logger.info("Response: " + json);
|
||||
return json;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,41 @@
|
||||
package icu.samnyan.aqua.sega.chusan.handler.impl;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import icu.samnyan.aqua.sega.chusan.handler.BaseHandler;
|
||||
import icu.samnyan.aqua.sega.util.jackson.StringMapper;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Component("ChusanGetUserRivalMusicHandler")
|
||||
public class GetUserRivalMusicHandler implements BaseHandler {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(GetUserRivalMusicHandler.class);
|
||||
|
||||
private final StringMapper mapper;
|
||||
|
||||
|
||||
public GetUserRivalMusicHandler(StringMapper mapper) {
|
||||
this.mapper = mapper;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String handle(Map<String, Object> request) throws JsonProcessingException {
|
||||
String userId = (String) request.get("userId");
|
||||
|
||||
Map<String, Object> resultMap = new LinkedHashMap<>();
|
||||
resultMap.put("userId", userId);
|
||||
resultMap.put("rivalId", 0);
|
||||
resultMap.put("length", 0);
|
||||
resultMap.put("nextIndex", 0);
|
||||
resultMap.put("userRivalMusicList", List.of());
|
||||
|
||||
String json = mapper.write(resultMap);
|
||||
logger.info("Response: " + json);
|
||||
return json;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,46 @@
|
||||
package icu.samnyan.aqua.sega.chusan.handler.impl;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import icu.samnyan.aqua.sega.chusan.handler.BaseHandler;
|
||||
import icu.samnyan.aqua.sega.util.jackson.StringMapper;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Component("ChusanGetUserSymbolChatSettingHandler")
|
||||
public class GetUserSymbolChatSettingHandler implements BaseHandler {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(GetUserSymbolChatSettingHandler.class);
|
||||
|
||||
private final StringMapper mapper;
|
||||
|
||||
@Autowired
|
||||
public GetUserSymbolChatSettingHandler(StringMapper mapper) {
|
||||
this.mapper = mapper;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String handle(Map<String, Object> request) throws JsonProcessingException {
|
||||
String userId = (String) request.get("userId");
|
||||
|
||||
List<Object> symbolChatInfoList = new ArrayList<>();
|
||||
|
||||
Map<String, Object> resultMap = new LinkedHashMap<>();
|
||||
resultMap.put("userId", userId);
|
||||
resultMap.put("length", 0);
|
||||
resultMap.put("symbolChatInfoList", symbolChatInfoList);
|
||||
|
||||
String json = mapper.write(resultMap);
|
||||
logger.info("Response: " + json);
|
||||
return json;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,58 @@
|
||||
package icu.samnyan.aqua.sega.chusan.handler.impl;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import icu.samnyan.aqua.sega.chusan.handler.BaseHandler;
|
||||
import icu.samnyan.aqua.sega.util.jackson.StringMapper;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Map;
|
||||
|
||||
@Component("ChusanGetUserTeamHandler")
|
||||
public class GetUserTeamHandler implements BaseHandler {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(GetUserTeamHandler.class);
|
||||
|
||||
private final StringMapper mapper;
|
||||
|
||||
private final String teamName;
|
||||
|
||||
|
||||
public GetUserTeamHandler(StringMapper mapper, @Value("${game.chunithm.team-name:#{null}}") String teamName) {
|
||||
this.mapper = mapper;
|
||||
this.teamName = teamName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String handle(Map<String, Object> request) throws JsonProcessingException {
|
||||
String userId = (String) request.get("userId");
|
||||
String playDate = (String) request.get("playDate");
|
||||
|
||||
Map<String, Object> resultMap = new LinkedHashMap<>();
|
||||
resultMap.put("userId", userId);
|
||||
|
||||
if (teamName != null && !teamName.isEmpty()) {
|
||||
resultMap.put("teamId", 1);
|
||||
resultMap.put("teamRank", 1);
|
||||
resultMap.put("teamName", teamName);
|
||||
|
||||
Map<String, Object> userTeamMap = new LinkedHashMap<>();
|
||||
userTeamMap.put("userId", userId);
|
||||
userTeamMap.put("teamId", 1);
|
||||
userTeamMap.put("orderId", 1);
|
||||
userTeamMap.put("teamPoint", 1);
|
||||
userTeamMap.put("aggrDate", playDate);
|
||||
|
||||
resultMap.put("userTeamPoint", userTeamMap);
|
||||
} else {
|
||||
resultMap.put("teamId", 0);
|
||||
}
|
||||
|
||||
String json = mapper.write(resultMap);
|
||||
logger.info("Response: " + json);
|
||||
return json;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,312 @@
|
||||
package icu.samnyan.aqua.sega.chusan.handler.impl;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import icu.samnyan.aqua.sega.chusan.handler.BaseHandler;
|
||||
import icu.samnyan.aqua.sega.chusan.model.request.UpsertUserAll;
|
||||
import icu.samnyan.aqua.sega.chusan.model.response.CodeResp;
|
||||
import icu.samnyan.aqua.sega.chusan.model.userdata.*;
|
||||
import icu.samnyan.aqua.sega.chusan.service.*;
|
||||
import icu.samnyan.aqua.sega.general.model.Card;
|
||||
import icu.samnyan.aqua.sega.general.model.response.UserRecentRating;
|
||||
import icu.samnyan.aqua.sega.general.service.CardService;
|
||||
import icu.samnyan.aqua.sega.util.jackson.StringMapper;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* The handler for save user data. Only send in the end of the session.
|
||||
*
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Component("ChusanUpsertUserAllHandler")
|
||||
public class UpsertUserAllHandler implements BaseHandler {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(UpsertUserAllHandler.class);
|
||||
|
||||
private final StringMapper mapper;
|
||||
|
||||
private final CardService cardService;
|
||||
|
||||
private final UserDataService userDataService;
|
||||
private final UserCharacterService userCharacterService;
|
||||
private final UserGameOptionService userGameOptionService;
|
||||
private final UserMapAreaService userMapService;
|
||||
private final UserItemService userItemService;
|
||||
private final UserMusicDetailService userMusicDetailService;
|
||||
private final UserActivityService userActivityService;
|
||||
private final UserPlaylogService userPlaylogService;
|
||||
private final UserChargeService userChargeService;
|
||||
private final UserCourseService userCourseService;
|
||||
private final UserDuelService userDuelService;
|
||||
private final UserGeneralDataService userGeneralDataService;
|
||||
|
||||
@Autowired
|
||||
public UpsertUserAllHandler(StringMapper mapper, CardService cardService, UserDataService userDataService, UserCharacterService userCharacterService, UserGameOptionService userGameOptionService, UserMapAreaService userMapService, UserItemService userItemService, UserMusicDetailService userMusicDetailService, UserActivityService userActivityService, UserPlaylogService userPlaylogService, UserChargeService userChargeService, UserCourseService userCourseService, UserDuelService userDuelService, UserGeneralDataService userGeneralDataService) {
|
||||
this.mapper = mapper;
|
||||
this.cardService = cardService;
|
||||
this.userDataService = userDataService;
|
||||
this.userCharacterService = userCharacterService;
|
||||
this.userGameOptionService = userGameOptionService;
|
||||
this.userMapService = userMapService;
|
||||
this.userItemService = userItemService;
|
||||
this.userMusicDetailService = userMusicDetailService;
|
||||
this.userActivityService = userActivityService;
|
||||
this.userPlaylogService = userPlaylogService;
|
||||
this.userChargeService = userChargeService;
|
||||
this.userCourseService = userCourseService;
|
||||
this.userDuelService = userDuelService;
|
||||
this.userGeneralDataService = userGeneralDataService;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String handle(Map<String, Object> request) throws JsonProcessingException {
|
||||
String userId = (String) request.get("userId");
|
||||
UpsertUserAll upsertUserAll = mapper.convert(request.get("upsertUserAll"), UpsertUserAll.class);
|
||||
|
||||
// Not all field will be sent. Check if they are exist first.
|
||||
|
||||
UserData userData;
|
||||
UserData newUserData;
|
||||
// UserData
|
||||
if (upsertUserAll.getUserData() == null) {
|
||||
return null;
|
||||
} else {
|
||||
newUserData = upsertUserAll.getUserData().get(0);
|
||||
|
||||
Optional<UserData> userOptional = userDataService.getUserByExtId(userId);
|
||||
|
||||
if (userOptional.isPresent()) {
|
||||
userData = userOptional.get();
|
||||
} else {
|
||||
userData = new UserData();
|
||||
Card card = cardService.getCardByExtId(userId).orElseThrow();
|
||||
userData.setCard(card);
|
||||
}
|
||||
|
||||
newUserData.setId(userData.getId());
|
||||
newUserData.setCard(userData.getCard());
|
||||
|
||||
|
||||
// Decode Username
|
||||
String userName = new String(newUserData.getUserName()
|
||||
.getBytes(StandardCharsets.ISO_8859_1), StandardCharsets.UTF_8);
|
||||
|
||||
|
||||
newUserData.setUserName(userName);
|
||||
userDataService.saveAndFlushUserData(newUserData);
|
||||
}
|
||||
|
||||
// userGameOption
|
||||
if (upsertUserAll.getUserGameOption() != null) {
|
||||
UserGameOption newUserGameOption = upsertUserAll.getUserGameOption().get(0);
|
||||
|
||||
Optional<UserGameOption> userGameOptionOptional = userGameOptionService.getByUser(newUserData);
|
||||
|
||||
UserGameOption userGameOption = userGameOptionOptional.orElseGet(() -> new UserGameOption(newUserData));
|
||||
|
||||
newUserGameOption.setId(userGameOption.getId());
|
||||
newUserGameOption.setUser(userGameOption.getUser());
|
||||
|
||||
userGameOptionService.save(newUserGameOption);
|
||||
}
|
||||
|
||||
// userMapList
|
||||
if (upsertUserAll.getUserMapAreaList() != null) {
|
||||
List<UserMapArea> userMapList = upsertUserAll.getUserMapAreaList();
|
||||
Map<Integer, UserMapArea> newUserMapMap = new HashMap<>();
|
||||
|
||||
userMapList.forEach(newUserMap -> {
|
||||
int mapId = newUserMap.getMapAreaId();
|
||||
UserMapArea userMap;
|
||||
Optional<UserMapArea> userMapOptional = userMapService.getByUserAndMapAreaId(newUserData, mapId);
|
||||
userMap = userMapOptional.orElseGet(() -> new UserMapArea(newUserData));
|
||||
|
||||
newUserMap.setId(userMap.getId());
|
||||
newUserMap.setUser(userMap.getUser());
|
||||
|
||||
newUserMapMap.put(mapId, newUserMap);
|
||||
});
|
||||
userMapService.saveAll(newUserMapMap.values());
|
||||
}
|
||||
|
||||
// userCharacterList
|
||||
if (upsertUserAll.getUserCharacterList() != null) {
|
||||
List<UserCharacter> userCharacterList = upsertUserAll.getUserCharacterList();
|
||||
Map<Integer, UserCharacter> newCharacterMap = new HashMap<>();
|
||||
|
||||
userCharacterList.forEach(newUserCharacter -> {
|
||||
int characterId = newUserCharacter.getCharacterId();
|
||||
|
||||
Optional<UserCharacter> userCharacterOptional = userCharacterService.getByUserAndCharacterId(newUserData, characterId);
|
||||
UserCharacter userCharacter = userCharacterOptional.orElseGet(() -> new UserCharacter(newUserData));
|
||||
|
||||
newUserCharacter.setId(userCharacter.getId());
|
||||
newUserCharacter.setUser(userCharacter.getUser());
|
||||
|
||||
newCharacterMap.put(characterId, newUserCharacter);
|
||||
});
|
||||
userCharacterService.saveAll(newCharacterMap.values());
|
||||
}
|
||||
|
||||
// userItemList
|
||||
if (upsertUserAll.getUserItemList() != null) {
|
||||
List<UserItem> userItemList = upsertUserAll.getUserItemList();
|
||||
Map<String, UserItem> newUserItemMap = new HashMap<>();
|
||||
|
||||
userItemList.forEach(newUserItem -> {
|
||||
int itemId = newUserItem.getItemId();
|
||||
int itemKind = newUserItem.getItemKind();
|
||||
|
||||
|
||||
Optional<UserItem> userItemOptional = userItemService.getByUserAndItemIdAndKind(newUserData, itemId, itemKind);
|
||||
UserItem userItem = userItemOptional.orElseGet(() -> new UserItem(newUserData));
|
||||
|
||||
newUserItem.setId(userItem.getId());
|
||||
newUserItem.setUser(userItem.getUser());
|
||||
|
||||
newUserItemMap.put(itemId + "-" + itemKind, newUserItem);
|
||||
});
|
||||
userItemService.saveAll(newUserItemMap.values());
|
||||
}
|
||||
|
||||
// userMusicDetailList
|
||||
if (upsertUserAll.getUserMusicDetailList() != null) {
|
||||
|
||||
List<UserMusicDetail> userMusicDetailList = upsertUserAll.getUserMusicDetailList();
|
||||
Map<String, UserMusicDetail> newUserMusicDetailMap = new HashMap<>();
|
||||
|
||||
userMusicDetailList.forEach(newUserMusicDetail -> {
|
||||
int musicId = newUserMusicDetail.getMusicId();
|
||||
int level = newUserMusicDetail.getLevel();
|
||||
|
||||
Optional<UserMusicDetail> userMusicDetailOptional = userMusicDetailService.getByUserAndMusicIdAndLevel(newUserData, musicId, level);
|
||||
UserMusicDetail userMusicDetail = userMusicDetailOptional.orElseGet(() -> new UserMusicDetail(newUserData));
|
||||
|
||||
newUserMusicDetail.setId(userMusicDetail.getId());
|
||||
newUserMusicDetail.setUser(userMusicDetail.getUser());
|
||||
|
||||
newUserMusicDetailMap.put(musicId + "-" + level, newUserMusicDetail);
|
||||
});
|
||||
userMusicDetailService.saveAll(newUserMusicDetailMap.values());
|
||||
}
|
||||
|
||||
// userActivityList
|
||||
if (upsertUserAll.getUserActivityList() != null) {
|
||||
List<UserActivity> userActivityList = upsertUserAll.getUserActivityList();
|
||||
List<UserActivity> newUserActivityList = new LinkedList<>();
|
||||
|
||||
userActivityList.forEach(newUserActivity -> {
|
||||
// No need to rename to activityId. jackson auto handle that
|
||||
int activityId = newUserActivity.getActivityId();
|
||||
int kind = newUserActivity.getKind();
|
||||
|
||||
Optional<UserActivity> userActivityOptional = userActivityService.getByUserAndActivityIdAndKind(newUserData, activityId, kind);
|
||||
UserActivity userActivity = userActivityOptional.orElseGet(() -> new UserActivity(newUserData));
|
||||
|
||||
newUserActivity.setId(userActivity.getId());
|
||||
newUserActivity.setUser(userActivity.getUser());
|
||||
|
||||
newUserActivityList.add(newUserActivity);
|
||||
});
|
||||
userActivityService.saveAll(newUserActivityList);
|
||||
}
|
||||
|
||||
// userRecentRatingList
|
||||
if(upsertUserAll.getUserRecentRatingList() != null) {
|
||||
List<UserRecentRating> userRecentRatingList = upsertUserAll.getUserRecentRatingList();
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
userRecentRatingList.forEach(userRecentRating -> {
|
||||
sb.append(userRecentRating.getMusicId()).append(":");
|
||||
sb.append(userRecentRating.getDifficultId()).append(":");
|
||||
sb.append(userRecentRating.getScore()).append(",");
|
||||
});
|
||||
if(sb.length() > 0) {
|
||||
sb.deleteCharAt(sb.length() - 1);
|
||||
}
|
||||
UserGeneralData userGeneralData = userGeneralDataService.getByUserAndKey(newUserData, "recent_rating_list")
|
||||
.orElseGet(() -> new UserGeneralData(newUserData, "recent_rating_list"));
|
||||
userGeneralData.setPropertyValue(sb.toString());
|
||||
userGeneralDataService.save(userGeneralData);
|
||||
}
|
||||
|
||||
// userChargeList
|
||||
if (upsertUserAll.getUserChargeList() != null) {
|
||||
List<UserCharge> userChargeList = upsertUserAll.getUserChargeList();
|
||||
List<UserCharge> newUserChargeList = new ArrayList<>();
|
||||
|
||||
userChargeList.forEach(newUserCharge -> {
|
||||
int chargeId = newUserCharge.getChargeId();
|
||||
|
||||
Optional<UserCharge> userChargeOptional = userChargeService.getByUserAndChargeId(newUserData, chargeId);
|
||||
UserCharge userCharge = userChargeOptional.orElseGet(() -> new UserCharge(newUserData));
|
||||
|
||||
newUserCharge.setId(userCharge.getId());
|
||||
newUserCharge.setUser(userCharge.getUser());
|
||||
|
||||
newUserChargeList.add(newUserCharge);
|
||||
});
|
||||
userChargeService.saveAll(newUserChargeList);
|
||||
}
|
||||
|
||||
// userPlaylogList
|
||||
if (upsertUserAll.getUserPlaylogList() != null) {
|
||||
List<UserPlaylog> userPlaylogList = upsertUserAll.getUserPlaylogList();
|
||||
List<UserPlaylog> newUserPlaylogList = new ArrayList<>();
|
||||
|
||||
userPlaylogList.forEach(newUserPlaylog -> {
|
||||
newUserPlaylog.setUser(newUserData);
|
||||
|
||||
newUserPlaylogList.add(newUserPlaylog);
|
||||
});
|
||||
if (newUserPlaylogList.size() > 0) userPlaylogService.saveAll(newUserPlaylogList);
|
||||
}
|
||||
|
||||
|
||||
// userCourseList
|
||||
if (upsertUserAll.getUserCourseList() != null) {
|
||||
List<UserCourse> userCourseList = upsertUserAll.getUserCourseList();
|
||||
|
||||
userCourseList.forEach(newUserCourse -> {
|
||||
int courseId = newUserCourse.getCourseId();
|
||||
|
||||
Optional<UserCourse> userCourseOptional = userCourseService.getByUserAndCourseId(newUserData, courseId);
|
||||
UserCourse userCourse = userCourseOptional.orElseGet(() -> new UserCourse(newUserData));
|
||||
|
||||
newUserCourse.setId(userCourse.getId());
|
||||
newUserCourse.setUser(userCourse.getUser());
|
||||
|
||||
userCourseService.save(newUserCourse);
|
||||
});
|
||||
}
|
||||
|
||||
// userDuelList
|
||||
if (upsertUserAll.getUserDuelList() != null) {
|
||||
List<UserDuel> userDuelList = upsertUserAll.getUserDuelList();
|
||||
Map<Integer, UserDuel> newUserDuelMap = new HashMap<>();
|
||||
|
||||
userDuelList.forEach(newUserDuel -> {
|
||||
int duelId = newUserDuel.getDuelId();
|
||||
|
||||
Optional<UserDuel> userDuelOptional = userDuelService.getByUserAndDuelId(newUserData, duelId);
|
||||
UserDuel userDuel = userDuelOptional.orElseGet(() -> new UserDuel(newUserData));
|
||||
|
||||
newUserDuel.setId(userDuel.getId());
|
||||
newUserDuel.setUser(userDuel.getUser());
|
||||
|
||||
newUserDuelMap.put(duelId, newUserDuel);
|
||||
});
|
||||
userDuelService.saveAll(newUserDuelMap.values());
|
||||
}
|
||||
|
||||
String json = mapper.write(new CodeResp(1));
|
||||
logger.info("Response: " + json);
|
||||
return json;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,60 @@
|
||||
package icu.samnyan.aqua.sega.chusan.handler.impl;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import icu.samnyan.aqua.sega.chusan.handler.BaseHandler;
|
||||
import icu.samnyan.aqua.sega.chusan.model.response.CodeResp;
|
||||
import icu.samnyan.aqua.sega.chusan.model.userdata.UserCharge;
|
||||
import icu.samnyan.aqua.sega.chusan.model.userdata.UserData;
|
||||
import icu.samnyan.aqua.sega.chusan.service.UserChargeService;
|
||||
import icu.samnyan.aqua.sega.chusan.service.UserDataService;
|
||||
import icu.samnyan.aqua.sega.util.jackson.StringMapper;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Component("ChusanUpsertUserChargelogHandler")
|
||||
public class UpsertUserChargelogHandler implements BaseHandler {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(UpsertUserChargelogHandler.class);
|
||||
|
||||
private final StringMapper mapper;
|
||||
|
||||
private final UserDataService userDataService;
|
||||
private final UserChargeService userChargeService;
|
||||
|
||||
public UpsertUserChargelogHandler(StringMapper mapper, UserDataService userDataService, UserChargeService userChargeService) {
|
||||
this.mapper = mapper;
|
||||
this.userDataService = userDataService;
|
||||
this.userChargeService = userChargeService;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String handle(Map<String, Object> request) throws JsonProcessingException {
|
||||
String userId = (String) request.get("userId");
|
||||
UserData user = userDataService.getUserByExtId(userId).orElseThrow();
|
||||
|
||||
Map<String, Object> userChargeMap = (Map<String, Object>) request.get("userCharge");
|
||||
String chargeId = (String) userChargeMap.get("chargeId");
|
||||
UserCharge charge = mapper.convert(userChargeMap, UserCharge.class);
|
||||
|
||||
UserCharge userCharge = userChargeService.getByUserAndChargeId(user, Integer.parseInt(chargeId)).orElseGet(() -> new UserCharge(user));
|
||||
userCharge.setChargeId(charge.getChargeId());
|
||||
userCharge.setStock(charge.getStock());
|
||||
userCharge.setPurchaseDate(charge.getPurchaseDate());
|
||||
userCharge.setValidDate(charge.getValidDate());
|
||||
userCharge.setParam1(charge.getParam1());
|
||||
userCharge.setParam2(charge.getParam2());
|
||||
userCharge.setParamDate(charge.getParamDate());
|
||||
|
||||
userChargeService.save(userCharge);
|
||||
|
||||
String json = mapper.write(new CodeResp(1));
|
||||
logger.info("Response: " + json);
|
||||
return json;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,52 @@
|
||||
package icu.samnyan.aqua.sega.chusan.model.gamedata;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Entity(name = "ChusanGameCharge")
|
||||
@Table(name = "chusan_game_charge")
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class GameCharge implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@JsonIgnore
|
||||
private long id;
|
||||
|
||||
private int orderId;
|
||||
|
||||
@Column(unique = true)
|
||||
private int chargeId;
|
||||
|
||||
private int price;
|
||||
|
||||
private LocalDateTime startDate;
|
||||
|
||||
private LocalDateTime endDate;
|
||||
|
||||
private int salePrice;
|
||||
|
||||
private LocalDateTime saleStartDate;
|
||||
|
||||
private LocalDateTime saleEndDate;
|
||||
|
||||
@JsonInclude
|
||||
@Transient
|
||||
private String remarks = null;
|
||||
|
||||
}
|
||||
@ -0,0 +1,37 @@
|
||||
package icu.samnyan.aqua.sega.chusan.model.gamedata;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.Table;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Entity(name = "ChusanGameEvent")
|
||||
@Table(name = "chusan_game_event")
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class GameEvent implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Id
|
||||
private int id;
|
||||
|
||||
private int type;
|
||||
|
||||
private LocalDateTime startDate;
|
||||
|
||||
private LocalDateTime endDate;
|
||||
|
||||
@JsonIgnore
|
||||
private boolean enable;
|
||||
}
|
||||
@ -0,0 +1,107 @@
|
||||
package icu.samnyan.aqua.sega.chusan.model.request;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import icu.samnyan.aqua.sega.chusan.model.userdata.*;
|
||||
import icu.samnyan.aqua.sega.general.model.response.UserRecentRating;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.springframework.lang.Nullable;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class UpsertUserAll implements Serializable {
|
||||
|
||||
@Nullable
|
||||
private List<UserData> userData;
|
||||
|
||||
@Nullable
|
||||
private List<UserGameOption> userGameOption;
|
||||
|
||||
@Nullable
|
||||
private List<UserCharacter> userCharacterList;
|
||||
|
||||
@Nullable
|
||||
private List<UserItem> userItemList;
|
||||
|
||||
@Nullable
|
||||
private List<UserMusicDetail> userMusicDetailList;
|
||||
|
||||
@Nullable
|
||||
private List<UserActivity> userActivityList;
|
||||
|
||||
@Nullable
|
||||
private List<UserRecentRating> userRecentRatingList;
|
||||
|
||||
@Nullable
|
||||
private List<UserPlaylog> userPlaylogList;
|
||||
|
||||
@Nullable
|
||||
private List<UserCharge> userChargeList;
|
||||
|
||||
@Nullable
|
||||
private List<UserCourse> userCourseList;
|
||||
|
||||
@Nullable
|
||||
private List<UserDuel> userDuelList;
|
||||
|
||||
@Nullable
|
||||
private List<Map<String, Object>> userTeamPoint;
|
||||
|
||||
@Nullable
|
||||
private List<Map<String, Object>> userRatingBaseHotList;
|
||||
|
||||
@Nullable
|
||||
private List<Map<String, Object>> userRatingBaseList;
|
||||
|
||||
@Nullable
|
||||
private List<Map<String, Object>> userRatingBaseNextList;
|
||||
|
||||
@Nullable
|
||||
private List<Map<String, Object>> userLoginBonusList;
|
||||
|
||||
@Nullable
|
||||
private List<UserMapArea> userMapAreaList;
|
||||
|
||||
@Nullable
|
||||
private List<Map<String, Object>> userOverPowerList;
|
||||
|
||||
@Nullable
|
||||
private List<Map<String, Object>> userNetBattlelogList;
|
||||
|
||||
@Nullable
|
||||
private List<Map<String, Object>> userEmoneyList;
|
||||
|
||||
@Nullable
|
||||
@JsonProperty("isNewCharacterList")
|
||||
private String isNewCharacterList;
|
||||
|
||||
@Nullable
|
||||
@JsonProperty("isNewMusicDetailList")
|
||||
private String isNewMusicDetailList;
|
||||
|
||||
@Nullable
|
||||
@JsonProperty("isNewItemList")
|
||||
private String isNewItemList;
|
||||
|
||||
@Nullable
|
||||
@JsonProperty("isNewCourseList")
|
||||
private String isNewCourseList;
|
||||
|
||||
@Nullable
|
||||
@JsonProperty("isNewDuelList")
|
||||
private String isNewDuelList;
|
||||
|
||||
@Nullable
|
||||
@JsonProperty("isNewMapAreaList")
|
||||
private String isNewMapAreaList;
|
||||
|
||||
}
|
||||
@ -0,0 +1,15 @@
|
||||
package icu.samnyan.aqua.sega.chusan.model.response;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class CodeResp {
|
||||
private int returnCode;
|
||||
}
|
||||
@ -0,0 +1,22 @@
|
||||
package icu.samnyan.aqua.sega.chusan.model.response;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import icu.samnyan.aqua.sega.chusan.model.response.data.GameSetting;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class GetGameSettingResp {
|
||||
|
||||
private GameSetting gameSetting;
|
||||
@JsonProperty("isDumpUpload")
|
||||
private boolean isDumpUpload;
|
||||
@JsonProperty("isAou")
|
||||
private boolean isAou;
|
||||
}
|
||||
@ -0,0 +1,45 @@
|
||||
package icu.samnyan.aqua.sega.chusan.model.response;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import icu.samnyan.aqua.sega.chusan.model.userdata.UserCharacter;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class GetUserPreviewResp {
|
||||
|
||||
private String userId;
|
||||
@JsonProperty("isLogin")
|
||||
private boolean isLogin;
|
||||
private LocalDateTime lastLoginDate;
|
||||
private String userName;
|
||||
private int reincarnationNum;
|
||||
private int level;
|
||||
private String exp;
|
||||
private int playerRating;
|
||||
private String lastGameId;
|
||||
private String lastRomVersion;
|
||||
private String lastDataVersion;
|
||||
private LocalDateTime lastPlayDate;
|
||||
private int emoneyBrandId;
|
||||
private int trophyId;
|
||||
private UserCharacter userCharacter;
|
||||
private int playerLevel;
|
||||
private int rating;
|
||||
private int headphone;
|
||||
private int chargeState;
|
||||
private String userNameEx;
|
||||
private int banState = 0;
|
||||
private int classEmblemMedal;
|
||||
private int classEmblemBase;
|
||||
private int battleRankId;
|
||||
|
||||
}
|
||||
@ -0,0 +1,16 @@
|
||||
package icu.samnyan.aqua.sega.chusan.model.response.data;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class GameRanking {
|
||||
private int id;
|
||||
private long point;
|
||||
}
|
||||
@ -0,0 +1,34 @@
|
||||
package icu.samnyan.aqua.sega.chusan.model.response.data;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class GameSetting {
|
||||
private String romVersion;
|
||||
private String dataVersion;
|
||||
@JsonProperty("isMaintenance")
|
||||
private boolean isMaintenance;
|
||||
private int requestInterval;
|
||||
private String rebootStartTime;
|
||||
private String rebootEndTime;
|
||||
@JsonProperty("isBackgroundDistribute")
|
||||
private boolean isBackgroundDistribute;
|
||||
private int maxCountCharacter;
|
||||
private int maxCountItem;
|
||||
private int maxCountMusic;
|
||||
private String matchStartTime;
|
||||
private String matchEndTime;
|
||||
private int matchTimeLimit;
|
||||
private int matchErrorLimit;
|
||||
private String matchingUri;
|
||||
private String udpHolePunchUri;
|
||||
private String reflectorUri;
|
||||
}
|
||||
@ -0,0 +1,19 @@
|
||||
package icu.samnyan.aqua.sega.chusan.model.response.data;
|
||||
|
||||
import icu.samnyan.aqua.sega.chusan.model.userdata.UserMusicDetail;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class UserMusicListItem {
|
||||
private int length;
|
||||
private List<UserMusicDetail> userMusicDetailList;
|
||||
}
|
||||
@ -0,0 +1,55 @@
|
||||
package icu.samnyan.aqua.sega.chusan.model.userdata;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Entity(name = "ChusanUserActivity")
|
||||
@Table(name = "chusan_user_activity", uniqueConstraints = {@UniqueConstraint(columnNames = {"user_id", "kind", "activity_id"})})
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@JsonPropertyOrder({"kind", "id", "sortNumber", "param1", "param2", "param3", "param4"})
|
||||
public class UserActivity implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@JsonIgnore
|
||||
private long id;
|
||||
|
||||
@JsonIgnore
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "user_id")
|
||||
private UserData user;
|
||||
|
||||
private int kind;
|
||||
|
||||
@JsonProperty("id")
|
||||
@Column(name = "activity_id")
|
||||
private int activityId;
|
||||
|
||||
private int sortNumber;
|
||||
|
||||
private int param1;
|
||||
|
||||
private int param2;
|
||||
|
||||
private int param3;
|
||||
|
||||
private int param4;
|
||||
|
||||
public UserActivity(UserData userData) {
|
||||
user = userData;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,62 @@
|
||||
package icu.samnyan.aqua.sega.chusan.model.userdata;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Entity(name = "ChusanUserCharacter")
|
||||
@Table(name = "chusan_user_character", uniqueConstraints = {@UniqueConstraint(columnNames = {"user_id", "character_id"})})
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@JsonPropertyOrder({"characterId", "playCount", "level", "friendshipExp", "isValid", "isNewMark", "exMaxLv", "assignIllust", "param1", "param2"})
|
||||
public class UserCharacter implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@JsonIgnore
|
||||
private long id;
|
||||
|
||||
@JsonIgnore
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "user_id")
|
||||
private UserData user;
|
||||
|
||||
@Column(name = "character_id")
|
||||
private int characterId;
|
||||
|
||||
private int playCount = 0;
|
||||
|
||||
private int level = 1;
|
||||
|
||||
private int friendshipExp = 0;
|
||||
|
||||
@JsonProperty("isValid")
|
||||
private boolean isValid = true;
|
||||
|
||||
@JsonProperty("isNewMark")
|
||||
private boolean isNewMark = true;
|
||||
|
||||
private int exMaxLv = 0;
|
||||
|
||||
private int assignIllust = 0;
|
||||
|
||||
private int param1 = 0;
|
||||
|
||||
private int param2 = 0;
|
||||
|
||||
public UserCharacter(UserData userData) {
|
||||
user = userData;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,54 @@
|
||||
package icu.samnyan.aqua.sega.chusan.model.userdata;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Entity(name = "ChusanUserCharge")
|
||||
@Table(name = "chusan_user_charge", uniqueConstraints = {@UniqueConstraint(columnNames = {"user_id", "charge_id"})})
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@JsonPropertyOrder({"chargeId", "stock", "purchaseDate", "validDate", "param1", "param2", "paramDate"})
|
||||
public class UserCharge implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@JsonIgnore
|
||||
private long id;
|
||||
|
||||
@JsonIgnore
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "user_id")
|
||||
private UserData user;
|
||||
|
||||
@Column(name = "charge_id")
|
||||
private int chargeId;
|
||||
|
||||
private int stock;
|
||||
|
||||
private LocalDateTime purchaseDate;
|
||||
|
||||
private LocalDateTime validDate;
|
||||
|
||||
private int param1;
|
||||
|
||||
private int param2;
|
||||
|
||||
private LocalDateTime paramDate;
|
||||
|
||||
public UserCharge(UserData user) {
|
||||
this.user = user;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,80 @@
|
||||
package icu.samnyan.aqua.sega.chusan.model.userdata;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Entity(name = "ChusanUserCourse")
|
||||
@Table(name = "chusan_user_course", uniqueConstraints = {@UniqueConstraint(columnNames = {"user_id", "course_id"})})
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class UserCourse {
|
||||
|
||||
@Id
|
||||
@JsonIgnore
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private long id;
|
||||
|
||||
@JsonIgnore
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "user_id")
|
||||
private UserData user;
|
||||
|
||||
@Column(name = "course_id")
|
||||
private int courseId;
|
||||
|
||||
private int classId;
|
||||
|
||||
private int playCount;
|
||||
|
||||
private int theoryCount;
|
||||
|
||||
private int scoreMax;
|
||||
|
||||
@JsonProperty("isFullCombo")
|
||||
private boolean isFullCombo;
|
||||
|
||||
@JsonProperty("isAllJustice")
|
||||
private boolean isAllJustice;
|
||||
|
||||
@JsonProperty("isSuccess")
|
||||
private boolean isSuccess;
|
||||
|
||||
private int scoreRank;
|
||||
|
||||
private int eventId;
|
||||
|
||||
private LocalDateTime lastPlayDate;
|
||||
|
||||
private int param1;
|
||||
|
||||
private int param2;
|
||||
|
||||
private int param3;
|
||||
|
||||
private int param4;
|
||||
|
||||
private int orderId;
|
||||
|
||||
private int playerRating;
|
||||
|
||||
@JsonProperty("isClear")
|
||||
private boolean isClear;
|
||||
|
||||
public UserCourse(UserData userData) {
|
||||
user = userData;
|
||||
}
|
||||
|
||||
public UserCourse(int classId) {
|
||||
this.classId = classId;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,338 @@
|
||||
package icu.samnyan.aqua.sega.chusan.model.userdata;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import icu.samnyan.aqua.sega.general.model.Card;
|
||||
import icu.samnyan.aqua.sega.util.jackson.AccessCodeSerializer;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Entity(name = "ChusanUserData")
|
||||
@Table(name = "chusan_user_data")
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@JsonPropertyOrder({
|
||||
"accessCode",
|
||||
"userName",
|
||||
"level",
|
||||
"reincarnationNum",
|
||||
"exp",
|
||||
"point",
|
||||
"totalPoint",
|
||||
"playCount",
|
||||
"multiPlayCount",
|
||||
"playerRating",
|
||||
"highestRating",
|
||||
"nameplateId",
|
||||
"frameId",
|
||||
"characterId",
|
||||
"trophyId",
|
||||
"playedTutorialBit",
|
||||
"firstTutorialCancelNum",
|
||||
"masterTutorialCancelNum",
|
||||
"totalMapNum",
|
||||
"totalHiScore",
|
||||
"totalBasicHighScore",
|
||||
"totalAdvancedHighScore",
|
||||
"totalExpertHighScore",
|
||||
"totalMasterHighScore",
|
||||
"totalUltimaHighScore",
|
||||
"eventWatchedDate",
|
||||
"friendCount",
|
||||
"firstGameId",
|
||||
"firstRomVersion",
|
||||
"firstDataVersion",
|
||||
"firstPlayDate",
|
||||
"lastGameId",
|
||||
"lastRomVersion",
|
||||
"lastDataVersion",
|
||||
"lastPlayDate",
|
||||
"lastPlaceId",
|
||||
"lastPlaceName",
|
||||
"lastRegionId",
|
||||
"lastRegionName",
|
||||
"lastAllNetId",
|
||||
"lastClientId",
|
||||
"lastCountryCode",
|
||||
"userNameEx",
|
||||
"compatibleCmVersion",
|
||||
"medal",
|
||||
"mapIconId",
|
||||
"voiceId",
|
||||
"avatarWear",
|
||||
"avatarHead",
|
||||
"avatarFace",
|
||||
"avatarSkin",
|
||||
"avatarItem",
|
||||
"avatarFront",
|
||||
"avatarBack",
|
||||
"classEmblemBase",
|
||||
"classEmblemMedal",
|
||||
"stockedGridCount",
|
||||
"exMapLoopCount",
|
||||
"netBattlePlayCount",
|
||||
"netBattleWinCount",
|
||||
"netBattleLoseCount",
|
||||
"netBattleConsecutiveWinCount",
|
||||
"charaIllustId",
|
||||
"skillId",
|
||||
"overPowerPoint",
|
||||
"overPowerRate",
|
||||
"overPowerLowerRank",
|
||||
"avatarPoint",
|
||||
"battleRankId",
|
||||
"battleRankPoint",
|
||||
"eliteRankPoint",
|
||||
"netBattle1stCount",
|
||||
"netBattle2ndCount",
|
||||
"netBattle3rdCount",
|
||||
"netBattle4thCount",
|
||||
"netBattleCorrection",
|
||||
"netBattleErrCnt",
|
||||
"netBattleHostErrCnt",
|
||||
"battleRewardStatus",
|
||||
"battleRewardIndex",
|
||||
"battleRewardCount",
|
||||
"ext1",
|
||||
"ext2",
|
||||
"ext3",
|
||||
"ext4",
|
||||
"ext5",
|
||||
"ext6",
|
||||
"ext7",
|
||||
"ext8",
|
||||
"ext9",
|
||||
"ext10",
|
||||
"extStr1",
|
||||
"extStr2",
|
||||
"extLong1",
|
||||
"extLong2",
|
||||
"rankUpChallengeResults",
|
||||
"isNetBattleHost",
|
||||
"netBattleEndState" })
|
||||
public class UserData implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@JsonIgnore
|
||||
private long id;
|
||||
|
||||
@JsonSerialize(using = AccessCodeSerializer.class)
|
||||
@JsonProperty(value = "accessCode", access = JsonProperty.Access.READ_ONLY)
|
||||
@OneToOne
|
||||
@JoinColumn(name = "card_id")
|
||||
private Card card;
|
||||
// Access code in card
|
||||
|
||||
private String userName;
|
||||
|
||||
private int level;
|
||||
|
||||
private int reincarnationNum;
|
||||
|
||||
private String exp;
|
||||
|
||||
private long point;
|
||||
|
||||
private long totalPoint;
|
||||
|
||||
private int playCount;
|
||||
|
||||
private int multiPlayCount;
|
||||
|
||||
private int playerRating;
|
||||
|
||||
private int highestRating;
|
||||
|
||||
private int nameplateId;
|
||||
|
||||
private int frameId;
|
||||
|
||||
private int characterId;
|
||||
|
||||
private int trophyId;
|
||||
|
||||
private int playedTutorialBit;
|
||||
|
||||
private int firstTutorialCancelNum;
|
||||
|
||||
private int masterTutorialCancelNum;
|
||||
|
||||
private int totalMapNum;
|
||||
|
||||
private long totalHiScore;
|
||||
|
||||
private long totalBasicHighScore;
|
||||
|
||||
private long totalAdvancedHighScore;
|
||||
|
||||
private long totalExpertHighScore;
|
||||
|
||||
private long totalMasterHighScore;
|
||||
|
||||
private long totalUltimaHighScore;
|
||||
|
||||
private LocalDateTime eventWatchedDate;
|
||||
|
||||
private int friendCount;
|
||||
|
||||
private String firstGameId;
|
||||
|
||||
private String firstRomVersion;
|
||||
|
||||
private String firstDataVersion;
|
||||
|
||||
private LocalDateTime firstPlayDate;
|
||||
|
||||
private String lastGameId;
|
||||
|
||||
private String lastRomVersion;
|
||||
|
||||
private String lastDataVersion;
|
||||
|
||||
@JsonIgnore
|
||||
private LocalDateTime lastLoginDate;
|
||||
|
||||
private LocalDateTime lastPlayDate;
|
||||
|
||||
private int lastPlaceId;
|
||||
|
||||
private String lastPlaceName;
|
||||
|
||||
private String lastRegionId;
|
||||
|
||||
private String lastRegionName;
|
||||
|
||||
private String lastAllNetId;
|
||||
|
||||
private String lastClientId;
|
||||
|
||||
private String lastCountryCode;
|
||||
|
||||
private String userNameEx;
|
||||
|
||||
private String compatibleCmVersion;
|
||||
|
||||
private int medal;
|
||||
|
||||
private int mapIconId;
|
||||
|
||||
private int voiceId;
|
||||
|
||||
private int avatarWear;
|
||||
|
||||
private int avatarHead;
|
||||
|
||||
private int avatarFace;
|
||||
|
||||
private int avatarSkin;
|
||||
|
||||
private int avatarItem;
|
||||
|
||||
private int avatarFront;
|
||||
|
||||
private int avatarBack;
|
||||
|
||||
private int classEmblemBase;
|
||||
|
||||
private int classEmblemMedal;
|
||||
|
||||
private int stockedGridCount;
|
||||
|
||||
private int exMapLoopCount;
|
||||
|
||||
private int netBattlePlayCount;
|
||||
|
||||
private int netBattleWinCount;
|
||||
|
||||
private int netBattleLoseCount;
|
||||
|
||||
private int netBattleConsecutiveWinCount;
|
||||
|
||||
private int charaIllustId;
|
||||
|
||||
private int skillId;
|
||||
|
||||
private int overPowerPoint;
|
||||
|
||||
private int overPowerRate;
|
||||
|
||||
private int overPowerLowerRank;
|
||||
|
||||
private int avatarPoint;
|
||||
|
||||
private int battleRankId;
|
||||
|
||||
private int battleRankPoint;
|
||||
|
||||
private int eliteRankPoint;
|
||||
|
||||
private int netBattle1stCount;
|
||||
|
||||
private int netBattle2ndCount;
|
||||
|
||||
private int netBattle3rdCount;
|
||||
|
||||
private int netBattle4thCount;
|
||||
|
||||
private int netBattleCorrection;
|
||||
|
||||
private int netBattleErrCnt;
|
||||
|
||||
private int netBattleHostErrCnt;
|
||||
|
||||
private int battleRewardStatus;
|
||||
|
||||
private int battleRewardIndex;
|
||||
|
||||
private int battleRewardCount;
|
||||
|
||||
private int ext1;
|
||||
|
||||
private int ext2;
|
||||
|
||||
private int ext3;
|
||||
|
||||
private int ext4;
|
||||
|
||||
private int ext5;
|
||||
|
||||
private int ext6;
|
||||
|
||||
private int ext7;
|
||||
|
||||
private int ext8;
|
||||
|
||||
private int ext9;
|
||||
|
||||
private int ext10;
|
||||
|
||||
private String extStr1;
|
||||
|
||||
private String extStr2;
|
||||
|
||||
private long extLong1;
|
||||
|
||||
private long extLong2;
|
||||
|
||||
private String rankUpChallengeResults;
|
||||
|
||||
@JsonProperty("isNetBattleHost")
|
||||
private boolean isNetBattleHost;
|
||||
|
||||
private int netBattleEndState;
|
||||
|
||||
}
|
||||
@ -0,0 +1,55 @@
|
||||
package icu.samnyan.aqua.sega.chusan.model.userdata;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Entity(name = "ChusanUserDuel")
|
||||
@Table(name = "chusan_user_duel", uniqueConstraints = {@UniqueConstraint(columnNames = {"user_id", "duel_id"})})
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class UserDuel {
|
||||
|
||||
@Id
|
||||
@JsonIgnore
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private long id;
|
||||
|
||||
@JsonIgnore
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "user_id")
|
||||
private UserData user;
|
||||
|
||||
@Column(name = "duel_id")
|
||||
private int duelId;
|
||||
|
||||
private int progress;
|
||||
|
||||
private int point;
|
||||
|
||||
@JsonProperty("isClear")
|
||||
private boolean isClear;
|
||||
|
||||
private LocalDateTime lastPlayDate;
|
||||
|
||||
private int param1;
|
||||
|
||||
private int param2;
|
||||
|
||||
private int param3;
|
||||
|
||||
private int param4;
|
||||
|
||||
public UserDuel(UserData userData) {
|
||||
user = userData;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,189 @@
|
||||
package icu.samnyan.aqua.sega.chusan.model.userdata;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Entity(name = "ChusanUserGameOption")
|
||||
@Table(name = "chusan_user_game_option")
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@JsonPropertyOrder({
|
||||
"bgInfo",
|
||||
"fieldColor",
|
||||
"guideSound",
|
||||
"soundEffect",
|
||||
"guideLine",
|
||||
"speed",
|
||||
"optionSet",
|
||||
"matching",
|
||||
"judgePos",
|
||||
"rating",
|
||||
"judgeCritical",
|
||||
"judgeJustice",
|
||||
"judgeAttack",
|
||||
"headphone",
|
||||
"playerLevel",
|
||||
"successTap",
|
||||
"successExTap",
|
||||
"successSlideHold",
|
||||
"successAir",
|
||||
"successFlick",
|
||||
"successSkill",
|
||||
"successTapTimbre",
|
||||
"privacy",
|
||||
"mirrorFumen",
|
||||
"selectMusicFilterLv",
|
||||
"sortMusicFilterLv",
|
||||
"sortMusicGenre",
|
||||
"categoryDetail",
|
||||
"judgeTimingOffset",
|
||||
"playTimingOffset",
|
||||
"fieldWallPosition",
|
||||
"resultVoiceShort",
|
||||
"notesThickness",
|
||||
"judgeAppendSe",
|
||||
"trackSkip",
|
||||
"hardJudge",
|
||||
"speed_120",
|
||||
"fieldWallPosition_120",
|
||||
"playTimingOffset_120",
|
||||
"judgeTimingOffset_120",
|
||||
"ext1",
|
||||
"ext2",
|
||||
"ext3",
|
||||
"ext4",
|
||||
"ext5",
|
||||
"ext6",
|
||||
"ext7",
|
||||
"ext8",
|
||||
"ext9",
|
||||
"ext10"
|
||||
})
|
||||
public class UserGameOption implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Id
|
||||
@JsonIgnore
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private long id;
|
||||
|
||||
@JsonIgnore
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "user_id")
|
||||
private UserData user;
|
||||
|
||||
private int bgInfo;
|
||||
|
||||
private int fieldColor;
|
||||
|
||||
private int guideSound;
|
||||
|
||||
private int soundEffect;
|
||||
|
||||
private int guideLine;
|
||||
|
||||
private int speed;
|
||||
|
||||
private int optionSet;
|
||||
|
||||
private int matching;
|
||||
|
||||
private int judgePos;
|
||||
|
||||
private int rating;
|
||||
|
||||
private int judgeCritical;
|
||||
|
||||
private int judgeJustice;
|
||||
|
||||
private int judgeAttack;
|
||||
|
||||
private int headphone;
|
||||
|
||||
private int playerLevel;
|
||||
|
||||
private int successTap;
|
||||
|
||||
private int successExTap;
|
||||
|
||||
private int successSlideHold;
|
||||
|
||||
private int successAir;
|
||||
|
||||
private int successFlick;
|
||||
|
||||
private int successSkill;
|
||||
|
||||
private int successTapTimbre;
|
||||
|
||||
private int privacy;
|
||||
|
||||
private int mirrorFumen;
|
||||
|
||||
private int selectMusicFilterLv;
|
||||
|
||||
private int sortMusicFilterLv;
|
||||
|
||||
private int sortMusicGenre;
|
||||
|
||||
private int categoryDetail;
|
||||
|
||||
private int judgeTimingOffset;
|
||||
|
||||
private int playTimingOffset;
|
||||
|
||||
private int fieldWallPosition;
|
||||
|
||||
private int resultVoiceShort;
|
||||
|
||||
private int notesThickness;
|
||||
|
||||
private int judgeAppendSe;
|
||||
|
||||
private int trackSkip;
|
||||
|
||||
private int hardJudge;
|
||||
|
||||
private int speed_120;
|
||||
|
||||
private int fieldWallPosition_120;
|
||||
|
||||
private int playTimingOffset_120;
|
||||
|
||||
private int judgeTimingOffset_120;
|
||||
|
||||
private int ext1;
|
||||
|
||||
private int ext2;
|
||||
|
||||
private int ext3;
|
||||
|
||||
private int ext4;
|
||||
|
||||
private int ext5;
|
||||
|
||||
private int ext6;
|
||||
|
||||
private int ext7;
|
||||
|
||||
private int ext8;
|
||||
|
||||
private int ext9;
|
||||
|
||||
private int ext10;
|
||||
|
||||
public UserGameOption(UserData userData) {
|
||||
user = userData;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,44 @@
|
||||
package icu.samnyan.aqua.sega.chusan.model.userdata;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* This is for storing the other data that doesn't need to save it in a separate table
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Entity(name = "ChusanUserGeneralData")
|
||||
@Table(name = "chusan_user_general_data")
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class UserGeneralData implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@JsonIgnore
|
||||
private long id;
|
||||
|
||||
@JsonIgnore
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "user_id")
|
||||
private UserData user;
|
||||
|
||||
private String propertyKey;
|
||||
|
||||
@Column(columnDefinition = "TEXT")
|
||||
private String propertyValue;
|
||||
|
||||
public UserGeneralData(UserData userData, String key) {
|
||||
this.user = userData;
|
||||
this.propertyKey = key;
|
||||
this.propertyValue = "";
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,51 @@
|
||||
package icu.samnyan.aqua.sega.chusan.model.userdata;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Entity(name = "ChusanUserItem")
|
||||
@Table(name = "chusan_user_item", uniqueConstraints = {@UniqueConstraint(columnNames = {"user_id", "item_id", "item_kind"})})
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@JsonPropertyOrder({"itemKind", "itemId", "stock", "isValid"})
|
||||
public class UserItem implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@JsonIgnore
|
||||
private long id;
|
||||
|
||||
@JsonIgnore
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "user_id")
|
||||
private UserData user;
|
||||
|
||||
// Kind ,Type
|
||||
@Column(name = "item_kind")
|
||||
private int itemKind;
|
||||
|
||||
@Column(name = "item_id")
|
||||
private int itemId;
|
||||
|
||||
private int stock = 1;
|
||||
|
||||
@JsonProperty("isValid")
|
||||
private boolean isValid = true;
|
||||
|
||||
public UserItem(UserData userData) {
|
||||
user = userData;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,64 @@
|
||||
package icu.samnyan.aqua.sega.chusan.model.userdata;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Entity(name = "ChusanUserMapArea")
|
||||
@Table(name = "chusan_user_map_area", uniqueConstraints = {@UniqueConstraint(columnNames = {"user_id", "map_area_id"})})
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@JsonPropertyOrder({
|
||||
"mapAreaId",
|
||||
"position",
|
||||
"isClear",
|
||||
"rate",
|
||||
"statusCount",
|
||||
"remainGridCount",
|
||||
"isLocked"
|
||||
})
|
||||
public class UserMapArea implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@JsonIgnore
|
||||
private long id;
|
||||
|
||||
@JsonIgnore
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "user_id")
|
||||
private UserData user;
|
||||
|
||||
@Column(name = "map_area_id")
|
||||
private int mapAreaId;
|
||||
|
||||
private int position;
|
||||
|
||||
@JsonProperty("isClear")
|
||||
private boolean isClear;
|
||||
|
||||
private int rate;
|
||||
|
||||
private int statusCount;
|
||||
|
||||
private int remainGridCount;
|
||||
|
||||
@JsonProperty("isLocked")
|
||||
private boolean isLocked;
|
||||
|
||||
public UserMapArea(UserData userData) {
|
||||
user = userData;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,107 @@
|
||||
package icu.samnyan.aqua.sega.chusan.model.userdata;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Entity(name = "ChusanUserMusicDetail")
|
||||
@Table(name = "chusan_user_music_detail", uniqueConstraints = {@UniqueConstraint(columnNames = {"user_id", "music_id", "level"})})
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@JsonPropertyOrder({
|
||||
"musicId",
|
||||
"level",
|
||||
"playCount",
|
||||
"scoreMax",
|
||||
"missCount",
|
||||
"maxComboCount",
|
||||
"isFullCombo",
|
||||
"isAllJustice",
|
||||
"isSuccess",
|
||||
"fullChain",
|
||||
"maxChain",
|
||||
"isLock",
|
||||
"theoryCount",
|
||||
"ext1"
|
||||
})
|
||||
public class UserMusicDetail implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@JsonIgnore
|
||||
private long id;
|
||||
|
||||
@JsonIgnore
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "user_id")
|
||||
private UserData user;
|
||||
|
||||
@Column(name = "music_id")
|
||||
private int musicId;
|
||||
|
||||
private int level;
|
||||
|
||||
private int playCount;
|
||||
|
||||
private int scoreMax;
|
||||
|
||||
private int missCount;
|
||||
|
||||
private int maxComboCount;
|
||||
|
||||
@JsonProperty("isFullCombo")
|
||||
private boolean isFullCombo;
|
||||
|
||||
@JsonProperty("isAllJustice")
|
||||
private boolean isAllJustice;
|
||||
|
||||
@JsonProperty("isSuccess")
|
||||
private boolean isSuccess;
|
||||
|
||||
private int fullChain;
|
||||
|
||||
private int maxChain;
|
||||
|
||||
private int scoreRank;
|
||||
|
||||
@JsonProperty("isLock")
|
||||
private boolean isLock;
|
||||
|
||||
private int theoryCount;
|
||||
|
||||
private int ext1;
|
||||
|
||||
public UserMusicDetail(UserData userData) {
|
||||
user = userData;
|
||||
}
|
||||
|
||||
public UserMusicDetail(int musicId, int level, int playCount, int scoreMax, int missCount, int maxComboCount, boolean isFullCombo, boolean isAllJustice, boolean isSuccess, int fullChain, int maxChain, int scoreRank, boolean isLock, int theoryCount, int ext1) {
|
||||
this.musicId = musicId;
|
||||
this.level = level;
|
||||
this.playCount = playCount;
|
||||
this.scoreMax = scoreMax;
|
||||
this.missCount = missCount;
|
||||
this.maxComboCount = maxComboCount;
|
||||
this.isFullCombo = isFullCombo;
|
||||
this.isAllJustice = isAllJustice;
|
||||
this.isSuccess = isSuccess;
|
||||
this.fullChain = fullChain;
|
||||
this.maxChain = maxChain;
|
||||
this.scoreRank = scoreRank;
|
||||
this.isLock = isLock;
|
||||
this.theoryCount = theoryCount;
|
||||
this.ext1 = ext1;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,150 @@
|
||||
package icu.samnyan.aqua.sega.chusan.model.userdata;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Entity(name = "ChusanUserPlaylog")
|
||||
@Table(name = "chusan_user_playlog")
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class UserPlaylog implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@JsonIgnore
|
||||
private long id;
|
||||
|
||||
@JsonIgnore
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "user_id")
|
||||
private UserData user;
|
||||
|
||||
private String romVersion;
|
||||
|
||||
private int orderId;
|
||||
|
||||
private int sortNumber;
|
||||
|
||||
private int placeId;
|
||||
|
||||
private LocalDateTime playDate;
|
||||
|
||||
private LocalDateTime userPlayDate;
|
||||
|
||||
private int musicId;
|
||||
|
||||
private int level;
|
||||
|
||||
private int customId;
|
||||
|
||||
private int playedUserId1;
|
||||
|
||||
private int playedUserId2;
|
||||
|
||||
private int playedUserId3;
|
||||
|
||||
private String playedUserName1;
|
||||
|
||||
private String playedUserName2;
|
||||
|
||||
private String playedUserName3;
|
||||
|
||||
private int playedMusicLevel1;
|
||||
|
||||
private int playedMusicLevel2;
|
||||
|
||||
private int playedMusicLevel3;
|
||||
|
||||
private int playedCustom1;
|
||||
|
||||
private int playedCustom2;
|
||||
|
||||
private int playedCustom3;
|
||||
|
||||
private int track;
|
||||
|
||||
private int score;
|
||||
|
||||
private int rank;
|
||||
|
||||
private int maxCombo;
|
||||
|
||||
private int maxChain;
|
||||
|
||||
private int rateTap;
|
||||
|
||||
private int rateHold;
|
||||
|
||||
private int rateSlide;
|
||||
|
||||
private int rateAir;
|
||||
|
||||
private int rateFlick;
|
||||
|
||||
private int judgeGuilty;
|
||||
|
||||
private int judgeAttack;
|
||||
|
||||
private int judgeJustice;
|
||||
|
||||
private int judgeCritical;
|
||||
|
||||
private int judgeHeaven;
|
||||
|
||||
private int eventId;
|
||||
|
||||
private int playerRating;
|
||||
|
||||
@JsonProperty("isNewRecord")
|
||||
private boolean isNewRecord;
|
||||
|
||||
@JsonProperty("isFullCombo")
|
||||
private boolean isFullCombo;
|
||||
|
||||
private int fullChainKind;
|
||||
|
||||
@JsonProperty("isAllJustice")
|
||||
private boolean isAllJustice;
|
||||
|
||||
@JsonProperty("isContinue")
|
||||
private boolean isContinue;
|
||||
|
||||
@JsonProperty("isFreeToPlay")
|
||||
private boolean isFreeToPlay;
|
||||
|
||||
private int characterId;
|
||||
|
||||
private int charaIllustId;
|
||||
|
||||
private int skillId;
|
||||
|
||||
private int playKind;
|
||||
|
||||
@JsonProperty("isClear")
|
||||
private boolean isClear;
|
||||
|
||||
private int skillLevel;
|
||||
|
||||
private int skillEffect;
|
||||
|
||||
private String placeName;
|
||||
|
||||
private int commonId;
|
||||
|
||||
public UserPlaylog(UserData userData) {
|
||||
user = userData;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,44 @@
|
||||
package icu.samnyan.aqua.sega.chusan.service;
|
||||
|
||||
import icu.samnyan.aqua.sega.chusan.dao.userdata.UserActivityRepository;
|
||||
import icu.samnyan.aqua.sega.chusan.model.userdata.UserActivity;
|
||||
import icu.samnyan.aqua.sega.chusan.model.userdata.UserData;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Service("ChusanUserActivityService")
|
||||
public class UserActivityService {
|
||||
|
||||
private final UserActivityRepository userActivityRepository;
|
||||
|
||||
@Autowired
|
||||
public UserActivityService(UserActivityRepository userActivityRepository) {
|
||||
this.userActivityRepository = userActivityRepository;
|
||||
}
|
||||
|
||||
public UserActivity save(UserActivity userActivity) {
|
||||
return userActivityRepository.save(userActivity);
|
||||
}
|
||||
|
||||
public List<UserActivity> saveAll(List<UserActivity> userActivityList) {
|
||||
return userActivityRepository.saveAll(userActivityList);
|
||||
}
|
||||
|
||||
public Optional<UserActivity> getByUserAndActivityIdAndKind(UserData user, int activityId, int kind) {
|
||||
return userActivityRepository.findTopByUserAndActivityIdAndKindOrderByIdDesc(user, activityId, kind);
|
||||
}
|
||||
|
||||
public List<UserActivity> getAllByUserIdAndKind(String userId, String kind) {
|
||||
return userActivityRepository.findAllByUser_Card_ExtIdAndKindOrderBySortNumberDesc(Long.parseLong(userId), Integer.parseInt(kind));
|
||||
}
|
||||
|
||||
public List<UserActivity> getByUserId(String userId) {
|
||||
return userActivityRepository.findAllByUser_Card_ExtId(Long.parseLong(userId));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,49 @@
|
||||
package icu.samnyan.aqua.sega.chusan.service;
|
||||
|
||||
import icu.samnyan.aqua.sega.chusan.dao.userdata.UserCharacterRepository;
|
||||
import icu.samnyan.aqua.sega.chusan.model.userdata.UserCharacter;
|
||||
import icu.samnyan.aqua.sega.chusan.model.userdata.UserData;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.data.domain.PageRequest;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Service("ChusanUserCharacterService")
|
||||
public class UserCharacterService {
|
||||
|
||||
private final UserCharacterRepository userCharacterRepository;
|
||||
|
||||
@Autowired
|
||||
public UserCharacterService(UserCharacterRepository userCharacterRepository) {
|
||||
this.userCharacterRepository = userCharacterRepository;
|
||||
}
|
||||
|
||||
public UserCharacter save(UserCharacter userCharacter) {
|
||||
return userCharacterRepository.save(userCharacter);
|
||||
}
|
||||
|
||||
public List<UserCharacter> saveAll(Iterable<UserCharacter> userCharacter) {
|
||||
return userCharacterRepository.saveAll(userCharacter);
|
||||
}
|
||||
|
||||
public List<UserCharacter> getByUserId(String userId) {
|
||||
return userCharacterRepository.findByUser_Card_ExtId(Long.parseLong(userId));
|
||||
}
|
||||
|
||||
public Page<UserCharacter> getByUserId(String userId, int pageNumber, int maxCount) {
|
||||
Pageable pageable = PageRequest.of(pageNumber, maxCount);
|
||||
return userCharacterRepository.findByUser_Card_ExtId(Long.parseLong(userId), pageable);
|
||||
}
|
||||
|
||||
public Optional<UserCharacter> getByUserAndCharacterId(UserData user, int characterId) {
|
||||
return userCharacterRepository.findTopByUserAndCharacterIdOrderByIdDesc(user, characterId);
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,39 @@
|
||||
package icu.samnyan.aqua.sega.chusan.service;
|
||||
|
||||
import icu.samnyan.aqua.sega.chusan.dao.userdata.UserChargeRepository;
|
||||
import icu.samnyan.aqua.sega.chusan.model.userdata.UserCharge;
|
||||
import icu.samnyan.aqua.sega.chusan.model.userdata.UserData;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Service("ChusanUserChargeService")
|
||||
public class UserChargeService {
|
||||
|
||||
private final UserChargeRepository userChargeRepository;
|
||||
|
||||
public UserChargeService(UserChargeRepository userChargeRepository) {
|
||||
this.userChargeRepository = userChargeRepository;
|
||||
}
|
||||
|
||||
public UserCharge save(UserCharge userCharge) {
|
||||
return userChargeRepository.save(userCharge);
|
||||
}
|
||||
|
||||
public List<UserCharge> saveAll(List<UserCharge> newUserChargeList) {
|
||||
return userChargeRepository.saveAll(newUserChargeList);
|
||||
}
|
||||
|
||||
public List<UserCharge> getByUserId(String userId) {
|
||||
return userChargeRepository.findByUser_Card_ExtId(Long.parseLong(userId));
|
||||
}
|
||||
|
||||
public Optional<UserCharge> getByUserAndChargeId(UserData user, int chargeId) {
|
||||
return userChargeRepository.findByUserAndChargeId(user, chargeId);
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,48 @@
|
||||
package icu.samnyan.aqua.sega.chusan.service;
|
||||
|
||||
import icu.samnyan.aqua.sega.chusan.dao.userdata.UserCourseRepository;
|
||||
import icu.samnyan.aqua.sega.chusan.model.userdata.UserCourse;
|
||||
import icu.samnyan.aqua.sega.chusan.model.userdata.UserData;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.data.domain.PageRequest;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Service("ChusanUserCourseService")
|
||||
public class UserCourseService {
|
||||
|
||||
private final UserCourseRepository userCourseRepository;
|
||||
|
||||
@Autowired
|
||||
public UserCourseService(UserCourseRepository userCourseRepository) {
|
||||
this.userCourseRepository = userCourseRepository;
|
||||
}
|
||||
|
||||
public UserCourse save(UserCourse userCourse) {
|
||||
return userCourseRepository.save(userCourse);
|
||||
}
|
||||
|
||||
public List<UserCourse> saveAll(Iterable<UserCourse> userMusicDetail) {
|
||||
return userCourseRepository.saveAll(userMusicDetail);
|
||||
}
|
||||
|
||||
public List<UserCourse> getByUserId(String userId) {
|
||||
return userCourseRepository.findByUser_Card_ExtId(Long.parseLong(userId));
|
||||
}
|
||||
|
||||
public Page<UserCourse> getByUserId(String userId, int pageNum, int maxCount) {
|
||||
Pageable page = PageRequest.of(pageNum, maxCount);
|
||||
return userCourseRepository.findByUser_Card_ExtId(Long.parseLong(userId), page);
|
||||
}
|
||||
|
||||
public Optional<UserCourse> getByUserAndCourseId(UserData user, int courseId) {
|
||||
return userCourseRepository.findTopByUserAndCourseIdOrderByIdDesc(user, courseId);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,45 @@
|
||||
package icu.samnyan.aqua.sega.chusan.service;
|
||||
|
||||
import icu.samnyan.aqua.sega.chusan.dao.userdata.UserDataRepository;
|
||||
import icu.samnyan.aqua.sega.chusan.model.userdata.UserData;
|
||||
import icu.samnyan.aqua.sega.general.model.Card;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Service("ChusanUserDataService")
|
||||
public class UserDataService {
|
||||
|
||||
private final UserDataRepository userDataRepository;
|
||||
|
||||
@Autowired
|
||||
public UserDataService(UserDataRepository userDataRepository) {
|
||||
this.userDataRepository = userDataRepository;
|
||||
}
|
||||
|
||||
public UserData saveUserData(UserData userData) {
|
||||
return userDataRepository.save(userData);
|
||||
}
|
||||
|
||||
public UserData saveAndFlushUserData(UserData userData) {
|
||||
return userDataRepository.saveAndFlush(userData);
|
||||
}
|
||||
|
||||
public Optional<UserData> getUserByExtId(String aimeId) {
|
||||
return userDataRepository.findByCard_ExtId(Long.parseLong(aimeId));
|
||||
}
|
||||
|
||||
public Optional<UserData> getUserByCard(Card card) {
|
||||
return userDataRepository.findByCard(card);
|
||||
}
|
||||
|
||||
public void updateLoginTime(UserData userData) {
|
||||
userData.setLastLoginDate(LocalDateTime.now());
|
||||
userDataRepository.save(userData);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,40 @@
|
||||
package icu.samnyan.aqua.sega.chusan.service;
|
||||
|
||||
import icu.samnyan.aqua.sega.chusan.dao.userdata.UserDuelRepository;
|
||||
import icu.samnyan.aqua.sega.chusan.model.userdata.UserData;
|
||||
import icu.samnyan.aqua.sega.chusan.model.userdata.UserDuel;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Service("ChusanUserDuelService")
|
||||
public class UserDuelService {
|
||||
|
||||
private final UserDuelRepository userDuelRepository;
|
||||
|
||||
@Autowired
|
||||
public UserDuelService(UserDuelRepository userDuelRepository) {
|
||||
this.userDuelRepository = userDuelRepository;
|
||||
}
|
||||
|
||||
public Optional<UserDuel> getByUserAndDuelId(UserData user, int duelId) {
|
||||
return userDuelRepository.findTopByUserAndDuelIdOrderByIdDesc(user, duelId);
|
||||
}
|
||||
|
||||
public UserDuel save(UserDuel userDuel) {
|
||||
return userDuelRepository.save(userDuel);
|
||||
}
|
||||
|
||||
public List<UserDuel> saveAll(Iterable<UserDuel> userDuel) {
|
||||
return userDuelRepository.saveAll(userDuel);
|
||||
}
|
||||
|
||||
public List<UserDuel> getByUserId(String userId) {
|
||||
return userDuelRepository.findByUser_Card_ExtId(Long.parseLong(userId));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,35 @@
|
||||
package icu.samnyan.aqua.sega.chusan.service;
|
||||
|
||||
import icu.samnyan.aqua.sega.chusan.dao.userdata.UserGameOptionRepository;
|
||||
import icu.samnyan.aqua.sega.chusan.model.userdata.UserData;
|
||||
import icu.samnyan.aqua.sega.chusan.model.userdata.UserGameOption;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Service("ChusanGameOptionService")
|
||||
public class UserGameOptionService {
|
||||
|
||||
private final UserGameOptionRepository userGameOptionRepository;
|
||||
|
||||
@Autowired
|
||||
public UserGameOptionService(UserGameOptionRepository userGameOptionRepository) {
|
||||
this.userGameOptionRepository = userGameOptionRepository;
|
||||
}
|
||||
|
||||
public UserGameOption save(UserGameOption userGameOption) {
|
||||
return userGameOptionRepository.save(userGameOption);
|
||||
}
|
||||
|
||||
public Optional<UserGameOption> getByUser(UserData user) {
|
||||
return userGameOptionRepository.findByUser(user);
|
||||
}
|
||||
|
||||
public Optional<UserGameOption> getByUserId(String userId) {
|
||||
return userGameOptionRepository.findByUser_Card_ExtId(Long.parseLong(userId));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,34 @@
|
||||
package icu.samnyan.aqua.sega.chusan.service;
|
||||
|
||||
import icu.samnyan.aqua.sega.chusan.dao.userdata.UserGeneralDataRepository;
|
||||
import icu.samnyan.aqua.sega.chusan.model.userdata.UserData;
|
||||
import icu.samnyan.aqua.sega.chusan.model.userdata.UserGeneralData;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Service("ChusanUserGeneralDataService")
|
||||
public class UserGeneralDataService {
|
||||
|
||||
private final UserGeneralDataRepository userGeneralDataRepository;
|
||||
|
||||
public UserGeneralDataService(UserGeneralDataRepository userGeneralDataRepository) {
|
||||
this.userGeneralDataRepository = userGeneralDataRepository;
|
||||
}
|
||||
|
||||
public UserGeneralData save(UserGeneralData userGeneralData) {
|
||||
return userGeneralDataRepository.save(userGeneralData);
|
||||
}
|
||||
|
||||
public Optional<UserGeneralData> getByUserAndKey(UserData user, String key) {
|
||||
return userGeneralDataRepository.findByUserAndPropertyKey(user, key);
|
||||
}
|
||||
|
||||
public Optional<UserGeneralData> getByUserIdAndKey(String userId, String key) {
|
||||
return userGeneralDataRepository.findByUser_Card_ExtIdAndPropertyKey(Long.parseLong(userId), key);
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,51 @@
|
||||
package icu.samnyan.aqua.sega.chusan.service;
|
||||
|
||||
import icu.samnyan.aqua.sega.chusan.dao.userdata.UserItemRepository;
|
||||
import icu.samnyan.aqua.sega.chusan.model.userdata.UserData;
|
||||
import icu.samnyan.aqua.sega.chusan.model.userdata.UserItem;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.data.domain.PageRequest;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Service("ChusanUserItemService")
|
||||
public class UserItemService {
|
||||
private final UserItemRepository userItemRepository;
|
||||
|
||||
@Autowired
|
||||
public UserItemService(UserItemRepository userItemRepository) {
|
||||
this.userItemRepository = userItemRepository;
|
||||
}
|
||||
|
||||
public UserItem save(UserItem userItem) {
|
||||
return userItemRepository.save(userItem);
|
||||
}
|
||||
|
||||
public List<UserItem> saveAll(Iterable<UserItem> userItem) {
|
||||
return userItemRepository.saveAll(userItem);
|
||||
}
|
||||
|
||||
public List<UserItem> getByUserId(String userId) {
|
||||
return userItemRepository.findAllByUser_Card_ExtId(Long.parseLong(userId));
|
||||
}
|
||||
|
||||
public Optional<UserItem> getByUserAndItemIdAndKind(UserData user, int itemId, int itemKind) {
|
||||
return userItemRepository.findTopByUserAndItemIdAndItemKindOrderByIdDesc(user, itemId, itemKind);
|
||||
}
|
||||
|
||||
public Page<UserItem> getByUserAndItemKind(String userId, int kind, int pageNumber, int maxCount) {
|
||||
Pageable page = PageRequest.of(pageNumber, maxCount);
|
||||
return userItemRepository.findAllByUser_Card_ExtIdAndItemKind(Long.parseLong(userId), kind, page);
|
||||
}
|
||||
|
||||
public Page<UserItem> getByUserId(String userId, int page, int size) {
|
||||
return userItemRepository.findByUser_Card_ExtId(Long.parseLong(userId), PageRequest.of(page, size));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,44 @@
|
||||
package icu.samnyan.aqua.sega.chusan.service;
|
||||
|
||||
import icu.samnyan.aqua.sega.chusan.dao.userdata.UserMapAreaRepository;
|
||||
import icu.samnyan.aqua.sega.chusan.model.userdata.UserData;
|
||||
import icu.samnyan.aqua.sega.chusan.model.userdata.UserMapArea;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Service("ChusanUserMapAreaService")
|
||||
public class UserMapAreaService {
|
||||
|
||||
private final UserMapAreaRepository userMapRepository;
|
||||
|
||||
@Autowired
|
||||
public UserMapAreaService(UserMapAreaRepository userMapRepository) {
|
||||
this.userMapRepository = userMapRepository;
|
||||
}
|
||||
|
||||
public UserMapArea save(UserMapArea userMap) {
|
||||
return userMapRepository.save(userMap);
|
||||
}
|
||||
|
||||
public List<UserMapArea> saveAll(Iterable<UserMapArea> userMap) {
|
||||
return userMapRepository.saveAll(userMap);
|
||||
}
|
||||
|
||||
public List<UserMapArea> getByUser(UserData user) {
|
||||
return userMapRepository.findAllByUser(user);
|
||||
}
|
||||
|
||||
public List<UserMapArea> getByUserId(String userId) {
|
||||
return userMapRepository.findAllByUser_Card_ExtId(Long.parseLong(userId));
|
||||
}
|
||||
|
||||
public Optional<UserMapArea> getByUserAndMapAreaId(UserData user, int mapId) {
|
||||
return userMapRepository.findTopByUserAndMapAreaIdOrderByIdDesc(user, mapId);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,50 @@
|
||||
package icu.samnyan.aqua.sega.chusan.service;
|
||||
|
||||
import icu.samnyan.aqua.sega.chusan.dao.userdata.UserMusicDetailRepository;
|
||||
import icu.samnyan.aqua.sega.chusan.model.userdata.UserData;
|
||||
import icu.samnyan.aqua.sega.chusan.model.userdata.UserMusicDetail;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Service("ChusanUserMusicDetailService")
|
||||
public class UserMusicDetailService {
|
||||
|
||||
private final UserMusicDetailRepository userMusicDetailRepository;
|
||||
|
||||
@Autowired
|
||||
public UserMusicDetailService(UserMusicDetailRepository userMusicDetailRepository) {
|
||||
this.userMusicDetailRepository = userMusicDetailRepository;
|
||||
}
|
||||
|
||||
public UserMusicDetail save(UserMusicDetail userMusicDetail) {
|
||||
return userMusicDetailRepository.save(userMusicDetail);
|
||||
}
|
||||
|
||||
public List<UserMusicDetail> saveAll(Iterable<UserMusicDetail> userMusicDetail) {
|
||||
return userMusicDetailRepository.saveAll(userMusicDetail);
|
||||
}
|
||||
|
||||
public List<UserMusicDetail> getByUserId(String userId) {
|
||||
return userMusicDetailRepository.findByUser_Card_ExtId(Long.parseLong(userId));
|
||||
}
|
||||
|
||||
public Page<UserMusicDetail> getByUserId(String userId, Pageable page) {
|
||||
return userMusicDetailRepository.findByUser_Card_ExtId(Long.parseLong(userId), page);
|
||||
}
|
||||
|
||||
public List<UserMusicDetail> getByUserIdAndMusicId(String userId, int musicId) {
|
||||
return userMusicDetailRepository.findByUser_Card_ExtIdAndMusicId(Long.parseLong(userId), musicId);
|
||||
}
|
||||
|
||||
public Optional<UserMusicDetail> getByUserAndMusicIdAndLevel(UserData user, int musicId, int level) {
|
||||
return userMusicDetailRepository.findTopByUserAndMusicIdAndLevelOrderByIdDesc(user, musicId, level);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,51 @@
|
||||
package icu.samnyan.aqua.sega.chusan.service;
|
||||
|
||||
import icu.samnyan.aqua.sega.chusan.dao.userdata.UserPlaylogRepository;
|
||||
import icu.samnyan.aqua.sega.chusan.model.userdata.UserPlaylog;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.data.domain.PageRequest;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.data.domain.Sort;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Service("ChusanUserPlaylogService")
|
||||
public class UserPlaylogService {
|
||||
|
||||
private final UserPlaylogRepository userPlaylogRepository;
|
||||
|
||||
@Autowired
|
||||
public UserPlaylogService(UserPlaylogRepository userPlaylogRepository) {
|
||||
this.userPlaylogRepository = userPlaylogRepository;
|
||||
}
|
||||
|
||||
public UserPlaylog save(UserPlaylog userPlaylog) {
|
||||
return userPlaylogRepository.save(userPlaylog);
|
||||
}
|
||||
|
||||
public List<UserPlaylog> saveAll(List<UserPlaylog> userPlaylogList) {
|
||||
return userPlaylogRepository.saveAll(userPlaylogList);
|
||||
}
|
||||
|
||||
public Page<UserPlaylog> getRecentPlays(String userId, Pageable page) {
|
||||
return userPlaylogRepository.findByUser_Card_ExtId(Long.parseLong(userId), page);
|
||||
}
|
||||
|
||||
public List<UserPlaylog> getRecent30Plays(String userId) {
|
||||
Pageable page = PageRequest.of(0, 30, Sort.by(Sort.Direction.DESC, "userPlayDate"));
|
||||
return userPlaylogRepository.findByUser_Card_ExtIdAndLevelNot(Long.parseLong(userId), 4, page);
|
||||
}
|
||||
|
||||
public List<UserPlaylog> getByUserId(String userId) {
|
||||
return userPlaylogRepository.findByUser_Card_ExtId(Long.parseLong(userId));
|
||||
}
|
||||
|
||||
public List<UserPlaylog> getByUserIdAndMusicIdAndLevel(String userId, int id, int level) {
|
||||
return userPlaylogRepository.findByUser_Card_ExtIdAndMusicIdAndLevel(Long.parseLong(userId), id, level);
|
||||
}
|
||||
}
|
||||
@ -29,6 +29,7 @@ public class CompressionFilter extends OncePerRequestFilter {
|
||||
filterList.add("/OngekiServlet");
|
||||
filterList.add("/MaimaiServlet");
|
||||
filterList.add("/Maimai2Servlet");
|
||||
filterList.add("/ChusanServlet");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
383
src/main/resources/db/migration/mysql/V76__add_chusan_table.sql
Normal file
383
src/main/resources/db/migration/mysql/V76__add_chusan_table.sql
Normal file
@ -0,0 +1,383 @@
|
||||
CREATE TABLE chusan_game_event (
|
||||
id BIGINT auto_increment PRIMARY KEY,
|
||||
end_date DATETIME,
|
||||
start_date DATETIME,
|
||||
type INTEGER NOT NULL,
|
||||
enable BOOLEAN NOT NULL
|
||||
);
|
||||
|
||||
CREATE TABLE chusan_game_charge (
|
||||
id BIGINT auto_increment PRIMARY KEY,
|
||||
charge_id INTEGER,
|
||||
end_date DATETIME,
|
||||
order_id INTEGER NOT NULL,
|
||||
price INTEGER NOT NULL,
|
||||
sale_end_date DATETIME,
|
||||
sale_price INTEGER NOT NULL,
|
||||
sale_start_date DATETIME,
|
||||
start_date DATETIME
|
||||
);
|
||||
|
||||
CREATE TABLE chusan_user_data (
|
||||
id BIGINT auto_increment PRIMARY KEY,
|
||||
user_name VARCHAR (255),
|
||||
level INTEGER,
|
||||
reincarnation_num INTEGER,
|
||||
exp VARCHAR (255),
|
||||
point BIGINT,
|
||||
total_point BIGINT,
|
||||
play_count INTEGER,
|
||||
multi_play_count INTEGER,
|
||||
player_rating INTEGER,
|
||||
highest_rating INTEGER,
|
||||
nameplate_id INTEGER,
|
||||
frame_id INTEGER,
|
||||
character_id INTEGER,
|
||||
trophy_id INTEGER,
|
||||
played_tutorial_bit INTEGER,
|
||||
first_tutorial_cancel_num INTEGER,
|
||||
master_tutorial_cancel_num INTEGER,
|
||||
total_map_num INTEGER,
|
||||
total_hi_score BIGINT,
|
||||
total_basic_high_score BIGINT,
|
||||
total_advanced_high_score BIGINT,
|
||||
total_expert_high_score BIGINT,
|
||||
total_master_high_score BIGINT,
|
||||
total_ultima_high_score BIGINT,
|
||||
event_watched_date DATETIME,
|
||||
friend_count INTEGER,
|
||||
first_game_id VARCHAR (255),
|
||||
first_rom_version VARCHAR (255),
|
||||
first_data_version VARCHAR (255),
|
||||
first_play_date DATETIME,
|
||||
last_game_id VARCHAR (255),
|
||||
last_rom_version VARCHAR (255),
|
||||
last_data_version VARCHAR (255),
|
||||
last_login_date DATETIME,
|
||||
last_play_date DATETIME,
|
||||
last_place_id INTEGER,
|
||||
last_place_name VARCHAR (255),
|
||||
last_region_id VARCHAR (255),
|
||||
last_region_name VARCHAR (255),
|
||||
last_all_net_id VARCHAR (255),
|
||||
last_client_id VARCHAR (255),
|
||||
last_country_code VARCHAR (255),
|
||||
user_name_ex VARCHAR (255),
|
||||
compatible_cm_version VARCHAR (255),
|
||||
medal INTEGER,
|
||||
map_icon_id INTEGER,
|
||||
voice_id INTEGER,
|
||||
avatar_wear INTEGER,
|
||||
avatar_head INTEGER,
|
||||
avatar_face INTEGER,
|
||||
avatar_skin INTEGER,
|
||||
avatar_item INTEGER,
|
||||
avatar_front INTEGER,
|
||||
avatar_back INTEGER,
|
||||
class_emblem_base INTEGER,
|
||||
class_emblem_medal INTEGER,
|
||||
stocked_grid_count INTEGER,
|
||||
ex_map_loop_count INTEGER,
|
||||
net_battle_play_count INTEGER,
|
||||
net_battle_win_count INTEGER,
|
||||
net_battle_lose_count INTEGER,
|
||||
net_battle_consecutive_win_count INTEGER,
|
||||
chara_illust_id INTEGER,
|
||||
skill_id INTEGER,
|
||||
over_power_point INTEGER,
|
||||
over_power_rate INTEGER,
|
||||
over_power_lower_rank INTEGER,
|
||||
avatar_point INTEGER,
|
||||
battle_rank_id INTEGER,
|
||||
battle_rank_point INTEGER,
|
||||
elite_rank_point INTEGER,
|
||||
net_battle1st_count INTEGER,
|
||||
net_battle2nd_count INTEGER,
|
||||
net_battle3rd_count INTEGER,
|
||||
net_battle4th_count INTEGER,
|
||||
net_battle_correction INTEGER,
|
||||
net_battle_err_cnt INTEGER,
|
||||
net_battle_host_err_cnt INTEGER,
|
||||
battle_reward_status INTEGER,
|
||||
battle_reward_index INTEGER,
|
||||
battle_reward_count INTEGER,
|
||||
ext1 INTEGER,
|
||||
ext2 INTEGER,
|
||||
ext3 INTEGER,
|
||||
ext4 INTEGER,
|
||||
ext5 INTEGER,
|
||||
ext6 INTEGER,
|
||||
ext7 INTEGER,
|
||||
ext8 INTEGER,
|
||||
ext9 INTEGER,
|
||||
ext10 INTEGER,
|
||||
ext_str1 VARCHAR (255),
|
||||
ext_str2 VARCHAR (255),
|
||||
ext_long1 BIGINT,
|
||||
ext_long2 BIGINT,
|
||||
rank_up_challenge_results VARCHAR (255),
|
||||
is_net_battle_host boolean,
|
||||
net_battle_end_state INTEGER,
|
||||
card_id BIGINT,
|
||||
constraint FKc23WucGD33TdiRfS
|
||||
foreign key (card_id) references sega_card (id)
|
||||
);
|
||||
|
||||
CREATE TABLE chusan_user_activity (
|
||||
id BIGINT auto_increment PRIMARY KEY,
|
||||
activity_id INTEGER,
|
||||
kind INTEGER NOT NULL,
|
||||
param1 INTEGER NOT NULL,
|
||||
param2 INTEGER NOT NULL,
|
||||
param3 INTEGER NOT NULL,
|
||||
param4 INTEGER NOT NULL,
|
||||
sort_number INTEGER NOT NULL,
|
||||
user_id BIGINT,
|
||||
constraint FKf5rvHXNuckmxrdg4
|
||||
foreign key (user_id) references chusan_user_data (id)
|
||||
);
|
||||
|
||||
CREATE TABLE chusan_user_character (
|
||||
id BIGINT auto_increment PRIMARY KEY,
|
||||
character_id INTEGER NOT NULL,
|
||||
friendship_exp INTEGER NOT NULL,
|
||||
is_valid BOOLEAN NOT NULL,
|
||||
is_new_mark BOOLEAN NOT NULL,
|
||||
level INTEGER NOT NULL,
|
||||
param1 INTEGER NOT NULL,
|
||||
param2 INTEGER NOT NULL,
|
||||
play_count INTEGER NOT NULL,
|
||||
ex_max_lv INTEGER NOT NULL,
|
||||
assign_illust INTEGER NOT NULL,
|
||||
user_id BIGINT,
|
||||
constraint FKiKbot6692sbjFf26
|
||||
foreign key (user_id) references chusan_user_data (id)
|
||||
);
|
||||
|
||||
CREATE TABLE chusan_user_charge (
|
||||
id BIGINT auto_increment PRIMARY KEY,
|
||||
charge_id INTEGER NOT NULL,
|
||||
param1 INTEGER NOT NULL,
|
||||
param2 INTEGER NOT NULL,
|
||||
param_date DATETIME,
|
||||
purchase_date DATETIME,
|
||||
stock INTEGER NOT NULL,
|
||||
valid_date DATETIME,
|
||||
user_id BIGINT,
|
||||
constraint FKdNfjaTU2zHubyDPH
|
||||
foreign key (user_id) references chusan_user_data (id)
|
||||
);
|
||||
|
||||
CREATE TABLE chusan_user_course (
|
||||
id BIGINT auto_increment PRIMARY KEY,
|
||||
class_id INTEGER NOT NULL,
|
||||
course_id INTEGER NOT NULL,
|
||||
event_id INTEGER NOT NULL,
|
||||
is_all_justice BOOLEAN NOT NULL,
|
||||
is_clear BOOLEAN NOT NULL,
|
||||
is_full_combo BOOLEAN NOT NULL,
|
||||
is_success BOOLEAN NOT NULL,
|
||||
last_play_date DATETIME,
|
||||
param1 INTEGER NOT NULL,
|
||||
param2 INTEGER NOT NULL,
|
||||
param3 INTEGER NOT NULL,
|
||||
param4 INTEGER NOT NULL,
|
||||
play_count INTEGER NOT NULL,
|
||||
theory_count INTEGER,
|
||||
score_max INTEGER NOT NULL,
|
||||
score_rank INTEGER NOT NULL,
|
||||
order_id INTEGER,
|
||||
player_rating INTEGER,
|
||||
user_id BIGINT,
|
||||
constraint FKaWDgdwc4AzsXBPkR
|
||||
foreign key (user_id) references chusan_user_data (id)
|
||||
);
|
||||
|
||||
CREATE TABLE chusan_user_duel (
|
||||
id BIGINT auto_increment PRIMARY KEY,
|
||||
duel_id INTEGER NOT NULL,
|
||||
is_clear BOOLEAN NOT NULL,
|
||||
last_play_date DATETIME,
|
||||
param1 INTEGER NOT NULL,
|
||||
param2 INTEGER NOT NULL,
|
||||
param3 INTEGER NOT NULL,
|
||||
param4 INTEGER NOT NULL,
|
||||
point INTEGER NOT NULL,
|
||||
progress INTEGER NOT NULL,
|
||||
user_id BIGINT,
|
||||
constraint FKjCoYYUP9CQkMonvQ
|
||||
foreign key (user_id) references chusan_user_data (id)
|
||||
);
|
||||
|
||||
CREATE TABLE chusan_user_game_option (
|
||||
id BIGINT auto_increment PRIMARY KEY,
|
||||
bg_info INTEGER NOT NULL,
|
||||
field_color INTEGER NOT NULL,
|
||||
guide_sound INTEGER NOT NULL,
|
||||
sound_effect INTEGER NOT NULL,
|
||||
guide_line INTEGER NOT NULL,
|
||||
speed INTEGER NOT NULL,
|
||||
option_set INTEGER NOT NULL,
|
||||
matching INTEGER NOT NULL,
|
||||
judge_pos INTEGER NOT NULL,
|
||||
rating INTEGER NOT NULL,
|
||||
judge_critical INTEGER NOT NULL,
|
||||
judge_justice INTEGER NOT NULL,
|
||||
judge_attack INTEGER NOT NULL,
|
||||
headphone INTEGER NOT NULL,
|
||||
player_level INTEGER NOT NULL,
|
||||
success_tap INTEGER NOT NULL,
|
||||
success_ex_tap INTEGER NOT NULL,
|
||||
success_slide_hold INTEGER NOT NULL,
|
||||
success_air INTEGER NOT NULL,
|
||||
success_flick INTEGER NOT NULL,
|
||||
success_skill INTEGER NOT NULL,
|
||||
success_tap_timbre INTEGER NOT NULL,
|
||||
privacy INTEGER NOT NULL,
|
||||
mirror_fumen INTEGER NOT NULL,
|
||||
select_music_filter_lv INTEGER NOT NULL,
|
||||
sort_music_filter_lv INTEGER NOT NULL,
|
||||
sort_music_genre INTEGER NOT NULL,
|
||||
category_detail INTEGER NOT NULL,
|
||||
judge_timing_offset INTEGER NOT NULL,
|
||||
play_timing_offset INTEGER NOT NULL,
|
||||
field_wall_position INTEGER NOT NULL,
|
||||
result_voice_short INTEGER NOT NULL,
|
||||
notes_thickness INTEGER NOT NULL,
|
||||
judge_append_se INTEGER NOT NULL,
|
||||
track_skip INTEGER NOT NULL,
|
||||
hard_judge INTEGER NOT NULL,
|
||||
speed_120 INTEGER NOT NULL,
|
||||
field_wall_position_120 INTEGER NOT NULL,
|
||||
play_timing_offset_120 INTEGER NOT NULL,
|
||||
judge_timing_offset_120 INTEGER NOT NULL,
|
||||
ext1 INTEGER NOT NULL,
|
||||
ext2 INTEGER NOT NULL,
|
||||
ext3 INTEGER NOT NULL,
|
||||
ext4 INTEGER NOT NULL,
|
||||
ext5 INTEGER NOT NULL,
|
||||
ext6 INTEGER NOT NULL,
|
||||
ext7 INTEGER NOT NULL,
|
||||
ext8 INTEGER NOT NULL,
|
||||
ext9 INTEGER NOT NULL,
|
||||
ext10 INTEGER NOT NULL,
|
||||
user_id BIGINT,
|
||||
constraint FKycpxSx4dCL7Lqg79
|
||||
foreign key (user_id) references chusan_user_data (id)
|
||||
);
|
||||
|
||||
CREATE TABLE chusan_user_general_data (
|
||||
id BIGINT auto_increment PRIMARY KEY,
|
||||
property_key VARCHAR NOT NULL,
|
||||
property_value VARCHAR NOT NULL,
|
||||
user_id BIGINT,
|
||||
constraint FKm4k7mAMRbn6TRj3N
|
||||
foreign key (user_id) references chusan_user_data (id)
|
||||
);
|
||||
|
||||
CREATE TABLE chusan_user_item (
|
||||
id BIGINT auto_increment PRIMARY KEY,
|
||||
is_valid BOOLEAN NOT NULL,
|
||||
item_id INTEGER NOT NULL,
|
||||
item_kind INTEGER NOT NULL,
|
||||
stock INTEGER NOT NULL,
|
||||
user_id BIGINT,
|
||||
constraint FKi2DMppnreWLXFZpR
|
||||
foreign key (user_id) references chusan_user_data (id)
|
||||
);
|
||||
|
||||
CREATE TABLE chusan_user_map_area (
|
||||
id BIGINT auto_increment PRIMARY KEY,
|
||||
is_clear BOOLEAN NOT NULL,
|
||||
is_locked BOOLEAN NOT NULL,
|
||||
map_area_id BOOLEAN NOT NULL,
|
||||
position INTEGER NOT NULL,
|
||||
rate INTEGER NOT NULL,
|
||||
status_count INTEGER NOT NULL,
|
||||
remain_grid_count INTEGER NOT NULL,
|
||||
user_id BIGINT,
|
||||
constraint FKvd9cgwBT5UhMT68G
|
||||
foreign key (user_id) references chusan_user_data (id)
|
||||
);
|
||||
|
||||
CREATE TABLE chusan_user_music_detail (
|
||||
id BIGINT auto_increment PRIMARY KEY,
|
||||
full_chain INTEGER NOT NULL,
|
||||
is_all_justice BOOLEAN NOT NULL,
|
||||
is_full_combo BOOLEAN NOT NULL,
|
||||
is_lock BOOLEAN NOT NULL,
|
||||
is_success BOOLEAN NOT NULL,
|
||||
level INTEGER NOT NULL,
|
||||
max_chain INTEGER NOT NULL,
|
||||
max_combo_count INTEGER NOT NULL,
|
||||
miss_count INTEGER NOT NULL,
|
||||
music_id INTEGER NOT NULL,
|
||||
play_count INTEGER NOT NULL,
|
||||
theory_count INTEGER,
|
||||
ext1 INTEGER,
|
||||
score_max INTEGER NOT NULL,
|
||||
score_rank INTEGER NOT NULL,
|
||||
user_id BIGINT,
|
||||
constraint FKjytSU5b3AxKZ55P2
|
||||
foreign key (user_id) references chusan_user_data (id)
|
||||
);
|
||||
|
||||
CREATE TABLE chusan_user_playlog (
|
||||
id BIGINT auto_increment PRIMARY KEY,
|
||||
rom_version VARCHAR (255),
|
||||
character_id INTEGER NOT NULL,
|
||||
chara_illust_id INTEGER NOT NULL,
|
||||
custom_id INTEGER NOT NULL,
|
||||
common_id INTEGER NOT NULL,
|
||||
event_id INTEGER NOT NULL,
|
||||
full_chain_kind INTEGER NOT NULL,
|
||||
is_all_justice BOOLEAN NOT NULL,
|
||||
is_clear BOOLEAN NOT NULL,
|
||||
is_continue BOOLEAN NOT NULL,
|
||||
is_free_to_play BOOLEAN NOT NULL,
|
||||
is_full_combo BOOLEAN NOT NULL,
|
||||
is_new_record BOOLEAN NOT NULL,
|
||||
judge_attack INTEGER NOT NULL,
|
||||
judge_critical INTEGER NOT NULL,
|
||||
judge_guilty INTEGER NOT NULL,
|
||||
judge_justice INTEGER NOT NULL,
|
||||
judge_heaven INTEGER NOT NULL,
|
||||
level INTEGER NOT NULL,
|
||||
max_chain INTEGER NOT NULL,
|
||||
max_combo INTEGER NOT NULL,
|
||||
music_id INTEGER NOT NULL,
|
||||
order_id INTEGER NOT NULL,
|
||||
place_id INTEGER NOT NULL,
|
||||
place_name VARCHAR (255),
|
||||
play_date DATETIME,
|
||||
play_kind INTEGER NOT NULL,
|
||||
played_custom1 INTEGER NOT NULL,
|
||||
played_custom2 INTEGER NOT NULL,
|
||||
played_custom3 INTEGER NOT NULL,
|
||||
played_music_level1 INTEGER NOT NULL,
|
||||
played_music_level2 INTEGER NOT NULL,
|
||||
played_music_level3 INTEGER NOT NULL,
|
||||
played_user_id1 INTEGER NOT NULL,
|
||||
played_user_id2 INTEGER NOT NULL,
|
||||
played_user_id3 INTEGER NOT NULL,
|
||||
played_user_name1 VARCHAR (255),
|
||||
played_user_name2 VARCHAR (255),
|
||||
played_user_name3 VARCHAR (255),
|
||||
player_rating INTEGER NOT NULL,
|
||||
rank INTEGER NOT NULL,
|
||||
rate_air INTEGER NOT NULL,
|
||||
rate_flick INTEGER NOT NULL,
|
||||
rate_hold INTEGER NOT NULL,
|
||||
rate_slide INTEGER NOT NULL,
|
||||
rate_tap INTEGER NOT NULL,
|
||||
score INTEGER NOT NULL,
|
||||
skill_effect INTEGER NOT NULL,
|
||||
skill_id INTEGER NOT NULL,
|
||||
skill_level INTEGER NOT NULL,
|
||||
sort_number INTEGER NOT NULL,
|
||||
track INTEGER NOT NULL,
|
||||
user_play_date DATETIME,
|
||||
user_id BIGINT,
|
||||
constraint FKt6VM3gn63tz4Tghc
|
||||
foreign key (user_id) references chusan_user_data (id)
|
||||
);
|
||||
@ -0,0 +1,141 @@
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (0, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',0, b'1');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (1, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',11, b'1');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',0, b'1');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (11, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',6, b'1');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10000, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',3, b'1');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10006, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',1, b'0');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10007, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',1, b'0');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10008, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',1, b'0');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10009, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',1, b'0');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10010, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',1, b'0');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10011, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',1, b'0');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10012, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',3, b'1');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10013, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',1, b'0');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10014, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',1, b'0');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10015, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',2, b'1');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10016, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',2, b'1');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10017, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',2, b'1');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10018, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',2, b'1');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10019, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',2, b'1');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10020, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',2, b'1');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10021, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',2, b'1');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10022, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',2, b'1');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10023, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',2, b'1');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10024, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',2, b'1');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10025, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',2, b'1');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10026, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',1, b'0');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10027, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',2, b'1');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10028, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',2, b'1');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10029, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',2, b'1');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10030, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',2, b'1');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10031, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',8, b'1');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10032, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',1, b'0');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10033, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',1, b'0');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10034, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',2, b'1');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10035, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',8, b'1');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10036, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',1, b'0');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10037, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',2, b'1');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10038, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',8, b'1');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10039, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',2, b'1');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10040, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',1, b'0');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10041, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',2, b'1');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10042, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',1, b'0');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10043, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',9, b'1');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10044, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',1, b'0');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10045, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',10, b'1');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10046, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',1, b'0');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10047, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',12, b'1');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10048, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',7, b'1');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10049, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',7, b'1');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10050, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',3, b'1');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10051, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',1, b'0');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10052, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',3, b'1');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10053, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',3, b'1');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10054, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',5, b'1');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10055, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',4, b'1');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10056, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',11, b'1');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10080, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',1, b'0');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10081, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',3, b'1');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10082, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',1, b'0');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10083, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',2, b'1');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10100, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',3, b'1');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10101, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',1, b'0');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10102, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',3, b'1');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10103, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',1, b'0');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10104, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',2, b'1');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10105, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',1, b'0');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10106, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',2, b'1');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10107, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',8, b'1');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10108, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',1, b'0');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10109, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',2, b'1');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10110, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',1, b'0');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10111, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',9, b'1');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10112, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',1, b'0');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10113, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',10, b'1');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10114, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',1, b'0');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10115, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',12, b'1');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10116, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',3, b'1');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10117, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',5, b'1');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10118, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',4, b'1');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10119, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',1, b'0');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10150, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',1, b'0');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10151, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',7, b'1');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10170, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',1, b'0');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10171, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',3, b'1');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10172, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',1, b'0');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10173, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',2, b'1');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10174, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',8, b'1');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10175, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',1, b'0');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10176, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',7, b'1');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10177, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',1, b'0');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10178, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',3, b'1');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10200, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',3, b'1');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10201, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',1, b'0');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10202, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',3, b'1');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10203, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',1, b'0');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10204, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',2, b'1');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10205, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',8, b'1');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10206, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',1, b'0');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10207, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',2, b'1');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10208, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',1, b'0');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10209, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',9, b'1');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10210, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',1, b'0');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10211, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',10, b'1');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10212, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',1, b'0');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10213, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',12, b'1');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10214, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',3, b'1');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10215, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',5, b'1');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10216, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',4, b'1');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10217, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',11, b'1');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10218, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',1, b'0');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10250, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',1, b'0');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10251, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',3, b'1');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10252, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',1, b'0');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10253, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',2, b'1');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10254, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',8, b'1');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10255, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',3, b'1');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10256, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',1, b'0');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10257, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',3, b'1');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10258, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',11, b'1');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10300, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',3, b'1');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10301, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',1, b'0');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10302, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',3, b'1');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10303, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',1, b'0');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10304, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',8, b'1');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10305, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',1, b'0');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10306, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',2, b'1');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10307, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',8, b'1');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10308, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',1, b'0');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10309, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',2, b'1');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10310, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',1, b'0');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10311, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',9, b'1');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10312, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',1, b'0');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10313, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',10, b'1');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10314, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',1, b'0');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10315, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',12, b'1');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10316, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',7, b'1');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10317, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',1, b'0');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10318, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',3, b'1');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10319, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',3, b'1');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10320, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',5, b'1');
|
||||
INSERT INTO `chuni_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10321, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',11, b'1');
|
||||
132
src/main/resources/db/migration/mysql/V78__add_chusan_charge.sql
Normal file
132
src/main/resources/db/migration/mysql/V78__add_chusan_charge.sql
Normal file
@ -0,0 +1,132 @@
|
||||
INSERT INTO chusan_game_charge (
|
||||
start_date,
|
||||
sale_start_date,
|
||||
sale_price,
|
||||
sale_end_date,
|
||||
price,
|
||||
order_id,
|
||||
end_date,
|
||||
charge_id,
|
||||
id
|
||||
)
|
||||
VALUES (
|
||||
'2019-01-01 00:00:00.000000',
|
||||
'2019-01-01 00:00:00.000000',
|
||||
1,
|
||||
'2029-01-01 00:00:00.000000',
|
||||
1,
|
||||
0,
|
||||
'2029-01-01 00:00:00.000000',
|
||||
2310,
|
||||
1
|
||||
),
|
||||
(
|
||||
'2019-01-01 00:00:00.000000',
|
||||
'2019-01-01 00:00:00.000000',
|
||||
1,
|
||||
'2029-01-01 00:00:00.000000',
|
||||
1,
|
||||
1,
|
||||
'2029-01-01 00:00:00.000000',
|
||||
2230,
|
||||
2
|
||||
),
|
||||
(
|
||||
'2019-01-01 00:00:00.000000',
|
||||
'2019-01-01 00:00:00.000000',
|
||||
1,
|
||||
'2029-01-01 00:00:00.000000',
|
||||
1,
|
||||
2,
|
||||
'2029-01-01 00:00:00.000000',
|
||||
2220,
|
||||
3
|
||||
),
|
||||
(
|
||||
'2019-01-01 00:00:00.000000',
|
||||
'2019-01-01 00:00:00.000000',
|
||||
1,
|
||||
'2029-01-01 00:00:00.000000',
|
||||
1,
|
||||
3,
|
||||
'2029-01-01 00:00:00.000000',
|
||||
2210,
|
||||
4
|
||||
),
|
||||
(
|
||||
'2019-01-01 00:00:00.000000',
|
||||
'2019-01-01 00:00:00.000000',
|
||||
1,
|
||||
'2029-01-01 00:00:00.000000',
|
||||
1,
|
||||
4,
|
||||
'2029-01-01 00:00:00.000000',
|
||||
2060,
|
||||
5
|
||||
),
|
||||
(
|
||||
'2019-01-01 00:00:00.000000',
|
||||
'2019-01-01 00:00:00.000000',
|
||||
1,
|
||||
'2029-01-01 00:00:00.000000',
|
||||
1,
|
||||
5,
|
||||
'2029-01-01 00:00:00.000000',
|
||||
2050,
|
||||
6
|
||||
),
|
||||
(
|
||||
'2019-01-01 00:00:00.000000',
|
||||
'2019-01-01 00:00:00.000000',
|
||||
1,
|
||||
'2029-01-01 00:00:00.000000',
|
||||
1,
|
||||
6,
|
||||
'2029-01-01 00:00:00.000000',
|
||||
2040,
|
||||
7
|
||||
),
|
||||
(
|
||||
'2019-01-01 00:00:00.000000',
|
||||
'2019-01-01 00:00:00.000000',
|
||||
1,
|
||||
'2029-01-01 00:00:00.000000',
|
||||
1,
|
||||
7,
|
||||
'2029-01-01 00:00:00.000000',
|
||||
2030,
|
||||
8
|
||||
),
|
||||
(
|
||||
'2019-01-01 00:00:00.000000',
|
||||
'2019-01-01 00:00:00.000000',
|
||||
1,
|
||||
'2029-01-01 00:00:00.000000',
|
||||
1,
|
||||
8,
|
||||
'2029-01-01 00:00:00.000000',
|
||||
2020,
|
||||
9
|
||||
),
|
||||
(
|
||||
'2019-01-01 00:00:00.000000',
|
||||
'2019-01-01 00:00:00.000000',
|
||||
1,
|
||||
'2029-01-01 00:00:00.000000',
|
||||
1,
|
||||
9,
|
||||
'2029-01-01 00:00:00.000000',
|
||||
2010,
|
||||
10
|
||||
),
|
||||
(
|
||||
'2019-01-01 00:00:00.000000',
|
||||
'2019-01-01 00:00:00.000000',
|
||||
1,
|
||||
'2029-01-01 00:00:00.000000',
|
||||
1,
|
||||
10,
|
||||
'2029-01-01 00:00:00.000000',
|
||||
2410,
|
||||
11
|
||||
);
|
||||
443
src/main/resources/db/migration/sqlite/V76__add_chusan_table.sql
Normal file
443
src/main/resources/db/migration/sqlite/V76__add_chusan_table.sql
Normal file
@ -0,0 +1,443 @@
|
||||
CREATE TABLE chusan_game_event (
|
||||
id INTEGER NOT NULL,
|
||||
end_date DATETIME,
|
||||
start_date DATETIME,
|
||||
type INTEGER NOT NULL,
|
||||
enable BOOLEAN NOT NULL,
|
||||
PRIMARY KEY (
|
||||
id
|
||||
)
|
||||
);
|
||||
|
||||
CREATE TABLE chusan_game_charge (
|
||||
id INTEGER,
|
||||
charge_id INTEGER UNIQUE,
|
||||
end_date DATETIME,
|
||||
order_id INTEGER NOT NULL,
|
||||
price INTEGER NOT NULL,
|
||||
sale_end_date DATETIME,
|
||||
sale_price INTEGER NOT NULL,
|
||||
sale_start_date DATETIME,
|
||||
start_date DATETIME,
|
||||
PRIMARY KEY (
|
||||
id
|
||||
)
|
||||
);
|
||||
|
||||
CREATE TABLE chusan_user_data (
|
||||
id INTEGER,
|
||||
user_name VARCHAR (255),
|
||||
level INTEGER,
|
||||
reincarnation_num INTEGER,
|
||||
exp VARCHAR (255),
|
||||
point BIGINT,
|
||||
total_point BIGINT,
|
||||
play_count INTEGER,
|
||||
multi_play_count INTEGER,
|
||||
player_rating INTEGER,
|
||||
highest_rating INTEGER,
|
||||
nameplate_id INTEGER,
|
||||
frame_id INTEGER,
|
||||
character_id INTEGER,
|
||||
trophy_id INTEGER,
|
||||
played_tutorial_bit INTEGER,
|
||||
first_tutorial_cancel_num INTEGER,
|
||||
master_tutorial_cancel_num INTEGER,
|
||||
total_map_num INTEGER,
|
||||
total_hi_score BIGINT,
|
||||
total_basic_high_score BIGINT,
|
||||
total_advanced_high_score BIGINT,
|
||||
total_expert_high_score BIGINT,
|
||||
total_master_high_score BIGINT,
|
||||
total_ultima_high_score BIGINT,
|
||||
event_watched_date DATETIME,
|
||||
friend_count INTEGER,
|
||||
first_game_id VARCHAR (255),
|
||||
first_rom_version VARCHAR (255),
|
||||
first_data_version VARCHAR (255),
|
||||
first_play_date DATETIME,
|
||||
last_game_id VARCHAR (255),
|
||||
last_rom_version VARCHAR (255),
|
||||
last_data_version VARCHAR (255),
|
||||
last_login_date DATETIME,
|
||||
last_play_date DATETIME,
|
||||
last_place_id INTEGER,
|
||||
last_place_name VARCHAR (255),
|
||||
last_region_id VARCHAR (255),
|
||||
last_region_name VARCHAR (255),
|
||||
last_all_net_id VARCHAR (255),
|
||||
last_client_id VARCHAR (255),
|
||||
last_country_code VARCHAR (255),
|
||||
user_name_ex VARCHAR (255),
|
||||
compatible_cm_version VARCHAR (255),
|
||||
medal INTEGER,
|
||||
map_icon_id INTEGER,
|
||||
voice_id INTEGER,
|
||||
avatar_wear INTEGER,
|
||||
avatar_head INTEGER,
|
||||
avatar_face INTEGER,
|
||||
avatar_skin INTEGER,
|
||||
avatar_item INTEGER,
|
||||
avatar_front INTEGER,
|
||||
avatar_back INTEGER,
|
||||
class_emblem_base INTEGER,
|
||||
class_emblem_medal INTEGER,
|
||||
stocked_grid_count INTEGER,
|
||||
ex_map_loop_count INTEGER,
|
||||
net_battle_play_count INTEGER,
|
||||
net_battle_win_count INTEGER,
|
||||
net_battle_lose_count INTEGER,
|
||||
net_battle_consecutive_win_count INTEGER,
|
||||
chara_illust_id INTEGER,
|
||||
skill_id INTEGER,
|
||||
over_power_point INTEGER,
|
||||
over_power_rate INTEGER,
|
||||
over_power_lower_rank INTEGER,
|
||||
avatar_point INTEGER,
|
||||
battle_rank_id INTEGER,
|
||||
battle_rank_point INTEGER,
|
||||
elite_rank_point INTEGER,
|
||||
net_battle1st_count INTEGER,
|
||||
net_battle2nd_count INTEGER,
|
||||
net_battle3rd_count INTEGER,
|
||||
net_battle4th_count INTEGER,
|
||||
net_battle_correction INTEGER,
|
||||
net_battle_err_cnt INTEGER,
|
||||
net_battle_host_err_cnt INTEGER,
|
||||
battle_reward_status INTEGER,
|
||||
battle_reward_index INTEGER,
|
||||
battle_reward_count INTEGER,
|
||||
ext1 INTEGER,
|
||||
ext2 INTEGER,
|
||||
ext3 INTEGER,
|
||||
ext4 INTEGER,
|
||||
ext5 INTEGER,
|
||||
ext6 INTEGER,
|
||||
ext7 INTEGER,
|
||||
ext8 INTEGER,
|
||||
ext9 INTEGER,
|
||||
ext10 INTEGER,
|
||||
ext_str1 VARCHAR (255),
|
||||
ext_str2 VARCHAR (255),
|
||||
ext_long1 BIGINT,
|
||||
ext_long2 BIGINT,
|
||||
rank_up_challenge_results VARCHAR (255),
|
||||
is_net_battle_host boolean,
|
||||
net_battle_end_state INTEGER,
|
||||
card_id BIGINT REFERENCES sega_card (id) ON DELETE CASCADE,
|
||||
PRIMARY KEY (
|
||||
id
|
||||
)
|
||||
);
|
||||
|
||||
CREATE TABLE chusan_user_activity (
|
||||
id INTEGER,
|
||||
activity_id INTEGER,
|
||||
kind INTEGER NOT NULL,
|
||||
param1 INTEGER NOT NULL,
|
||||
param2 INTEGER NOT NULL,
|
||||
param3 INTEGER NOT NULL,
|
||||
param4 INTEGER NOT NULL,
|
||||
sort_number INTEGER NOT NULL,
|
||||
user_id BIGINT REFERENCES chusan_user_data (id) ON DELETE CASCADE,
|
||||
PRIMARY KEY (
|
||||
id
|
||||
),
|
||||
CONSTRAINT chusan_user_activity_uq UNIQUE (
|
||||
activity_id,
|
||||
kind,
|
||||
user_id
|
||||
)
|
||||
ON CONFLICT REPLACE
|
||||
);
|
||||
|
||||
CREATE TABLE chusan_user_character (
|
||||
id INTEGER,
|
||||
character_id INTEGER NOT NULL,
|
||||
friendship_exp INTEGER NOT NULL,
|
||||
is_valid BOOLEAN NOT NULL,
|
||||
is_new_mark BOOLEAN NOT NULL,
|
||||
level INTEGER NOT NULL,
|
||||
param1 INTEGER NOT NULL,
|
||||
param2 INTEGER NOT NULL,
|
||||
play_count INTEGER NOT NULL,
|
||||
ex_max_lv INTEGER NOT NULL,
|
||||
assign_illust INTEGER NOT NULL,
|
||||
user_id BIGINT REFERENCES chusan_user_data (id) ON DELETE CASCADE,
|
||||
PRIMARY KEY (
|
||||
id
|
||||
),
|
||||
CONSTRAINT chusan_user_character_uq UNIQUE (
|
||||
character_id,
|
||||
user_id
|
||||
)
|
||||
ON CONFLICT REPLACE
|
||||
);
|
||||
|
||||
CREATE TABLE chusan_user_charge (
|
||||
id INTEGER,
|
||||
charge_id INTEGER NOT NULL,
|
||||
param1 INTEGER NOT NULL,
|
||||
param2 INTEGER NOT NULL,
|
||||
param_date DATETIME,
|
||||
purchase_date DATETIME,
|
||||
stock INTEGER NOT NULL,
|
||||
valid_date DATETIME,
|
||||
user_id BIGINT REFERENCES chusan_user_data (id) ON DELETE CASCADE,
|
||||
PRIMARY KEY (
|
||||
id
|
||||
),
|
||||
CONSTRAINT chusan_user_charge_uq UNIQUE (
|
||||
charge_id,
|
||||
user_id
|
||||
)
|
||||
);
|
||||
|
||||
CREATE TABLE chusan_user_course (
|
||||
id INTEGER,
|
||||
class_id INTEGER NOT NULL,
|
||||
course_id INTEGER NOT NULL,
|
||||
event_id INTEGER NOT NULL,
|
||||
is_all_justice BOOLEAN NOT NULL,
|
||||
is_clear BOOLEAN NOT NULL,
|
||||
is_full_combo BOOLEAN NOT NULL,
|
||||
is_success BOOLEAN NOT NULL,
|
||||
last_play_date DATETIME,
|
||||
param1 INTEGER NOT NULL,
|
||||
param2 INTEGER NOT NULL,
|
||||
param3 INTEGER NOT NULL,
|
||||
param4 INTEGER NOT NULL,
|
||||
play_count INTEGER NOT NULL,
|
||||
theory_count INTEGER,
|
||||
score_max INTEGER NOT NULL,
|
||||
score_rank INTEGER NOT NULL,
|
||||
order_id INTEGER,
|
||||
player_rating INTEGER,
|
||||
user_id BIGINT REFERENCES chusan_user_data (id) ON DELETE CASCADE,
|
||||
PRIMARY KEY (
|
||||
id
|
||||
),
|
||||
CONSTRAINT chusan_user_course_uq UNIQUE (
|
||||
course_id,
|
||||
user_id
|
||||
)
|
||||
);
|
||||
|
||||
CREATE TABLE chusan_user_duel (
|
||||
id INTEGER,
|
||||
duel_id INTEGER NOT NULL,
|
||||
is_clear BOOLEAN NOT NULL,
|
||||
last_play_date DATETIME,
|
||||
param1 INTEGER NOT NULL,
|
||||
param2 INTEGER NOT NULL,
|
||||
param3 INTEGER NOT NULL,
|
||||
param4 INTEGER NOT NULL,
|
||||
point INTEGER NOT NULL,
|
||||
progress INTEGER NOT NULL,
|
||||
user_id BIGINT REFERENCES chusan_user_data (id) ON DELETE CASCADE,
|
||||
PRIMARY KEY (
|
||||
id
|
||||
),
|
||||
CONSTRAINT chusan_user_duel_uq UNIQUE (
|
||||
duel_id,
|
||||
user_id
|
||||
)
|
||||
);
|
||||
|
||||
CREATE TABLE chusan_user_game_option (
|
||||
id INTEGER,
|
||||
bg_info INTEGER NOT NULL,
|
||||
field_color INTEGER NOT NULL,
|
||||
guide_sound INTEGER NOT NULL,
|
||||
sound_effect INTEGER NOT NULL,
|
||||
guide_line INTEGER NOT NULL,
|
||||
speed INTEGER NOT NULL,
|
||||
option_set INTEGER NOT NULL,
|
||||
matching INTEGER NOT NULL,
|
||||
judge_pos INTEGER NOT NULL,
|
||||
rating INTEGER NOT NULL,
|
||||
judge_critical INTEGER NOT NULL,
|
||||
judge_justice INTEGER NOT NULL,
|
||||
judge_attack INTEGER NOT NULL,
|
||||
headphone INTEGER NOT NULL,
|
||||
player_level INTEGER NOT NULL,
|
||||
success_tap INTEGER NOT NULL,
|
||||
success_ex_tap INTEGER NOT NULL,
|
||||
success_slide_hold INTEGER NOT NULL,
|
||||
success_air INTEGER NOT NULL,
|
||||
success_flick INTEGER NOT NULL,
|
||||
success_skill INTEGER NOT NULL,
|
||||
success_tap_timbre INTEGER NOT NULL,
|
||||
privacy INTEGER NOT NULL,
|
||||
mirror_fumen INTEGER NOT NULL,
|
||||
select_music_filter_lv INTEGER NOT NULL,
|
||||
sort_music_filter_lv INTEGER NOT NULL,
|
||||
sort_music_genre INTEGER NOT NULL,
|
||||
category_detail INTEGER NOT NULL,
|
||||
judge_timing_offset INTEGER NOT NULL,
|
||||
play_timing_offset INTEGER NOT NULL,
|
||||
field_wall_position INTEGER NOT NULL,
|
||||
result_voice_short INTEGER NOT NULL,
|
||||
notes_thickness INTEGER NOT NULL,
|
||||
judge_append_se INTEGER NOT NULL,
|
||||
track_skip INTEGER NOT NULL,
|
||||
hard_judge INTEGER NOT NULL,
|
||||
speed_120 INTEGER NOT NULL,
|
||||
field_wall_position_120 INTEGER NOT NULL,
|
||||
play_timing_offset_120 INTEGER NOT NULL,
|
||||
judge_timing_offset_120 INTEGER NOT NULL,
|
||||
ext1 INTEGER NOT NULL,
|
||||
ext2 INTEGER NOT NULL,
|
||||
ext3 INTEGER NOT NULL,
|
||||
ext4 INTEGER NOT NULL,
|
||||
ext5 INTEGER NOT NULL,
|
||||
ext6 INTEGER NOT NULL,
|
||||
ext7 INTEGER NOT NULL,
|
||||
ext8 INTEGER NOT NULL,
|
||||
ext9 INTEGER NOT NULL,
|
||||
ext10 INTEGER NOT NULL,
|
||||
user_id BIGINT REFERENCES chusan_user_data (id) ON DELETE CASCADE,
|
||||
PRIMARY KEY (
|
||||
id
|
||||
)
|
||||
);
|
||||
|
||||
CREATE TABLE chusan_user_general_data (
|
||||
id INTEGER,
|
||||
property_key VARCHAR NOT NULL,
|
||||
property_value VARCHAR NOT NULL,
|
||||
user_id BIGINT REFERENCES chusan_user_data (id) ON DELETE CASCADE,
|
||||
PRIMARY KEY (
|
||||
id
|
||||
),
|
||||
CONSTRAINT chusan_user_general_data_uq UNIQUE (
|
||||
property_key,
|
||||
user_id
|
||||
)
|
||||
ON CONFLICT REPLACE
|
||||
);
|
||||
|
||||
CREATE TABLE chusan_user_item (
|
||||
id INTEGER,
|
||||
is_valid BOOLEAN NOT NULL,
|
||||
item_id INTEGER NOT NULL,
|
||||
item_kind INTEGER NOT NULL,
|
||||
stock INTEGER NOT NULL,
|
||||
user_id BIGINT REFERENCES chusan_user_data (id) ON DELETE CASCADE,
|
||||
PRIMARY KEY (
|
||||
id
|
||||
),
|
||||
CONSTRAINT chusan_user_item_uq UNIQUE (
|
||||
item_id,
|
||||
item_kind,
|
||||
user_id
|
||||
)
|
||||
);
|
||||
|
||||
CREATE TABLE chusan_user_map_area (
|
||||
id INTEGER,
|
||||
is_clear BOOLEAN NOT NULL,
|
||||
is_locked BOOLEAN NOT NULL,
|
||||
map_area_id BOOLEAN NOT NULL,
|
||||
position INTEGER NOT NULL,
|
||||
rate INTEGER NOT NULL,
|
||||
status_count INTEGER NOT NULL,
|
||||
remain_grid_count INTEGER NOT NULL,
|
||||
user_id BIGINT REFERENCES chusan_user_data (id) ON DELETE CASCADE,
|
||||
PRIMARY KEY (
|
||||
id
|
||||
),
|
||||
CONSTRAINT chusan_user_map_uq UNIQUE (
|
||||
map_area_id,
|
||||
user_id
|
||||
)
|
||||
);
|
||||
|
||||
CREATE TABLE chusan_user_music_detail (
|
||||
id INTEGER,
|
||||
full_chain INTEGER NOT NULL,
|
||||
is_all_justice BOOLEAN NOT NULL,
|
||||
is_full_combo BOOLEAN NOT NULL,
|
||||
is_lock BOOLEAN NOT NULL,
|
||||
is_success BOOLEAN NOT NULL,
|
||||
level INTEGER NOT NULL,
|
||||
max_chain INTEGER NOT NULL,
|
||||
max_combo_count INTEGER NOT NULL,
|
||||
miss_count INTEGER NOT NULL,
|
||||
music_id INTEGER NOT NULL,
|
||||
play_count INTEGER NOT NULL,
|
||||
theory_count INTEGER,
|
||||
ext1 INTEGER,
|
||||
score_max INTEGER NOT NULL,
|
||||
score_rank INTEGER NOT NULL,
|
||||
user_id BIGINT REFERENCES chusan_user_data (id) ON DELETE CASCADE,
|
||||
PRIMARY KEY (
|
||||
id
|
||||
),
|
||||
CONSTRAINT chusan_user_music_detail_uq UNIQUE (
|
||||
level,
|
||||
music_id,
|
||||
user_id
|
||||
)
|
||||
);
|
||||
|
||||
CREATE TABLE chusan_user_playlog (
|
||||
id INTEGER,
|
||||
rom_version VARCHAR (255),
|
||||
character_id INTEGER NOT NULL,
|
||||
chara_illust_id INTEGER NOT NULL,
|
||||
custom_id INTEGER NOT NULL,
|
||||
common_id INTEGER NOT NULL,
|
||||
event_id INTEGER NOT NULL,
|
||||
full_chain_kind INTEGER NOT NULL,
|
||||
is_all_justice BOOLEAN NOT NULL,
|
||||
is_clear BOOLEAN NOT NULL,
|
||||
is_continue BOOLEAN NOT NULL,
|
||||
is_free_to_play BOOLEAN NOT NULL,
|
||||
is_full_combo BOOLEAN NOT NULL,
|
||||
is_new_record BOOLEAN NOT NULL,
|
||||
judge_attack INTEGER NOT NULL,
|
||||
judge_critical INTEGER NOT NULL,
|
||||
judge_guilty INTEGER NOT NULL,
|
||||
judge_justice INTEGER NOT NULL,
|
||||
judge_heaven INTEGER NOT NULL,
|
||||
level INTEGER NOT NULL,
|
||||
max_chain INTEGER NOT NULL,
|
||||
max_combo INTEGER NOT NULL,
|
||||
music_id INTEGER NOT NULL,
|
||||
order_id INTEGER NOT NULL,
|
||||
place_id INTEGER NOT NULL,
|
||||
place_name VARCHAR (255),
|
||||
play_date DATETIME,
|
||||
play_kind INTEGER NOT NULL,
|
||||
played_custom1 INTEGER NOT NULL,
|
||||
played_custom2 INTEGER NOT NULL,
|
||||
played_custom3 INTEGER NOT NULL,
|
||||
played_music_level1 INTEGER NOT NULL,
|
||||
played_music_level2 INTEGER NOT NULL,
|
||||
played_music_level3 INTEGER NOT NULL,
|
||||
played_user_id1 INTEGER NOT NULL,
|
||||
played_user_id2 INTEGER NOT NULL,
|
||||
played_user_id3 INTEGER NOT NULL,
|
||||
played_user_name1 VARCHAR (255),
|
||||
played_user_name2 VARCHAR (255),
|
||||
played_user_name3 VARCHAR (255),
|
||||
player_rating INTEGER NOT NULL,
|
||||
rank INTEGER NOT NULL,
|
||||
rate_air INTEGER NOT NULL,
|
||||
rate_flick INTEGER NOT NULL,
|
||||
rate_hold INTEGER NOT NULL,
|
||||
rate_slide INTEGER NOT NULL,
|
||||
rate_tap INTEGER NOT NULL,
|
||||
score INTEGER NOT NULL,
|
||||
skill_effect INTEGER NOT NULL,
|
||||
skill_id INTEGER NOT NULL,
|
||||
skill_level INTEGER NOT NULL,
|
||||
sort_number INTEGER NOT NULL,
|
||||
track INTEGER NOT NULL,
|
||||
user_play_date DATETIME,
|
||||
user_id BIGINT REFERENCES chusan_user_data (id) ON DELETE CASCADE,
|
||||
PRIMARY KEY (
|
||||
id
|
||||
)
|
||||
);
|
||||
@ -0,0 +1,141 @@
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (0, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',0, true);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (1, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',11, true);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',0, true);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (11, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',6, true);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10000, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',3, true);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10006, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',1, false);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10007, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',1, false);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10008, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',1, false);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10009, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',1, false);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10010, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',1, false);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10011, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',1, false);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10012, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',3, true);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10013, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',1, false);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10014, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',1, false);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10015, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',2, true);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10016, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',2, true);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10017, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',2, true);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10018, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',2, true);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10019, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',2, true);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10020, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',2, true);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10021, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',2, true);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10022, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',2, true);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10023, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',2, true);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10024, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',2, true);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10025, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',2, true);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10026, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',1, false);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10027, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',2, true);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10028, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',2, true);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10029, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',2, true);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10030, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',2, true);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10031, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',8, true);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10032, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',1, false);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10033, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',1, false);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10034, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',2, true);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10035, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',8, true);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10036, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',1, false);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10037, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',2, true);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10038, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',8, true);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10039, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',2, true);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10040, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',1, false);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10041, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',2, true);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10042, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',1, false);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10043, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',9, true);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10044, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',1, false);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10045, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',10, true);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10046, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',1, false);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10047, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',12, true);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10048, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',7, true);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10049, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',7, true);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10050, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',3, true);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10051, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',1, false);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10052, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',3, true);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10053, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',3, true);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10054, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',5, true);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10055, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',4, true);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10056, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',11, true);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10080, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',1, false);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10081, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',3, true);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10082, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',1, false);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10083, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',2, true);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10100, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',3, true);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10101, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',1, false);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10102, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',3, true);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10103, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',1, false);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10104, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',2, true);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10105, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',1, false);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10106, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',2, true);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10107, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',8, true);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10108, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',1, false);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10109, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',2, true);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10110, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',1, false);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10111, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',9, true);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10112, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',1, false);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10113, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',10, true);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10114, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',1, false);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10115, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',12, true);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10116, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',3, true);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10117, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',5, true);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10118, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',4, true);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10119, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',1, false);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10150, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',1, false);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10151, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',7, true);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10170, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',1, false);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10171, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',3, true);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10172, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',1, false);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10173, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',2, true);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10174, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',8, true);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10175, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',1, false);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10176, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',7, true);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10177, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',1, false);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10178, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',3, true);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10200, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',3, true);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10201, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',1, false);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10202, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',3, true);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10203, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',1, false);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10204, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',2, true);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10205, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',8, true);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10206, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',1, false);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10207, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',2, true);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10208, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',1, false);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10209, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',9, true);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10210, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',1, false);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10211, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',10, true);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10212, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',1, false);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10213, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',12, true);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10214, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',3, true);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10215, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',5, true);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10216, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',4, true);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10217, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',11, true);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10218, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',1, false);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10250, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',1, false);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10251, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',3, true);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10252, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',1, false);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10253, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',2, true);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10254, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',8, true);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10255, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',3, true);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10256, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',1, false);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10257, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',3, true);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10258, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',11, true);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10300, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',3, true);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10301, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',1, false);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10302, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',3, true);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10303, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',1, false);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10304, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',8, true);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10305, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',1, false);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10306, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',2, true);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10307, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',8, true);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10308, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',1, false);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10309, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',2, true);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10310, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',1, false);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10311, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',9, true);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10312, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',1, false);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10313, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',10, true);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10314, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',1, false);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10315, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',12, true);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10316, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',7, true);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10317, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',1, false);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10318, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',3, true);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10319, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',3, true);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10320, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',5, true);
|
||||
INSERT INTO `chusan_game_event` (`id`, `end_date`, `start_date`, `type`, `enable`) VALUES (10321, '2029-01-01 00:00:00.000000', '2019-01-01 00:00:00.000000',11, true);
|
||||
@ -0,0 +1,132 @@
|
||||
INSERT INTO chusan_game_charge (
|
||||
start_date,
|
||||
sale_start_date,
|
||||
sale_price,
|
||||
sale_end_date,
|
||||
price,
|
||||
order_id,
|
||||
end_date,
|
||||
charge_id,
|
||||
id
|
||||
)
|
||||
VALUES (
|
||||
'2019-01-01 00:00:00.000000',
|
||||
'2019-01-01 00:00:00.000000',
|
||||
1,
|
||||
'2029-01-01 00:00:00.000000',
|
||||
1,
|
||||
0,
|
||||
'2029-01-01 00:00:00.000000',
|
||||
2310,
|
||||
1
|
||||
),
|
||||
(
|
||||
'2019-01-01 00:00:00.000000',
|
||||
'2019-01-01 00:00:00.000000',
|
||||
1,
|
||||
'2029-01-01 00:00:00.000000',
|
||||
1,
|
||||
1,
|
||||
'2029-01-01 00:00:00.000000',
|
||||
2230,
|
||||
2
|
||||
),
|
||||
(
|
||||
'2019-01-01 00:00:00.000000',
|
||||
'2019-01-01 00:00:00.000000',
|
||||
1,
|
||||
'2029-01-01 00:00:00.000000',
|
||||
1,
|
||||
2,
|
||||
'2029-01-01 00:00:00.000000',
|
||||
2220,
|
||||
3
|
||||
),
|
||||
(
|
||||
'2019-01-01 00:00:00.000000',
|
||||
'2019-01-01 00:00:00.000000',
|
||||
1,
|
||||
'2029-01-01 00:00:00.000000',
|
||||
1,
|
||||
3,
|
||||
'2029-01-01 00:00:00.000000',
|
||||
2210,
|
||||
4
|
||||
),
|
||||
(
|
||||
'2019-01-01 00:00:00.000000',
|
||||
'2019-01-01 00:00:00.000000',
|
||||
1,
|
||||
'2029-01-01 00:00:00.000000',
|
||||
1,
|
||||
4,
|
||||
'2029-01-01 00:00:00.000000',
|
||||
2060,
|
||||
5
|
||||
),
|
||||
(
|
||||
'2019-01-01 00:00:00.000000',
|
||||
'2019-01-01 00:00:00.000000',
|
||||
1,
|
||||
'2029-01-01 00:00:00.000000',
|
||||
1,
|
||||
5,
|
||||
'2029-01-01 00:00:00.000000',
|
||||
2050,
|
||||
6
|
||||
),
|
||||
(
|
||||
'2019-01-01 00:00:00.000000',
|
||||
'2019-01-01 00:00:00.000000',
|
||||
1,
|
||||
'2029-01-01 00:00:00.000000',
|
||||
1,
|
||||
6,
|
||||
'2029-01-01 00:00:00.000000',
|
||||
2040,
|
||||
7
|
||||
),
|
||||
(
|
||||
'2019-01-01 00:00:00.000000',
|
||||
'2019-01-01 00:00:00.000000',
|
||||
1,
|
||||
'2029-01-01 00:00:00.000000',
|
||||
1,
|
||||
7,
|
||||
'2029-01-01 00:00:00.000000',
|
||||
2030,
|
||||
8
|
||||
),
|
||||
(
|
||||
'2019-01-01 00:00:00.000000',
|
||||
'2019-01-01 00:00:00.000000',
|
||||
1,
|
||||
'2029-01-01 00:00:00.000000',
|
||||
1,
|
||||
8,
|
||||
'2029-01-01 00:00:00.000000',
|
||||
2020,
|
||||
9
|
||||
),
|
||||
(
|
||||
'2019-01-01 00:00:00.000000',
|
||||
'2019-01-01 00:00:00.000000',
|
||||
1,
|
||||
'2029-01-01 00:00:00.000000',
|
||||
1,
|
||||
9,
|
||||
'2029-01-01 00:00:00.000000',
|
||||
2010,
|
||||
10
|
||||
),
|
||||
(
|
||||
'2019-01-01 00:00:00.000000',
|
||||
'2019-01-01 00:00:00.000000',
|
||||
1,
|
||||
'2029-01-01 00:00:00.000000',
|
||||
1,
|
||||
10,
|
||||
'2029-01-01 00:00:00.000000',
|
||||
2410,
|
||||
11
|
||||
);
|
||||
Loading…
x
Reference in New Issue
Block a user