mirror of
https://github.com/MewoLab/AquaDX.git
synced 2025-10-25 20:12:39 +00:00
[maimai2] experimental Splash Plus Support
This commit is contained in:
parent
2f648aea19
commit
3327f95b0b
@ -21,6 +21,7 @@ public class Maimai2ServletController {
|
||||
private final GetGameEventHandler getGameEventHandler;
|
||||
private final GetGameRankingHandler getGameRankingHandler;
|
||||
private final GetGameTournamentInfoHandler getGameTournamentInfoHandler;
|
||||
private final GetGameChargeHandler getGameChargeHandler;
|
||||
private final GetTransferFriendHandler getTransferFriendHandler;
|
||||
private final GetUserActivityHandler getUserActivityHandler;
|
||||
private final UserLoginHandler userLoginHandler;
|
||||
@ -40,13 +41,16 @@ public class Maimai2ServletController {
|
||||
private final GetUserMusicHandler getUserMusicHandler;
|
||||
private final GetUserRatingHandler getUserRatingHandler;
|
||||
private final GetUserRegionHandler getUserRegionHandler;
|
||||
private final GetUserChargeHandler getUserChargeHandler;
|
||||
private final GetUserCourseHandler getUserCourseHandler;
|
||||
|
||||
public Maimai2ServletController(GetGameSettingHandler getGameSettingHandler, GetGameEventHandler getGameEventHandler, GetGameRankingHandler getGameRankingHandler, GetGameTournamentInfoHandler getGameTournamentInfoHandler,
|
||||
GetTransferFriendHandler getTransferFriendHandler, GetUserActivityHandler getUserActivityHandler, UserLoginHandler userLoginHandler, UserLogoutHandler userLogoutHandler,
|
||||
GetUserDataHandler getUserDataHandler, UpsertUserAllHandler upsertUserAllHandler, GetUserPreviewHandler getUserPreviewHandler, GetUserCharacterHandler getUserCharacterHandler,
|
||||
GetUserOptionHandler getUserOptionHandler, GetUserItemHandler getUserItemHandler, GetUserExtendHandler getUserExtendHandler, GetUserGhostHandler getUserGhostHandler,
|
||||
GetUserLoginBonusHandler getUserLoginBonusHandler, GetUserMapHandler getUserMapHandler, GetUserFavoriteHandler getUserFavoriteHandler,
|
||||
GetUserCardHandler getUserCardHandler, GetUserMusicHandler getUserMusicHandler, GetUserRatingHandler getUserRatingHandler, GetUserRegionHandler getUserRegionHandler) {
|
||||
GetUserCardHandler getUserCardHandler, GetUserMusicHandler getUserMusicHandler, GetUserRatingHandler getUserRatingHandler, GetUserRegionHandler getUserRegionHandler,
|
||||
GetGameChargeHandler getGameChargeHandler, GetUserChargeHandler getUserChargeHandler, GetUserCourseHandler getUserCourseHandler) {
|
||||
this.getGameSettingHandler = getGameSettingHandler;
|
||||
this.getGameEventHandler = getGameEventHandler;
|
||||
this.getGameRankingHandler = getGameRankingHandler;
|
||||
@ -70,6 +74,9 @@ public class Maimai2ServletController {
|
||||
this.getUserMusicHandler = getUserMusicHandler;
|
||||
this.getUserRatingHandler = getUserRatingHandler;
|
||||
this.getUserRegionHandler = getUserRegionHandler;
|
||||
this.getGameChargeHandler = getGameChargeHandler;
|
||||
this.getUserChargeHandler = getUserChargeHandler;
|
||||
this.getUserCourseHandler = getUserCourseHandler;
|
||||
}
|
||||
|
||||
// Mandatory for boot
|
||||
@ -242,4 +249,25 @@ public class Maimai2ServletController {
|
||||
return upsertUserAllHandler.handle(request);
|
||||
}
|
||||
|
||||
// Splash plus APIs
|
||||
@PostMapping("GetGameChargeApi")
|
||||
public String getGameChargeHandler(@ModelAttribute Map<String, Object> request) throws JsonProcessingException {
|
||||
return getGameChargeHandler.handle(request);
|
||||
}
|
||||
|
||||
@PostMapping("GetUserChargeApi")
|
||||
public String getUserChargeHandler(@ModelAttribute Map<String, Object> request) throws JsonProcessingException {
|
||||
return getUserChargeHandler.handle(request);
|
||||
}
|
||||
|
||||
@PostMapping("UploadUserChargelogApi")
|
||||
public String uploadUserChargelog(@ModelAttribute Map<String, Object> request) {
|
||||
return "{\"returnCode\":1,\"apiName\":\"com.sega.maimai2servlet.api.UploadUserChargelogApi\"}";
|
||||
}
|
||||
|
||||
@PostMapping("GetUserCourseApi")
|
||||
public String getUserCourseHandler(@ModelAttribute Map<String, Object> request) throws JsonProcessingException {
|
||||
return getUserCourseHandler.handle(request);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -0,0 +1,12 @@
|
||||
package icu.samnyan.aqua.sega.maimai2.dao.gamedata;
|
||||
|
||||
import icu.samnyan.aqua.sega.maimai2.model.gamedata.GameCharge;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Repository("Maimai2GameChargeRepository")
|
||||
public interface GameChargeRepository extends JpaRepository<GameCharge, Long> {
|
||||
}
|
||||
@ -0,0 +1,19 @@
|
||||
package icu.samnyan.aqua.sega.maimai2.dao.userdata;
|
||||
|
||||
import icu.samnyan.aqua.sega.maimai2.model.userdata.UserCharge;
|
||||
import icu.samnyan.aqua.sega.maimai2.model.userdata.UserDetail;
|
||||
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 UserChargeRepository extends JpaRepository<UserCharge, Long> {
|
||||
List<UserCharge> findByUser_Card_ExtId(Long extId);
|
||||
|
||||
Optional<UserCharge> findByUserAndChargeId(UserDetail extId, int chargeId);
|
||||
}
|
||||
@ -0,0 +1,22 @@
|
||||
package icu.samnyan.aqua.sega.maimai2.dao.userdata;
|
||||
|
||||
import icu.samnyan.aqua.sega.maimai2.model.userdata.UserDetail;
|
||||
import icu.samnyan.aqua.sega.maimai2.model.userdata.UserCourse;
|
||||
|
||||
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.Optional;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Repository("Maimai2UserCourseRepository")
|
||||
public interface UserCourseRepository extends JpaRepository<UserCourse, Long> {
|
||||
|
||||
Optional<UserCourse> findByUserAndCourseId(UserDetail user, int courseId);
|
||||
|
||||
Page<UserCourse> findByUser_Card_ExtId(long userId, Pageable page);
|
||||
}
|
||||
@ -0,0 +1,46 @@
|
||||
package icu.samnyan.aqua.sega.maimai2.handler.impl;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import icu.samnyan.aqua.sega.maimai2.dao.gamedata.GameChargeRepository;
|
||||
import icu.samnyan.aqua.sega.maimai2.handler.BaseHandler;
|
||||
import icu.samnyan.aqua.sega.maimai2.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
|
||||
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,48 @@
|
||||
package icu.samnyan.aqua.sega.maimai2.handler.impl;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import icu.samnyan.aqua.sega.maimai2.dao.userdata.UserChargeRepository;
|
||||
import icu.samnyan.aqua.sega.maimai2.handler.BaseHandler;
|
||||
import icu.samnyan.aqua.sega.maimai2.model.userdata.UserCharge;
|
||||
import icu.samnyan.aqua.sega.util.jackson.BasicMapper;
|
||||
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;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Component("Maimai2GetUserChargeHandler")
|
||||
public class GetUserChargeHandler implements BaseHandler {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(GetUserCharacterHandler.class);
|
||||
|
||||
private final BasicMapper mapper;
|
||||
|
||||
private final UserChargeRepository UserChargeRepository;
|
||||
|
||||
public GetUserChargeHandler(BasicMapper mapper, UserChargeRepository UserChargeRepository) {
|
||||
this.mapper = mapper;
|
||||
this.UserChargeRepository = UserChargeRepository;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String handle(Map<String, Object> request) throws JsonProcessingException {
|
||||
long userId = ((Number) request.get("userId")).longValue();
|
||||
|
||||
List<UserCharge> userChargeList = UserChargeRepository.findByUser_Card_ExtId(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,58 @@
|
||||
package icu.samnyan.aqua.sega.maimai2.handler.impl;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import icu.samnyan.aqua.sega.maimai2.dao.userdata.UserCourseRepository;
|
||||
import icu.samnyan.aqua.sega.maimai2.handler.BaseHandler;
|
||||
import icu.samnyan.aqua.sega.maimai2.model.userdata.UserCourse;
|
||||
import icu.samnyan.aqua.sega.util.jackson.BasicMapper;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.data.domain.PageRequest;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Component("Maimai2GetUserCourseHandler")
|
||||
public class GetUserCourseHandler implements BaseHandler {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(GetUserMusicHandler.class);
|
||||
|
||||
private final BasicMapper mapper;
|
||||
|
||||
private final UserCourseRepository userCourseRepository;
|
||||
|
||||
public GetUserCourseHandler(BasicMapper mapper, UserCourseRepository userCourseRepository) {
|
||||
this.mapper = mapper;
|
||||
this.userCourseRepository = userCourseRepository;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String handle(Map<String, Object> request) throws JsonProcessingException {
|
||||
long userId = ((Number) request.get("userId")).longValue();
|
||||
int nextIndexVal = ((Number) request.get("nextIndex")).intValue();
|
||||
|
||||
//TODO: find what game actually wants. Stub value 10 used for now.
|
||||
int maxCount = 10;
|
||||
|
||||
int pageNum = nextIndexVal / maxCount;
|
||||
|
||||
Page<UserCourse> dbPage = userCourseRepository.findByUser_Card_ExtId(userId, PageRequest.of(pageNum, maxCount));
|
||||
|
||||
long currentIndex = maxCount * pageNum + dbPage.getNumberOfElements();
|
||||
|
||||
Map<String, Object> resultMap = new LinkedHashMap<>();
|
||||
resultMap.put("userId", userId);
|
||||
resultMap.put("nextIndex", dbPage.getNumberOfElements() < maxCount ? 0 : currentIndex);
|
||||
|
||||
resultMap.put("userCourseList", dbPage.getContent());
|
||||
|
||||
String json = mapper.write(resultMap);
|
||||
logger.info("Response: " + json);
|
||||
return json;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,39 @@
|
||||
package icu.samnyan.aqua.sega.maimai2.model.gamedata;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Entity(name = "Maimai2GameCharge")
|
||||
@Table(name = "maimai2_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 String startDate;
|
||||
|
||||
private String endDate;
|
||||
|
||||
}
|
||||
@ -15,11 +15,11 @@ import java.io.Serializable;
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class UpsertUserAll implements Serializable {
|
||||
public long userId;
|
||||
public long playlogId;
|
||||
@JsonProperty("isEventMode")
|
||||
public boolean isEventMode;
|
||||
@JsonProperty("isFreePlay")
|
||||
public boolean isFreePlay;
|
||||
public UserAll upsertUserAll;
|
||||
private long userId;
|
||||
private long playlogId;
|
||||
@JsonProperty("isEventMode")
|
||||
private boolean isEventMode;
|
||||
@JsonProperty("isFreePlay")
|
||||
private boolean isFreePlay;
|
||||
private UserAll upsertUserAll;
|
||||
}
|
||||
|
||||
@ -9,6 +9,7 @@ import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
@ -17,22 +18,26 @@ import java.util.List;
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class UserAll implements Serializable {
|
||||
public List<UserDetail> userData;
|
||||
public List<UserExtend> userExtend;
|
||||
public List<UserOption> userOption;
|
||||
public List<UserCharacter> userCharacterList;
|
||||
public List<UserGhost> userGhost;
|
||||
public List<UserMap> userMapList;
|
||||
public List<UserLoginBonus> userLoginBonusList;
|
||||
public List<UserRating> userRatingList;
|
||||
public List<UserItem> userItemList;
|
||||
public List<UserMusicDetail> userMusicDetailList;
|
||||
public List<UserFavorite> userFavoriteList;
|
||||
public List<UserActivity> userActivityList;
|
||||
public String isNewCharacterList;
|
||||
public String isNewMapList;
|
||||
public String isNewLoginBonusList;
|
||||
public String isNewItemList;
|
||||
public String isNewMusicDetailList;
|
||||
public String isNewFavoriteList;
|
||||
private List<UserDetail> userData;
|
||||
private List<UserExtend> userExtend;
|
||||
private List<UserOption> userOption;
|
||||
private List<UserCharacter> userCharacterList;
|
||||
private List<UserGhost> userGhost;
|
||||
private List<UserMap> userMapList;
|
||||
private List<UserLoginBonus> userLoginBonusList;
|
||||
private List<UserRating> userRatingList;
|
||||
private List<UserItem> userItemList;
|
||||
private List<UserMusicDetail> userMusicDetailList;
|
||||
private List<UserCourse> userCourseList;
|
||||
private List<UserCharge> userChargeList;
|
||||
private List<UserFavorite> userFavoriteList;
|
||||
private List<UserActivity> userActivityList;
|
||||
private Map<String, Object> userGamePlaylogList;
|
||||
private String isNewCharacterList;
|
||||
private String isNewMapList;
|
||||
private String isNewLoginBonusList;
|
||||
private String isNewItemList;
|
||||
private String isNewMusicDetailList;
|
||||
private String isNewCourseList;
|
||||
private String isNewFavoriteList;
|
||||
}
|
||||
|
||||
@ -0,0 +1,47 @@
|
||||
package icu.samnyan.aqua.sega.maimai2.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 = "Maimai2UserCharge")
|
||||
@Table(name = "maimai2_user_charge", uniqueConstraints = {@UniqueConstraint(columnNames = {"user_id", "charge_id"})})
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@JsonPropertyOrder({"chargeId", "stock", "purchaseDate", "validDate"})
|
||||
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 UserDetail user;
|
||||
|
||||
@Column(name = "charge_id")
|
||||
private int chargeId;
|
||||
|
||||
private int stock;
|
||||
|
||||
private String purchaseDate;
|
||||
|
||||
private String validDate;
|
||||
|
||||
public UserCharge(UserDetail user) {
|
||||
this.user = user;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,51 @@
|
||||
package icu.samnyan.aqua.sega.maimai2.model.userdata;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import javax.persistence.*;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Entity(name = "MaiMai2UserCourse")
|
||||
@Table(name = "maimai2_user_course")
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class UserCourse implements Serializable {
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@JsonIgnore
|
||||
private long id;
|
||||
|
||||
@JsonIgnore
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "user_id")
|
||||
private UserDetail user;
|
||||
|
||||
private int courseId;
|
||||
@JsonProperty("isLastClear")
|
||||
private boolean isLastClear;
|
||||
private int totalRestlife;
|
||||
private int totalAchievement;
|
||||
private int totalDeluxscore;
|
||||
private int playCount;
|
||||
private String clearDate;
|
||||
private String lastPlayDate;
|
||||
private int bestAchievement;
|
||||
private String bestAchievementDate;
|
||||
private int bestDeluxscore;
|
||||
private String bestDeluxscoreDate;
|
||||
|
||||
public UserCourse(UserDetail user) {
|
||||
this.user = user;
|
||||
}
|
||||
}
|
||||
@ -52,6 +52,8 @@ public class UserDetail implements Serializable {
|
||||
private int playerRating;
|
||||
private int highestRating;
|
||||
private int gradeRank;
|
||||
private int classRank;
|
||||
private int courseRank;
|
||||
|
||||
@Convert(converter = IntegerListConverter.class)
|
||||
private List<Integer> charaSlot; // Entries: 5
|
||||
@ -67,6 +69,8 @@ public class UserDetail implements Serializable {
|
||||
private String lastDataVersion;
|
||||
private String lastLoginDate;
|
||||
private String lastPlayDate;
|
||||
private int lastPlayCredit;
|
||||
private int lastPlayMode;
|
||||
private int lastPlaceId;
|
||||
private String lastPlaceName;
|
||||
private int lastAllNetId;
|
||||
@ -74,12 +78,17 @@ public class UserDetail implements Serializable {
|
||||
private String lastRegionName;
|
||||
private String lastClientId;
|
||||
private String lastCountryCode;
|
||||
private int lastSelectEMoney;
|
||||
private int lastSelectTicket;
|
||||
private int lastSelectCourse;
|
||||
private int lastCountCourse;
|
||||
private String firstGameId;
|
||||
private String firstRomVersion;
|
||||
private String firstDataVersion;
|
||||
private String firstPlayDate;
|
||||
private String compatibleCmVersion;
|
||||
private String dailyBonusDate;
|
||||
private String dailyCourseBonusDate;
|
||||
private int playVsCount;
|
||||
private int playSyncCount;
|
||||
private int winCount;
|
||||
|
||||
@ -34,7 +34,7 @@ public class UserFavorite implements Serializable {
|
||||
@JoinColumn(name = "user_id")
|
||||
private UserDetail user;
|
||||
|
||||
@JsonProperty("id")
|
||||
@JsonProperty("userId")
|
||||
private long favUserId;
|
||||
private int itemKind;
|
||||
|
||||
|
||||
@ -19,6 +19,9 @@ public class UserGhost {
|
||||
private int titleId;
|
||||
private int rate;
|
||||
private int udemaeRate;
|
||||
private int courseRank;
|
||||
private int classRank;
|
||||
private int classValue;
|
||||
private String playDatetime;
|
||||
private int shopId;
|
||||
private int regionCode;
|
||||
|
||||
@ -58,6 +58,7 @@ public class UserOption implements Serializable {
|
||||
private int dispJudgePos;
|
||||
private int dispJudgeTouchPos;
|
||||
private int adjustTiming;
|
||||
private int judgeTiming;
|
||||
private int ansVolume;
|
||||
private int tapHoldVolume;
|
||||
private int criticalSe;
|
||||
|
||||
@ -32,6 +32,8 @@ public class UserUdemae implements Serializable {
|
||||
|
||||
private int rate;
|
||||
private int maxRate;
|
||||
private int classValue;
|
||||
private int maxClassValue;
|
||||
private int totalWinNum;
|
||||
private int totalLoseNum;
|
||||
private int maxWinNum;
|
||||
|
||||
@ -0,0 +1,60 @@
|
||||
CREATE TABLE maimai2_game_charge (
|
||||
id BIGINT auto_increment PRIMARY KEY,
|
||||
order_id INTEGER,
|
||||
charge_id INTEGER,
|
||||
price INTEGER,
|
||||
start_date VARCHAR (255),
|
||||
end_date VARCHAR (255),
|
||||
constraint UKu8vb9gsi4qvaqdcn
|
||||
unique (charge_id)
|
||||
);
|
||||
|
||||
CREATE TABLE maimai2_user_charge (
|
||||
id BIGINT auto_increment PRIMARY KEY,
|
||||
charge_id INTEGER,
|
||||
stock INTEGER,
|
||||
purchase_date VARCHAR (255),
|
||||
valid_date VARCHAR (255),
|
||||
user_id BIGINT,
|
||||
constraint UKm7xas9pcf3hf7grv
|
||||
unique (charge_id, user_id),
|
||||
constraint FKzxm95bz5qiqmzof9
|
||||
foreign key (user_id) references maimai2_user_detail (id)
|
||||
);
|
||||
|
||||
CREATE TABLE maimai2_user_course (
|
||||
id BIGINT auto_increment PRIMARY KEY,
|
||||
course_id INTEGER,
|
||||
is_last_clear BOOLEAN,
|
||||
total_rest_life INTEGER,
|
||||
total_achievement INTEGER,
|
||||
total_deluxscore INTEGER,
|
||||
play_count INTEGER,
|
||||
clear_date VARCHAR (255),
|
||||
last_play_date VARCHAR (255),
|
||||
best_achievement INTEGER,
|
||||
best_achievement_date VARCHAR (255),
|
||||
best_deluxscore INTEGER,
|
||||
best_deluxscore_date VARCHAR (255),
|
||||
user_id BIGINT,
|
||||
constraint FKe7xdxfwuxr4ik5vz
|
||||
foreign key (user_id) references maimai2_user_detail (id)
|
||||
);
|
||||
|
||||
ALTER TABLE `maimai2_user_detail`
|
||||
ADD COLUMN `class_rank` int DEFAULT 0,
|
||||
ADD COLUMN `course_rank` int DEFAULT 0,
|
||||
ADD COLUMN `last_play_credit` int DEFAULT 1,
|
||||
ADD COLUMN `last_play_mode` int DEFAULT 0,
|
||||
ADD COLUMN `last_selectemoney` int DEFAULT 0,
|
||||
ADD COLUMN `last_select_ticket` int DEFAULT 0,
|
||||
ADD COLUMN `last_select_course` int DEFAULT 0,
|
||||
ADD COLUMN `last_count_course` int DEFAULT 0,
|
||||
ADD COLUMN `daily_course_bonus_date` VARCHAR (255) DEFAULT "2000-01-01 05:00:00.0";
|
||||
|
||||
ALTER TABLE `maimai2_user_option`
|
||||
ADD COLUMN `judge_timing` int DEFAULT 0;
|
||||
|
||||
ALTER TABLE `maimai2_user_udemae`
|
||||
ADD COLUMN `class_value` int DEFAULT 0,
|
||||
ADD COLUMN `mac_class_value` int DEFAULT 0;
|
||||
@ -0,0 +1,228 @@
|
||||
CREATE TABLE maimai2_game_charge (
|
||||
id INTEGER,
|
||||
order_id INTEGER,
|
||||
charge_id INTEGER UNIQUE,
|
||||
price INTEGER,
|
||||
start_date VARCHAR (255),
|
||||
end_date VARCHAR (255),
|
||||
PRIMARY KEY (
|
||||
id
|
||||
)
|
||||
);
|
||||
|
||||
CREATE TABLE maimai2_user_charge (
|
||||
id INTEGER,
|
||||
charge_id INTEGER,
|
||||
stock INTEGER,
|
||||
purchase_date VARCHAR (255),
|
||||
valid_date VARCHAR (255),
|
||||
user_id BIGINT REFERENCES maimai2_user_detail (id) ON DELETE CASCADE,
|
||||
PRIMARY KEY (
|
||||
id
|
||||
),
|
||||
CONSTRAINT maimai2_user_change_uq UNIQUE (
|
||||
charge_id,
|
||||
user_id
|
||||
)
|
||||
);
|
||||
|
||||
CREATE TABLE maimai2_user_course (
|
||||
id INTEGER,
|
||||
course_id INTEGER,
|
||||
is_last_clear BOOLEAN,
|
||||
total_rest_life INTEGER,
|
||||
total_achievement INTEGER,
|
||||
total_deluxscore INTEGER,
|
||||
play_count INTEGER,
|
||||
clear_date VARCHAR (255),
|
||||
last_play_date VARCHAR (255),
|
||||
best_achievement INTEGER,
|
||||
best_achievement_date VARCHAR (255),
|
||||
best_deluxscore INTEGER,
|
||||
best_deluxscore_date VARCHAR (255),
|
||||
user_id BIGINT REFERENCES maimai2_user_detail (id),
|
||||
PRIMARY KEY (
|
||||
id
|
||||
)
|
||||
);
|
||||
|
||||
-- maimai2_user_detail: class_rank, course_rank, last_play_credit, last_play_mode, last_selectemoney, last_select_ticket, last_select_course, last_count_course, daily_course_bonus_date
|
||||
CREATE TABLE maimai2_user_detail_new (
|
||||
id INTEGER,
|
||||
aime_card_id BIGINT REFERENCES sega_card (id) ON DELETE CASCADE,
|
||||
user_name VARCHAR (255),
|
||||
is_net_member INTEGER,
|
||||
icon_id INTEGER,
|
||||
plate_id INTEGER,
|
||||
title_id INTEGER,
|
||||
partner_id INTEGER,
|
||||
frame_id INTEGER,
|
||||
select_map_id INTEGER,
|
||||
total_awake INTEGER,
|
||||
grade_rating INTEGER,
|
||||
music_rating INTEGER,
|
||||
player_rating INTEGER,
|
||||
highest_rating INTEGER,
|
||||
grade_rank INTEGER,
|
||||
class_rank INTEGER,
|
||||
course_rank INTEGER,
|
||||
chara_slot VARCHAR (255),
|
||||
chara_lock_slot VARCHAR (255),
|
||||
content_bit BIGINT,
|
||||
play_count INTEGER,
|
||||
event_watched_date VARCHAR (255),
|
||||
last_game_id VARCHAR (255),
|
||||
last_rom_version VARCHAR (255),
|
||||
last_data_version VARCHAR (255),
|
||||
last_login_date VARCHAR (255),
|
||||
last_play_date VARCHAR (255),
|
||||
last_play_credit INTEGER,
|
||||
last_play_mode INTEGER,
|
||||
last_place_id INTEGER,
|
||||
last_place_name VARCHAR (255),
|
||||
last_all_net_id INTEGER,
|
||||
last_region_id INTEGER,
|
||||
last_region_name VARCHAR (255),
|
||||
last_client_id VARCHAR (255),
|
||||
last_country_code VARCHAR (255),
|
||||
last_selectemoney INTEGER,
|
||||
last_select_ticket INTEGER,
|
||||
last_select_course INTEGER,
|
||||
last_count_course INTEGER,
|
||||
first_game_id VARCHAR (255),
|
||||
first_rom_version VARCHAR (255),
|
||||
first_data_version VARCHAR (255),
|
||||
first_play_date VARCHAR (255),
|
||||
compatible_cm_version VARCHAR (255),
|
||||
daily_bonus_date VARCHAR (255),
|
||||
daily_course_bonus_date VARCHAR (255),
|
||||
play_vs_count INTEGER,
|
||||
play_sync_count INTEGER,
|
||||
win_count INTEGER,
|
||||
help_count INTEGER,
|
||||
combo_count INTEGER,
|
||||
total_deluxscore BIGINT,
|
||||
total_basic_deluxscore BIGINT,
|
||||
total_advanced_deluxscore BIGINT,
|
||||
total_expert_deluxscore BIGINT,
|
||||
total_master_deluxscore BIGINT,
|
||||
total_re_master_deluxscore BIGINT,
|
||||
total_sync INTEGER,
|
||||
total_basic_sync INTEGER,
|
||||
total_advanced_sync INTEGER,
|
||||
total_expert_sync INTEGER,
|
||||
total_master_sync INTEGER,
|
||||
total_re_master_sync INTEGER,
|
||||
total_achievement BIGINT,
|
||||
total_basic_achievement BIGINT,
|
||||
total_advanced_achievement BIGINT,
|
||||
total_expert_achievement BIGINT,
|
||||
total_master_achievement BIGINT,
|
||||
total_re_master_achievement BIGINT,
|
||||
date_time BIGINT,
|
||||
PRIMARY KEY (
|
||||
id
|
||||
)
|
||||
);
|
||||
|
||||
INSERT INTO maimai2_user_detail_new
|
||||
(id, aime_card_id, user_name, is_net_member, icon_id, plate_id, title_id, partner_id, frame_id, select_map_id, total_awake, grade_rating, music_rating, player_rating, highest_rating, grade_rank, chara_slot, chara_lock_slot, content_bit, play_count, event_watched_date, last_game_id, last_rom_version, last_data_version, last_login_date, last_play_date, last_place_id, last_place_name, last_all_net_id, last_region_id, last_region_name, last_client_id, last_country_code, first_game_id, first_rom_version, first_data_version, first_play_date, compatible_cm_version, daily_bonus_date, play_vs_count, play_sync_count, win_count, help_count, combo_count, total_deluxscore, total_basic_deluxscore, total_advanced_deluxscore, total_expert_deluxscore, total_master_deluxscore, total_re_master_deluxscore, total_sync, total_basic_sync, total_advanced_sync, total_expert_sync, total_master_sync, total_re_master_sync, total_achievement, total_basic_achievement, total_advanced_achievement, total_expert_achievement, total_master_achievement, total_re_master_achievement, date_time, class_rank, course_rank, last_play_credit, last_play_mode, last_selectemoney, last_select_ticket, last_select_course, last_count_course, daily_course_bonus_date)
|
||||
SELECT id, aime_card_id, user_name, is_net_member, icon_id, plate_id, title_id, partner_id, frame_id, select_map_id, total_awake, grade_rating, music_rating, player_rating, highest_rating, grade_rank, chara_slot, chara_lock_slot, content_bit, play_count, event_watched_date, last_game_id, last_rom_version, last_data_version, last_login_date, last_play_date, last_place_id, last_place_name, last_all_net_id, last_region_id, last_region_name, last_client_id, last_country_code, first_game_id, first_rom_version, first_data_version, first_play_date, compatible_cm_version, daily_bonus_date, play_vs_count, play_sync_count, win_count, help_count, combo_count, total_deluxscore, total_basic_deluxscore, total_advanced_deluxscore, total_expert_deluxscore, total_master_deluxscore, total_re_master_deluxscore, total_sync, total_basic_sync, total_advanced_sync, total_expert_sync, total_master_sync, total_re_master_sync, total_achievement, total_basic_achievement, total_advanced_achievement, total_expert_achievement, total_master_achievement, total_re_master_achievement, date_time, 0, 0, 1, 0, 0, 0, 0, 0, "2000-01-01 05:00:00.0"
|
||||
FROM maimai2_user_detail;
|
||||
|
||||
ALTER TABLE maimai2_user_detail RENAME TO bak_maimai2_user_detail;
|
||||
ALTER TABLE maimai2_user_detail_new RENAME TO maimai2_user_detail;
|
||||
|
||||
-- maimai2_user_option: judge_timing
|
||||
CREATE TABLE maimai2_user_option_new (
|
||||
id INTEGER,
|
||||
option_kind INTEGER,
|
||||
note_speed INTEGER,
|
||||
slide_speed INTEGER,
|
||||
touch_speed INTEGER,
|
||||
tap_design INTEGER,
|
||||
hold_design INTEGER,
|
||||
slide_design INTEGER,
|
||||
star_type INTEGER,
|
||||
outline_design INTEGER,
|
||||
note_size INTEGER,
|
||||
slide_size INTEGER,
|
||||
touch_size INTEGER,
|
||||
star_rotate INTEGER,
|
||||
disp_center INTEGER,
|
||||
disp_chain INTEGER,
|
||||
disp_rate INTEGER,
|
||||
disp_bar INTEGER,
|
||||
touch_effect INTEGER,
|
||||
submonitor_animation INTEGER,
|
||||
submonitor_achive INTEGER,
|
||||
submonitor_appeal INTEGER,
|
||||
matching INTEGER,
|
||||
track_skip INTEGER,
|
||||
brightness INTEGER,
|
||||
mirror_mode INTEGER,
|
||||
disp_judge INTEGER,
|
||||
disp_judge_pos INTEGER,
|
||||
disp_judge_touch_pos INTEGER,
|
||||
adjust_timing INTEGER,
|
||||
judge_timing INTEGER,
|
||||
ans_volume INTEGER,
|
||||
tap_hold_volume INTEGER,
|
||||
critical_se INTEGER,
|
||||
break_se INTEGER,
|
||||
break_volume INTEGER,
|
||||
ex_se INTEGER,
|
||||
ex_volume INTEGER,
|
||||
slide_se INTEGER,
|
||||
slide_volume INTEGER,
|
||||
touch_hold_volume INTEGER,
|
||||
damage_se_volume INTEGER,
|
||||
head_phone_volume INTEGER,
|
||||
sort_tab INTEGER,
|
||||
sort_music INTEGER,
|
||||
user_id BIGINT REFERENCES maimai2_user_detail (id) ON DELETE CASCADE,
|
||||
PRIMARY KEY (
|
||||
id
|
||||
)
|
||||
);
|
||||
|
||||
INSERT INTO maimai2_user_option_new
|
||||
(id, option_kind, note_speed, slide_speed, touch_speed, tap_design, hold_design, slide_design, star_type, outline_design, note_size, slide_size, touch_size, star_rotate, disp_center, disp_chain, disp_rate, disp_bar, touch_effect, submonitor_animation, submonitor_achive, submonitor_appeal, matching, track_skip, brightness, mirror_mode, disp_judge, disp_judge_pos, disp_judge_touch_pos, adjust_timing, ans_volume, tap_hold_volume, critical_se, break_se, break_volume, ex_se, ex_volume, slide_se, slide_volume, touch_hold_volume, damage_se_volume, head_phone_volume, sort_tab, sort_music, user_id, judge_timing)
|
||||
SELECT id, option_kind, note_speed, slide_speed, touch_speed, tap_design, hold_design, slide_design, star_type, outline_design, note_size, slide_size, touch_size, star_rotate, disp_center, disp_chain, disp_rate, disp_bar, touch_effect, submonitor_animation, submonitor_achive, submonitor_appeal, matching, track_skip, brightness, mirror_mode, disp_judge, disp_judge_pos, disp_judge_touch_pos, adjust_timing, ans_volume, tap_hold_volume, critical_se, break_se, break_volume, ex_se, ex_volume, slide_se, slide_volume, touch_hold_volume, damage_se_volume, head_phone_volume, sort_tab, sort_music, user_id, 0
|
||||
FROM maimai2_user_option;
|
||||
|
||||
ALTER TABLE maimai2_user_option RENAME TO bak_maimai2_user_option;
|
||||
ALTER TABLE maimai2_user_option_new RENAME TO maimai2_user_option;
|
||||
|
||||
-- maimai2_user_udemae: class_value, max_class_value
|
||||
CREATE TABLE maimai2_user_udemae_new (
|
||||
id INTEGER,
|
||||
rate INTEGER,
|
||||
max_rate INTEGER,
|
||||
class_value INTEGER,
|
||||
max_class_value INTEGER,
|
||||
total_win_num INTEGER,
|
||||
total_lose_num INTEGER,
|
||||
max_win_num INTEGER,
|
||||
max_lose_num INTEGER,
|
||||
win_num INTEGER,
|
||||
lose_num INTEGER,
|
||||
npc_total_win_num INTEGER,
|
||||
npc_total_lose_num INTEGER,
|
||||
npc_max_win_num INTEGER,
|
||||
npc_max_lose_num INTEGER,
|
||||
npc_win_num INTEGER,
|
||||
npc_lose_num INTEGER,
|
||||
user_id BIGINT REFERENCES maimai2_user_detail (id) ON DELETE CASCADE,
|
||||
PRIMARY KEY (
|
||||
id
|
||||
)
|
||||
);
|
||||
|
||||
INSERT INTO maimai2_user_udemae_new
|
||||
(id, rate, max_rate, total_win_num, total_lose_num, max_win_num, max_lose_num, win_num, lose_num, npc_total_win_num, npc_total_lose_num, npc_max_win_num, npc_max_lose_num, npc_win_num, npc_lose_num, user_id, class_value, max_class_value)
|
||||
SELECT id, rate, max_rate, total_win_num, total_lose_num, max_win_num, max_lose_num, win_num, lose_num, npc_total_win_num, npc_total_lose_num, npc_max_win_num, npc_max_lose_num, npc_win_num, npc_lose_num, user_id, 0, 0
|
||||
FROM maimai2_user_udemae;
|
||||
|
||||
ALTER TABLE maimai2_user_udemae RENAME TO bak_maimai2_user_udemae;
|
||||
ALTER TABLE maimai2_user_udemae_new RENAME TO maimai2_user_udemae;
|
||||
Loading…
x
Reference in New Issue
Block a user