mirror of https://github.com/hykilpikonna/AquaDX
[+] Remove classes, migration guide
parent
f01a4fcfac
commit
073febe24a
|
@ -91,3 +91,13 @@ Located at: [icu.samnyan.aqua.net.UserRegistrar](icu/samnyan/aqua/net/UserRegist
|
||||||
* token: String
|
* token: String
|
||||||
* file: MultipartFile
|
* file: MultipartFile
|
||||||
* **Returns**: Success message
|
* **Returns**: Success message
|
||||||
|
|
||||||
|
# Migration
|
||||||
|
|
||||||
|
### Chuni / Chusan
|
||||||
|
|
||||||
|
GET /api/game/chuni/v2/profile > /api/v2/chu3/user-box
|
||||||
|
GET /api/game/chuni/v2/data > /api/v2/chu3/user-box-all-items
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,72 +0,0 @@
|
||||||
package icu.samnyan.aqua.api.controller.sega.game.chuni.v2;
|
|
||||||
|
|
||||||
import icu.samnyan.aqua.sega.chusan.model.*;
|
|
||||||
import icu.samnyan.aqua.sega.chusan.model.gamedata.Character;
|
|
||||||
import icu.samnyan.aqua.sega.chusan.model.gamedata.*;
|
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author samnyan (privateamusement@protonmail.com)
|
|
||||||
*/
|
|
||||||
@RestController
|
|
||||||
@RequestMapping("api/game/chuni/v2/data")
|
|
||||||
@ConditionalOnProperty(prefix = "aquaviewer.api", name = "enabled", havingValue = "true")
|
|
||||||
@AllArgsConstructor
|
|
||||||
public class ApiChuniV2GameDataController {
|
|
||||||
|
|
||||||
private final Chu3GameMusicRepo gameMusicRepository;
|
|
||||||
private final Chu3GameCharacterRepo gameCharacterRepository;
|
|
||||||
private final Chu3GameTrophyRepo gameTrophyRepository;
|
|
||||||
private final Chu3GameNamePlateRepo gameNamePlateRepository;
|
|
||||||
private final Chu3GameSystemVoiceRepo gameSystemVoiceRepository;
|
|
||||||
private final Chu3GameMapIconRepo gameMapIconRepository;
|
|
||||||
private final Chu3GameFrameRepo gameFrameRepository;
|
|
||||||
private final Chu3GameAvatarAccRepo gameAvatarAccRepository;
|
|
||||||
|
|
||||||
@GetMapping("music")
|
|
||||||
public List<Music> getMusic() {
|
|
||||||
return gameMusicRepository.findAll();
|
|
||||||
}
|
|
||||||
|
|
||||||
@GetMapping("character")
|
|
||||||
public List<Character> getCharacter() {
|
|
||||||
return gameCharacterRepository.findAll();
|
|
||||||
}
|
|
||||||
|
|
||||||
@GetMapping("trophy")
|
|
||||||
public List<Trophy> getTrophy() {
|
|
||||||
return gameTrophyRepository.findAll();
|
|
||||||
}
|
|
||||||
|
|
||||||
@GetMapping("nameplate")
|
|
||||||
public List<NamePlate> getNamePlate() {
|
|
||||||
return gameNamePlateRepository.findAll();
|
|
||||||
}
|
|
||||||
|
|
||||||
@GetMapping("sysvoice")
|
|
||||||
public List<SystemVoice> getSystemVoice() {
|
|
||||||
return gameSystemVoiceRepository.findAll();
|
|
||||||
}
|
|
||||||
|
|
||||||
@GetMapping("mapicon")
|
|
||||||
public List<MapIcon> getMapIcon() {
|
|
||||||
return gameMapIconRepository.findAll();
|
|
||||||
}
|
|
||||||
|
|
||||||
@GetMapping("frame")
|
|
||||||
public List<Frame> getFrame() {
|
|
||||||
return gameFrameRepository.findAll();
|
|
||||||
}
|
|
||||||
|
|
||||||
@GetMapping("avatar")
|
|
||||||
public List<AvatarAcc> getAvatarAcc() {
|
|
||||||
return gameAvatarAccRepository.findAll();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -3,7 +3,6 @@ package icu.samnyan.aqua.api.controller.sega.game.chuni.v2;
|
||||||
import com.fasterxml.jackson.core.type.TypeReference;
|
import com.fasterxml.jackson.core.type.TypeReference;
|
||||||
import icu.samnyan.aqua.api.model.MessageResponse;
|
import icu.samnyan.aqua.api.model.MessageResponse;
|
||||||
import icu.samnyan.aqua.api.model.ReducedPageResponse;
|
import icu.samnyan.aqua.api.model.ReducedPageResponse;
|
||||||
import icu.samnyan.aqua.api.model.resp.sega.chuni.v2.ProfileResp;
|
|
||||||
import icu.samnyan.aqua.api.model.resp.sega.chuni.v2.RatingItem;
|
import icu.samnyan.aqua.api.model.resp.sega.chuni.v2.RatingItem;
|
||||||
import icu.samnyan.aqua.api.model.resp.sega.chuni.v2.RecentResp;
|
import icu.samnyan.aqua.api.model.resp.sega.chuni.v2.RecentResp;
|
||||||
import icu.samnyan.aqua.api.model.resp.sega.chuni.v2.external.Chu3DataExport;
|
import icu.samnyan.aqua.api.model.resp.sega.chuni.v2.external.Chu3DataExport;
|
||||||
|
@ -64,24 +63,6 @@ public class ApiChuniV2PlayerDataController {
|
||||||
private final UserGeneralDataService userGeneralDataService;
|
private final UserGeneralDataService userGeneralDataService;
|
||||||
private final GameMusicService gameMusicService;
|
private final GameMusicService gameMusicService;
|
||||||
|
|
||||||
/**
|
|
||||||
* Get Basic info
|
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@GetMapping("profile")
|
|
||||||
public ProfileResp getProfile(@RequestParam String aimeId) {
|
|
||||||
ProfileResp resp = mapper.convert(userDataService.getUserByExtId(aimeId).orElseThrow(), new TypeReference<>() {
|
|
||||||
});
|
|
||||||
UserCourse course = userCourseService.getByUserId(aimeId)
|
|
||||||
.stream()
|
|
||||||
.filter(UserCourse::isClear)
|
|
||||||
.max(Comparator.comparingInt(UserCourse::getClassId))
|
|
||||||
.orElseGet(() -> new UserCourse(0));
|
|
||||||
resp.setCourseClass(course.getClassId());
|
|
||||||
return resp;
|
|
||||||
}
|
|
||||||
|
|
||||||
@PutMapping("profile/username")
|
@PutMapping("profile/username")
|
||||||
public Chu3UserData updateName(@RequestBody Map<String, Object> request) {
|
public Chu3UserData updateName(@RequestBody Map<String, Object> request) {
|
||||||
Chu3UserData profile = userDataService.getUserByExtId((String) request.get("aimeId")).orElseThrow();
|
Chu3UserData profile = userDataService.getUserByExtId((String) request.get("aimeId")).orElseThrow();
|
||||||
|
|
|
@ -1,88 +0,0 @@
|
||||||
package icu.samnyan.aqua.api.model.resp.sega.chuni.v2;
|
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.NoArgsConstructor;
|
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author samnyan (privateamusement@protonmail.com)
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@AllArgsConstructor
|
|
||||||
@NoArgsConstructor
|
|
||||||
public class ProfileResp {
|
|
||||||
|
|
||||||
private String userName;
|
|
||||||
|
|
||||||
private int level;
|
|
||||||
|
|
||||||
private String exp;
|
|
||||||
|
|
||||||
private long point;
|
|
||||||
|
|
||||||
private long totalPoint;
|
|
||||||
|
|
||||||
private int playCount;
|
|
||||||
|
|
||||||
private int playerRating;
|
|
||||||
|
|
||||||
private int highestRating;
|
|
||||||
|
|
||||||
private int nameplateId;
|
|
||||||
|
|
||||||
private int frameId;
|
|
||||||
|
|
||||||
private int characterId;
|
|
||||||
|
|
||||||
private int trophyId;
|
|
||||||
|
|
||||||
private int totalMapNum;
|
|
||||||
|
|
||||||
private long totalHiScore;
|
|
||||||
|
|
||||||
private long totalBasicHighScore;
|
|
||||||
|
|
||||||
private long totalAdvancedHighScore;
|
|
||||||
|
|
||||||
private long totalExpertHighScore;
|
|
||||||
|
|
||||||
private long totalMasterHighScore;
|
|
||||||
|
|
||||||
private long totalUltimaHighScore;
|
|
||||||
|
|
||||||
private int friendCount;
|
|
||||||
|
|
||||||
private LocalDateTime firstPlayDate;
|
|
||||||
|
|
||||||
private LocalDateTime lastPlayDate;
|
|
||||||
|
|
||||||
private String lastRomVersion;
|
|
||||||
|
|
||||||
private String lastDataVersion;
|
|
||||||
|
|
||||||
private int courseClass;
|
|
||||||
|
|
||||||
private int overPowerPoint;
|
|
||||||
|
|
||||||
private int overPowerRate;
|
|
||||||
|
|
||||||
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;
|
|
||||||
}
|
|
Loading…
Reference in New Issue