mirror of https://github.com/hykilpikonna/AquaDX
[-] Remove unused services
parent
62a55a40c2
commit
df3deee316
|
@ -1,256 +0,0 @@
|
|||
package icu.samnyan.aqua.api.controller.sega.game.chuni.v2;
|
||||
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import icu.samnyan.aqua.api.model.MessageResponse;
|
||||
import icu.samnyan.aqua.api.model.ReducedPageResponse;
|
||||
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.util.ApiMapper;
|
||||
import icu.samnyan.aqua.sega.chusan.model.userdata.*;
|
||||
import icu.samnyan.aqua.sega.chusan.service.*;
|
||||
import icu.samnyan.aqua.sega.general.service.CardService;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.data.domain.PageRequest;
|
||||
import org.springframework.data.domain.Sort;
|
||||
import org.springframework.http.HttpHeaders;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* For all aimeId parameter, should use String
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("api/game/chuni/v2")
|
||||
@ConditionalOnProperty(prefix = "aquaviewer.api", name = "enabled", havingValue = "true")
|
||||
@AllArgsConstructor
|
||||
public class ApiChuniV2PlayerDataController {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(ApiChuniV2PlayerDataController.class);
|
||||
|
||||
private final ApiMapper mapper;
|
||||
|
||||
private final CardService cardService;
|
||||
|
||||
private final UserActivityService userActivityService;
|
||||
private final UserCharacterService userCharacterService;
|
||||
private final UserChargeService userChargeService;
|
||||
private final UserCourseService userCourseService;
|
||||
private final UserDataService userDataService;
|
||||
private final UserDuelService userDuelService;
|
||||
private final UserGameOptionService userGameOptionService;
|
||||
private final UserItemService userItemService;
|
||||
private final UserMapAreaService userMapAreaService;
|
||||
private final UserMusicDetailService userMusicDetailService;
|
||||
private final UserPlaylogService userPlaylogService;
|
||||
private final UserGeneralDataService userGeneralDataService;
|
||||
|
||||
@PutMapping("profile/username")
|
||||
public Chu3UserData updateName(@RequestBody Map<String, Object> request) {
|
||||
Chu3UserData profile = userDataService.getUserByExtId((String) request.get("aimeId")).orElseThrow();
|
||||
profile.setUserName((String) request.get("userName"));
|
||||
return userDataService.saveUserData(profile);
|
||||
}
|
||||
|
||||
@PutMapping("profile/romversion")
|
||||
public Chu3UserData updateRomVersion(@RequestBody Map<String, Object> request) {
|
||||
Chu3UserData profile = userDataService.getUserByExtId((String) request.get("aimeId")).orElseThrow();
|
||||
profile.setLastRomVersion((String) request.get("romVersion"));
|
||||
return userDataService.saveUserData(profile);
|
||||
}
|
||||
|
||||
@PutMapping("profile/dataversion")
|
||||
public Chu3UserData updateDataVersion(@RequestBody Map<String, Object> request) {
|
||||
Chu3UserData profile = userDataService.getUserByExtId((String) request.get("aimeId")).orElseThrow();
|
||||
profile.setLastDataVersion((String) request.get("dataVersion"));
|
||||
return userDataService.saveUserData(profile);
|
||||
}
|
||||
|
||||
@PutMapping("profile/plate")
|
||||
public Chu3UserData updatePlate(@RequestBody Map<String, Object> request) {
|
||||
Chu3UserData profile = userDataService.getUserByExtId((String) request.get("aimeId")).orElseThrow();
|
||||
profile.setNameplateId((Integer) request.get("nameplateId"));
|
||||
return userDataService.saveUserData(profile);
|
||||
}
|
||||
|
||||
@PutMapping("profile/frame")
|
||||
public Chu3UserData updateFrame(@RequestBody Map<String, Object> request) {
|
||||
Chu3UserData profile = userDataService.getUserByExtId((String) request.get("aimeId")).orElseThrow();
|
||||
profile.setFrameId((Integer) request.get("frameId"));
|
||||
return userDataService.saveUserData(profile);
|
||||
}
|
||||
|
||||
@PutMapping("profile/trophy")
|
||||
public Chu3UserData updateTrophy(@RequestBody Map<String, Object> request) {
|
||||
Chu3UserData profile = userDataService.getUserByExtId((String) request.get("aimeId")).orElseThrow();
|
||||
profile.setTrophyId((Integer) request.get("trophyId"));
|
||||
return userDataService.saveUserData(profile);
|
||||
}
|
||||
|
||||
@PutMapping("profile/mapicon")
|
||||
public Chu3UserData updateMapIcon(@RequestBody Map<String, Object> request) {
|
||||
Chu3UserData profile = userDataService.getUserByExtId((String) request.get("aimeId")).orElseThrow();
|
||||
profile.setMapIconId((Integer) request.get("mapiconId"));
|
||||
return userDataService.saveUserData(profile);
|
||||
}
|
||||
|
||||
@PutMapping("profile/sysvoice")
|
||||
public Chu3UserData updateSystemVoice(@RequestBody Map<String, Object> request) {
|
||||
Chu3UserData profile = userDataService.getUserByExtId((String) request.get("aimeId")).orElseThrow();
|
||||
profile.setVoiceId((Integer) request.get("voiceId"));
|
||||
return userDataService.saveUserData(profile);
|
||||
}
|
||||
|
||||
@PutMapping("profile/avatar")
|
||||
public Chu3UserData updateAvatar(@RequestBody Map<String, Object> request) {
|
||||
Chu3UserData profile = userDataService.getUserByExtId((String) request.get("aimeId")).orElseThrow();
|
||||
int category = (Integer) request.get("category");
|
||||
switch (category) {
|
||||
case 1:
|
||||
profile.setAvatarWear((Integer) request.get("accId"));
|
||||
break;
|
||||
case 2:
|
||||
profile.setAvatarHead((Integer) request.get("accId"));
|
||||
break;
|
||||
case 3:
|
||||
profile.setAvatarFace((Integer) request.get("accId"));
|
||||
break;
|
||||
case 4:
|
||||
profile.setAvatarSkin((Integer) request.get("accId"));
|
||||
break;
|
||||
case 5:
|
||||
profile.setAvatarItem((Integer) request.get("accId"));
|
||||
break;
|
||||
case 6:
|
||||
profile.setAvatarFront((Integer) request.get("accId"));
|
||||
break;
|
||||
case 7:
|
||||
profile.setAvatarBack((Integer) request.get("accId"));
|
||||
break;
|
||||
}
|
||||
|
||||
return userDataService.saveUserData(profile);
|
||||
}
|
||||
|
||||
@PutMapping("profile/privacy")
|
||||
public ResponseEntity<Object> updatePrivacy(@RequestBody Map<String, Object> request) {
|
||||
Chu3UserData profile = userDataService.getUserByExtId((String) request.get("aimeId")).orElseThrow();
|
||||
UserGameOption option = userGameOptionService.getByUser(profile).orElseThrow();
|
||||
int privacy = (Integer) request.get("privacy");
|
||||
if (privacy != 1 && privacy != 0) {
|
||||
return ResponseEntity.badRequest().body(new MessageResponse("Wrong data"));
|
||||
}
|
||||
option.setPrivacy(privacy);
|
||||
return ResponseEntity.ok(userDataService.saveUserData(profile));
|
||||
}
|
||||
|
||||
@GetMapping("recent")
|
||||
public ReducedPageResponse<RecentResp> getRecentPlay(@RequestParam String aimeId,
|
||||
@RequestParam(required = false, defaultValue = "0") int page,
|
||||
@RequestParam(required = false, defaultValue = "10") int size) {
|
||||
Page<UserPlaylog> playLogs = userPlaylogService.getRecentPlays(aimeId, PageRequest.of(page, size, Sort.by(Sort.Direction.DESC, "userPlayDate")));
|
||||
return new ReducedPageResponse<>(mapper.convert(playLogs.getContent(), new TypeReference<>() {
|
||||
}), playLogs.getPageable().getPageNumber(), playLogs.getTotalPages(), playLogs.getTotalElements());
|
||||
}
|
||||
|
||||
@GetMapping("song/{id}")
|
||||
public List<UserMusicDetail> getSongDetail(@RequestParam String aimeId, @PathVariable int id) {
|
||||
return userMusicDetailService.getByUserIdAndMusicId(aimeId, id);
|
||||
}
|
||||
|
||||
@GetMapping("song/{id}/{level}")
|
||||
public List<UserPlaylog> getLevelPlaylog(@RequestParam String aimeId, @PathVariable int id, @PathVariable int level) {
|
||||
return userPlaylogService.getByUserIdAndMusicIdAndLevel(aimeId, id, level);
|
||||
}
|
||||
|
||||
@GetMapping("song/{id}/isfavorite")
|
||||
public boolean getSongFavorite(@RequestParam String aimeId, @PathVariable String id) {
|
||||
Optional<UserGeneralData> favOptional;
|
||||
favOptional = userGeneralDataService.getByUserIdAndKey(aimeId, "favorite_music");
|
||||
if(favOptional.isPresent()) {
|
||||
String val = favOptional.get().getPropertyValue();
|
||||
if(StringUtils.isNotBlank(val) && val.contains(",")) {
|
||||
String[] records = val.split(",");
|
||||
for (String record : records) {
|
||||
if (record.equals(id)) return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@GetMapping("character")
|
||||
public ReducedPageResponse<UserCharacter> getCharacter(@RequestParam String aimeId,
|
||||
@RequestParam(required = false, defaultValue = "0") int page,
|
||||
@RequestParam(required = false, defaultValue = "10") int size) {
|
||||
Page<UserCharacter> characters = userCharacterService.getByUserId(aimeId, page, size);
|
||||
return new ReducedPageResponse<>(characters.getContent(), characters.getPageable().getPageNumber(), characters.getTotalPages(), characters.getTotalElements());
|
||||
}
|
||||
|
||||
@GetMapping("course")
|
||||
public List<UserCourse> getCourse(@RequestParam String aimeId) {
|
||||
return userCourseService.getByUserId(aimeId);
|
||||
}
|
||||
|
||||
@GetMapping("duel")
|
||||
public List<UserDuel> getDuel(@RequestParam String aimeId) {
|
||||
return userDuelService.getByUserId(aimeId);
|
||||
}
|
||||
|
||||
@GetMapping("item")
|
||||
public ReducedPageResponse<UserItem> getItem(@RequestParam String aimeId,
|
||||
@RequestParam(required = false, defaultValue = "0") int page,
|
||||
@RequestParam(required = false, defaultValue = "10") int size) {
|
||||
Page<UserItem> items = userItemService.getByUserId(aimeId, page, size);
|
||||
return new ReducedPageResponse<>(items.getContent(), items.getPageable().getPageNumber(), items.getTotalPages(), items.getTotalElements());
|
||||
}
|
||||
|
||||
@GetMapping("item/{itemKind}")
|
||||
public List<UserItem> getItemByKind(@RequestParam String aimeId, @PathVariable int itemKind) {
|
||||
return userItemService.getByUserAndItemKind(aimeId, itemKind);
|
||||
}
|
||||
|
||||
@GetMapping("general")
|
||||
public ResponseEntity<Object> getGeneralData(@RequestParam String aimeId, @RequestParam String key) {
|
||||
Optional<UserGeneralData> userGeneralDataOptional = userGeneralDataService.getByUserIdAndKey(aimeId,key);
|
||||
return userGeneralDataOptional.<ResponseEntity<Object>>map(ResponseEntity::ok)
|
||||
.orElseGet(() -> ResponseEntity.status(HttpStatus.NOT_FOUND).body(new MessageResponse("User or value not found.")));
|
||||
}
|
||||
|
||||
@GetMapping("export")
|
||||
public ResponseEntity<Object> exportAllUserData(@RequestParam String aimeId) {
|
||||
Chu3DataExport data = new Chu3DataExport();
|
||||
try {
|
||||
data.setGameId("SDHD");
|
||||
data.setUserData(userDataService.getUserByExtId(aimeId).orElseThrow());
|
||||
data.setUserActivityList(userActivityService.getByUserId(aimeId));
|
||||
data.setUserCharacterList(userCharacterService.getByUserId(aimeId));
|
||||
data.setUserChargeList(userChargeService.getByUserId(aimeId));
|
||||
data.setUserCourseList(userCourseService.getByUserId(aimeId));
|
||||
data.setUserDuelList(userDuelService.getByUserId(aimeId));
|
||||
data.setUserGameOption(userGameOptionService.getByUserId(aimeId).orElseThrow());
|
||||
data.setUserItemList(userItemService.getByUserId(aimeId));
|
||||
data.setUserMapList(userMapAreaService.getByUserId(aimeId));
|
||||
data.setUserMusicDetailList(userMusicDetailService.getByUserId(aimeId));
|
||||
data.setUserPlaylogList(userPlaylogService.getByUserId(aimeId));
|
||||
} catch (NoSuchElementException e) {
|
||||
return ResponseEntity.status(HttpStatus.NOT_FOUND)
|
||||
.body(new MessageResponse("User not found"));
|
||||
} catch (Exception e) {
|
||||
return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR)
|
||||
.body(new MessageResponse("Error during data export. Reason: " + e.getMessage()));
|
||||
}
|
||||
// Set filename
|
||||
HttpHeaders headers = new HttpHeaders();
|
||||
headers.set("content-disposition", "attachment; filename=chusan_" + aimeId + "_exported.json");
|
||||
return new ResponseEntity<>(data, headers, HttpStatus.OK);
|
||||
}
|
||||
}
|
|
@ -3,7 +3,7 @@ package icu.samnyan.aqua.sega.chusan
|
|||
import ext.*
|
||||
import icu.samnyan.aqua.sega.allnet.TokenChecker
|
||||
import icu.samnyan.aqua.sega.chusan.model.request.UserCMissionResp
|
||||
import icu.samnyan.aqua.sega.chusan.model.response.data.UserEmoney
|
||||
import icu.samnyan.aqua.sega.chusan.model.request.UserEmoney
|
||||
import icu.samnyan.aqua.sega.chusan.model.userdata.UserCharge
|
||||
import icu.samnyan.aqua.sega.chusan.model.userdata.UserItem
|
||||
import icu.samnyan.aqua.sega.chusan.model.userdata.UserMusicDetail
|
||||
|
|
|
@ -6,7 +6,7 @@ import ext.JDict
|
|||
import ext.int
|
||||
import ext.millis
|
||||
import ext.parsing
|
||||
import icu.samnyan.aqua.sega.chusan.model.response.data.MatchingWaitState
|
||||
import icu.samnyan.aqua.sega.chusan.model.request.MatchingWaitState
|
||||
import icu.samnyan.aqua.sega.chusan.model.userdata.Chu3MatchingMemberReq
|
||||
import kotlin.collections.MutableList
|
||||
import kotlin.collections.find
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package icu.samnyan.aqua.sega.chusan.model.response.data
|
||||
package icu.samnyan.aqua.sega.chusan.model.request
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
import icu.samnyan.aqua.sega.chusan.model.userdata.Chu3MatchingMemberReq
|
|
@ -0,0 +1,11 @@
|
|||
package icu.samnyan.aqua.sega.chusan.model.request
|
||||
|
||||
class UserEmoney(
|
||||
var type: Int = 0,
|
||||
var emoneyCredit: Int = 69,
|
||||
var emoneyBrand: Int = 2,
|
||||
var ext1: Int = 0,
|
||||
var ext2: Int = 0,
|
||||
var ext3: Int = 0
|
||||
)
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
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;
|
||||
}
|
|
@ -1,19 +0,0 @@
|
|||
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 SymbolChatInfo {
|
||||
|
||||
private int sceneId;
|
||||
private int symbolChatId;
|
||||
private int orderId;
|
||||
|
||||
}
|
|
@ -1,22 +0,0 @@
|
|||
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 UserEmoney {
|
||||
|
||||
private int type = 0;
|
||||
private int emoneyCredit = 69;
|
||||
private int emoneyBrand = 2;
|
||||
private int ext1 = 0;
|
||||
private int ext2 = 0;
|
||||
private int ext3 = 0;
|
||||
|
||||
}
|
|
@ -1,17 +0,0 @@
|
|||
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 UserFavorite {
|
||||
|
||||
private int id;
|
||||
|
||||
}
|
|
@ -6,44 +6,44 @@ import jakarta.persistence.Table
|
|||
@Entity(name = "ChusanNetBattleLog")
|
||||
@Table(name = "chusan_net_battle_log")
|
||||
class Chu3NetBattleLog(
|
||||
val roomId: Long = 0,
|
||||
val track: Long = 0,
|
||||
val selectUserId: Long = 0,
|
||||
val selectUserName: String = "",
|
||||
val opponentUserId1: Long = 0,
|
||||
val opponentUserId2: Long = 0,
|
||||
val opponentUserId3: Long = 0,
|
||||
val opponentUserName1: String = "",
|
||||
val opponentUserName2: String = "",
|
||||
val opponentUserName3: String = "",
|
||||
val opponentRegionId1: Int = 0,
|
||||
val opponentRegionId2: Int = 0,
|
||||
val opponentRegionId3: Int = 0,
|
||||
val opponentRating1: Int = 0,
|
||||
val opponentRating2: Int = 0,
|
||||
val opponentRating3: Int = 0,
|
||||
val opponentBattleRankId1: Int = 0,
|
||||
val opponentBattleRankId2: Int = 0,
|
||||
val opponentBattleRankId3: Int = 0,
|
||||
val opponentClassEmblemMedal1: Int = 0,
|
||||
val opponentClassEmblemMedal2: Int = 0,
|
||||
val opponentClassEmblemMedal3: Int = 0,
|
||||
val opponentClassEmblemBase1: Int = 0,
|
||||
val opponentClassEmblemBase2: Int = 0,
|
||||
val opponentClassEmblemBase3: Int = 0,
|
||||
val opponentScore1: Int = 0,
|
||||
val opponentScore2: Int = 0,
|
||||
val opponentScore3: Int = 0,
|
||||
val opponentCharaIllustId1: Int = 0,
|
||||
val opponentCharaIllustId2: Int = 0,
|
||||
val opponentCharaIllustId3: Int = 0,
|
||||
val opponentCharaLv1: Int = 0,
|
||||
val opponentCharaLv2: Int = 0,
|
||||
val opponentCharaLv3: Int = 0,
|
||||
val opponentRatingEffectColorId1: Int = 0,
|
||||
val opponentRatingEffectColorId2: Int = 0,
|
||||
val opponentRatingEffectColorId3: Int = 0,
|
||||
val battleRuleId: Int = 0,
|
||||
val monthPoLong: Int = 0,
|
||||
val eventPoLong: Int = 0
|
||||
var roomId: Long = 0,
|
||||
var track: Long = 0,
|
||||
var selectUserId: Long = 0,
|
||||
var selectUserName: String = "",
|
||||
var opponentUserId1: Long = 0,
|
||||
var opponentUserId2: Long = 0,
|
||||
var opponentUserId3: Long = 0,
|
||||
var opponentUserName1: String = "",
|
||||
var opponentUserName2: String = "",
|
||||
var opponentUserName3: String = "",
|
||||
var opponentRegionId1: Int = 0,
|
||||
var opponentRegionId2: Int = 0,
|
||||
var opponentRegionId3: Int = 0,
|
||||
var opponentRating1: Int = 0,
|
||||
var opponentRating2: Int = 0,
|
||||
var opponentRating3: Int = 0,
|
||||
var opponentBattleRankId1: Int = 0,
|
||||
var opponentBattleRankId2: Int = 0,
|
||||
var opponentBattleRankId3: Int = 0,
|
||||
var opponentClassEmblemMedal1: Int = 0,
|
||||
var opponentClassEmblemMedal2: Int = 0,
|
||||
var opponentClassEmblemMedal3: Int = 0,
|
||||
var opponentClassEmblemBase1: Int = 0,
|
||||
var opponentClassEmblemBase2: Int = 0,
|
||||
var opponentClassEmblemBase3: Int = 0,
|
||||
var opponentScore1: Int = 0,
|
||||
var opponentScore2: Int = 0,
|
||||
var opponentScore3: Int = 0,
|
||||
var opponentCharaIllustId1: Int = 0,
|
||||
var opponentCharaIllustId2: Int = 0,
|
||||
var opponentCharaIllustId3: Int = 0,
|
||||
var opponentCharaLv1: Int = 0,
|
||||
var opponentCharaLv2: Int = 0,
|
||||
var opponentCharaLv3: Int = 0,
|
||||
var opponentRatingEffectColorId1: Int = 0,
|
||||
var opponentRatingEffectColorId2: Int = 0,
|
||||
var opponentRatingEffectColorId3: Int = 0,
|
||||
var battleRuleId: Int = 0,
|
||||
var monthPoLong: Int = 0,
|
||||
var eventPoLong: Int = 0
|
||||
) : Chu3UserEntity()
|
||||
|
|
|
@ -6,7 +6,7 @@ import com.fasterxml.jackson.annotation.JsonProperty
|
|||
import com.fasterxml.jackson.databind.annotation.JsonSerialize
|
||||
import icu.samnyan.aqua.net.games.BaseEntity
|
||||
import icu.samnyan.aqua.net.games.IUserData
|
||||
import icu.samnyan.aqua.sega.chusan.model.response.data.UserEmoney
|
||||
import icu.samnyan.aqua.sega.chusan.model.request.UserEmoney
|
||||
import icu.samnyan.aqua.sega.general.model.Card
|
||||
import icu.samnyan.aqua.sega.util.jackson.AccessCodeSerializer
|
||||
import jakarta.persistence.*
|
||||
|
|
|
@ -11,15 +11,15 @@ import jakarta.persistence.UniqueConstraint
|
|||
class UserCharacter : Chu3UserEntity() {
|
||||
@Column(name = "character_id")
|
||||
var characterId = 0
|
||||
val playCount = 0
|
||||
val level = 1
|
||||
val friendshipExp = 0
|
||||
var playCount = 0
|
||||
var level = 1
|
||||
var friendshipExp = 0
|
||||
@JsonProperty("isValid")
|
||||
val isValid = true
|
||||
var isValid = true
|
||||
@JsonProperty("isNewMark")
|
||||
val isNewMark = true
|
||||
val exMaxLv = 0
|
||||
val assignIllust = 0
|
||||
val param1 = 0
|
||||
val param2 = 0
|
||||
var isNewMark = true
|
||||
var exMaxLv = 0
|
||||
var assignIllust = 0
|
||||
var param1 = 0
|
||||
var param2 = 0
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ import jakarta.persistence.UniqueConstraint
|
|||
class UserItem(
|
||||
var itemKind: Int = 0,
|
||||
var itemId: Int = 0,
|
||||
val stock: Int = 1,
|
||||
var stock: Int = 1,
|
||||
@JsonProperty("isValid")
|
||||
val isValid: Boolean = true
|
||||
var isValid: Boolean = true
|
||||
) : Chu3UserEntity()
|
||||
|
|
|
@ -1,22 +0,0 @@
|
|||
package icu.samnyan.aqua.sega.chusan.service;
|
||||
|
||||
import icu.samnyan.aqua.sega.chusan.model.Chu3GameLoginBonusPresetsRepo;
|
||||
import icu.samnyan.aqua.sega.chusan.model.gamedata.GameLoginBonusPreset;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Service("ChusanGameLoginBonusPresetService")
|
||||
public class GameLoginBonusPresetService {
|
||||
private final Chu3GameLoginBonusPresetsRepo gameLoginBonusPresetsRepository;
|
||||
|
||||
@Autowired
|
||||
public GameLoginBonusPresetService(Chu3GameLoginBonusPresetsRepo gameLoginBonusPresetsRepository){
|
||||
this.gameLoginBonusPresetsRepository = gameLoginBonusPresetsRepository;
|
||||
}
|
||||
|
||||
public List<GameLoginBonusPreset> getGameLoginBonusPresets(int version){
|
||||
return this.gameLoginBonusPresetsRepository.findLoginBonusPresets(version, 1);
|
||||
}
|
||||
}
|
|
@ -1,28 +0,0 @@
|
|||
package icu.samnyan.aqua.sega.chusan.service;
|
||||
|
||||
|
||||
import icu.samnyan.aqua.sega.chusan.model.Chu3GameLoginBonusRepo;
|
||||
import icu.samnyan.aqua.sega.chusan.model.gamedata.GameLoginBonus;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
@Service("ChusanGameLoginBonusService")
|
||||
public class GameLoginBonusService {
|
||||
private final Chu3GameLoginBonusRepo gameLoginBonusRepository;
|
||||
|
||||
@Autowired
|
||||
public GameLoginBonusService(Chu3GameLoginBonusRepo gameLoginBonusRepository){
|
||||
this.gameLoginBonusRepository = gameLoginBonusRepository;
|
||||
}
|
||||
|
||||
public List<GameLoginBonus> getAllGameLoginBonus(int presetId){
|
||||
return this.gameLoginBonusRepository.findGameLoginBonus(1, presetId);
|
||||
}
|
||||
|
||||
public Optional<GameLoginBonus> getGameLoginBonusByDay(int presetId, int day){
|
||||
return this.gameLoginBonusRepository.findByRequiredDays(1, presetId, day);
|
||||
}
|
||||
}
|
|
@ -1,28 +0,0 @@
|
|||
package icu.samnyan.aqua.sega.chusan.service;
|
||||
|
||||
import icu.samnyan.aqua.sega.chusan.model.Chu3UserActivityRepo;
|
||||
import icu.samnyan.aqua.sega.chusan.model.userdata.UserActivity;
|
||||
import icu.samnyan.aqua.sega.chusan.model.userdata.Chu3UserData;
|
||||
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 Chu3UserActivityRepo userActivityRepository;
|
||||
|
||||
@Autowired
|
||||
public UserActivityService(Chu3UserActivityRepo userActivityRepository) {
|
||||
this.userActivityRepository = userActivityRepository;
|
||||
}
|
||||
|
||||
public List<UserActivity> getByUserId(String userId) {
|
||||
return userActivityRepository.findByUser_Card_ExtId(Long.parseLong(userId));
|
||||
}
|
||||
}
|
|
@ -1,49 +0,0 @@
|
|||
package icu.samnyan.aqua.sega.chusan.service;
|
||||
|
||||
import icu.samnyan.aqua.sega.chusan.model.Chu3UserCharacterRepo;
|
||||
import icu.samnyan.aqua.sega.chusan.model.userdata.UserCharacter;
|
||||
import icu.samnyan.aqua.sega.chusan.model.userdata.Chu3UserData;
|
||||
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 Chu3UserCharacterRepo userCharacterRepository;
|
||||
|
||||
@Autowired
|
||||
public UserCharacterService(Chu3UserCharacterRepo 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(Chu3UserData user, int characterId) {
|
||||
return userCharacterRepository.findTopByUserAndCharacterIdOrderByIdDesc(user, characterId);
|
||||
}
|
||||
|
||||
}
|
|
@ -1,39 +0,0 @@
|
|||
package icu.samnyan.aqua.sega.chusan.service;
|
||||
|
||||
import icu.samnyan.aqua.sega.chusan.model.Chu3UserChargeRepo;
|
||||
import icu.samnyan.aqua.sega.chusan.model.userdata.UserCharge;
|
||||
import icu.samnyan.aqua.sega.chusan.model.userdata.Chu3UserData;
|
||||
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 Chu3UserChargeRepo userChargeRepository;
|
||||
|
||||
public UserChargeService(Chu3UserChargeRepo 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(Chu3UserData user, int chargeId) {
|
||||
return userChargeRepository.findByUserAndChargeId(user, chargeId);
|
||||
}
|
||||
|
||||
}
|
|
@ -1,44 +0,0 @@
|
|||
package icu.samnyan.aqua.sega.chusan.service;
|
||||
|
||||
import icu.samnyan.aqua.sega.chusan.model.Chu3UserCourseRepo;
|
||||
import icu.samnyan.aqua.sega.chusan.model.userdata.UserCourse;
|
||||
import icu.samnyan.aqua.sega.chusan.model.userdata.Chu3UserData;
|
||||
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 Chu3UserCourseRepo userCourseRepository;
|
||||
|
||||
@Autowired
|
||||
public UserCourseService(Chu3UserCourseRepo 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);
|
||||
}
|
||||
}
|
|
@ -1,28 +0,0 @@
|
|||
package icu.samnyan.aqua.sega.chusan.service;
|
||||
|
||||
import icu.samnyan.aqua.sega.chusan.model.Chu3UserDuelRepo;
|
||||
import icu.samnyan.aqua.sega.chusan.model.userdata.Chu3UserData;
|
||||
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 Chu3UserDuelRepo userDuelRepository;
|
||||
|
||||
@Autowired
|
||||
public UserDuelService(Chu3UserDuelRepo userDuelRepository) {
|
||||
this.userDuelRepository = userDuelRepository;
|
||||
}
|
||||
|
||||
public List<UserDuel> getByUserId(String userId) {
|
||||
return userDuelRepository.findByUser_Card_ExtId(Long.parseLong(userId));
|
||||
}
|
||||
}
|
|
@ -1,34 +0,0 @@
|
|||
package icu.samnyan.aqua.sega.chusan.service;
|
||||
|
||||
import icu.samnyan.aqua.sega.chusan.model.Chu3UserGachaRepo;
|
||||
import icu.samnyan.aqua.sega.chusan.model.userdata.Chu3UserData;
|
||||
import icu.samnyan.aqua.sega.chusan.model.userdata.UserGacha;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Service("ChusanUserGachaService")
|
||||
public class UserGachaService {
|
||||
|
||||
private final Chu3UserGachaRepo userGachaRepository;
|
||||
|
||||
public UserGachaService(Chu3UserGachaRepo userGachaRepository) {
|
||||
this.userGachaRepository = userGachaRepository;
|
||||
}
|
||||
|
||||
public UserGacha save(UserGacha userGacha) {
|
||||
return userGachaRepository.save(userGacha);
|
||||
}
|
||||
|
||||
public List<UserGacha> saveAll(List<UserGacha> newUserGachaList) {
|
||||
return userGachaRepository.saveAll(newUserGachaList);
|
||||
}
|
||||
|
||||
public List<UserGacha> getByUserId(String userId) {
|
||||
return userGachaRepository.findByUser_Card_ExtId(Long.parseLong(userId));
|
||||
}
|
||||
}
|
|
@ -1,35 +0,0 @@
|
|||
package icu.samnyan.aqua.sega.chusan.service;
|
||||
|
||||
import icu.samnyan.aqua.sega.chusan.model.Chu3UserGameOptionRepo;
|
||||
import icu.samnyan.aqua.sega.chusan.model.userdata.Chu3UserData;
|
||||
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 Chu3UserGameOptionRepo userGameOptionRepository;
|
||||
|
||||
@Autowired
|
||||
public UserGameOptionService(Chu3UserGameOptionRepo userGameOptionRepository) {
|
||||
this.userGameOptionRepository = userGameOptionRepository;
|
||||
}
|
||||
|
||||
public UserGameOption save(UserGameOption userGameOption) {
|
||||
return userGameOptionRepository.save(userGameOption);
|
||||
}
|
||||
|
||||
public Optional<UserGameOption> getByUser(Chu3UserData user) {
|
||||
return userGameOptionRepository.findSingleByUser(user);
|
||||
}
|
||||
|
||||
public Optional<UserGameOption> getByUserId(String userId) {
|
||||
return userGameOptionRepository.findSingleByUser_Card_ExtId(Long.parseLong(userId));
|
||||
}
|
||||
}
|
|
@ -1,34 +0,0 @@
|
|||
package icu.samnyan.aqua.sega.chusan.service;
|
||||
|
||||
import icu.samnyan.aqua.sega.chusan.model.Chu3UserGeneralDataRepo;
|
||||
import icu.samnyan.aqua.sega.chusan.model.userdata.Chu3UserData;
|
||||
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 Chu3UserGeneralDataRepo userGeneralDataRepository;
|
||||
|
||||
public UserGeneralDataService(Chu3UserGeneralDataRepo userGeneralDataRepository) {
|
||||
this.userGeneralDataRepository = userGeneralDataRepository;
|
||||
}
|
||||
|
||||
public UserGeneralData save(UserGeneralData userGeneralData) {
|
||||
return userGeneralDataRepository.save(userGeneralData);
|
||||
}
|
||||
|
||||
public Optional<UserGeneralData> getByUserAndKey(Chu3UserData 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);
|
||||
}
|
||||
|
||||
}
|
|
@ -1,35 +0,0 @@
|
|||
package icu.samnyan.aqua.sega.chusan.service;
|
||||
|
||||
import icu.samnyan.aqua.sega.chusan.model.Chu3UserLoginBonusRepo;
|
||||
import icu.samnyan.aqua.sega.chusan.model.userdata.UserLoginBonus;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
@Service("ChusanUserLoginBonusService")
|
||||
public class UserLoginBonusService {
|
||||
private final Chu3UserLoginBonusRepo chusanUserLoginBonusRepository;
|
||||
|
||||
@Autowired
|
||||
public UserLoginBonusService(Chu3UserLoginBonusRepo chusanUserLoginBonusRepository){
|
||||
this.chusanUserLoginBonusRepository = chusanUserLoginBonusRepository;
|
||||
}
|
||||
|
||||
public Optional<UserLoginBonus> getUserLoginBonus(int userId, int preset_id){
|
||||
return this.chusanUserLoginBonusRepository.findLoginBonus(userId, 1, preset_id);
|
||||
}
|
||||
|
||||
public List<UserLoginBonus> getAllUserLoginBonus(int userId){
|
||||
return this.chusanUserLoginBonusRepository.findAllLoginBonus(userId, 1, 0);
|
||||
}
|
||||
|
||||
public void saveUserLoginBonus(UserLoginBonus userLoginBonus){
|
||||
this.chusanUserLoginBonusRepository.save(userLoginBonus);
|
||||
}
|
||||
|
||||
public void saveAll(Iterable<UserLoginBonus> userLoginBonuses) {
|
||||
this.chusanUserLoginBonusRepository.saveAll(userLoginBonuses);
|
||||
}
|
||||
}
|
|
@ -1,28 +0,0 @@
|
|||
package icu.samnyan.aqua.sega.chusan.service;
|
||||
|
||||
import icu.samnyan.aqua.sega.chusan.model.Chu3UserMapRepo;
|
||||
import icu.samnyan.aqua.sega.chusan.model.userdata.Chu3UserData;
|
||||
import icu.samnyan.aqua.sega.chusan.model.userdata.UserMap;
|
||||
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 Chu3UserMapRepo userMapRepository;
|
||||
|
||||
@Autowired
|
||||
public UserMapAreaService(Chu3UserMapRepo userMapRepository) {
|
||||
this.userMapRepository = userMapRepository;
|
||||
}
|
||||
|
||||
public List<UserMap> getByUserId(String userId) {
|
||||
return userMapRepository.findByUser_Card_ExtId(Long.parseLong(userId));
|
||||
}
|
||||
}
|
|
@ -1,38 +0,0 @@
|
|||
package icu.samnyan.aqua.sega.chusan.service;
|
||||
|
||||
import icu.samnyan.aqua.sega.chusan.model.Chu3UserMusicDetailRepo;
|
||||
import icu.samnyan.aqua.sega.chusan.model.userdata.Chu3UserData;
|
||||
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 Chu3UserMusicDetailRepo userMusicDetailRepository;
|
||||
|
||||
@Autowired
|
||||
public UserMusicDetailService(Chu3UserMusicDetailRepo userMusicDetailRepository) {
|
||||
this.userMusicDetailRepository = userMusicDetailRepository;
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
|
@ -1,43 +0,0 @@
|
|||
package icu.samnyan.aqua.sega.chusan.service;
|
||||
|
||||
import icu.samnyan.aqua.sega.chusan.model.Chu3UserPlaylogRepo;
|
||||
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 Chu3UserPlaylogRepo userPlaylogRepository;
|
||||
|
||||
@Autowired
|
||||
public UserPlaylogService(Chu3UserPlaylogRepo userPlaylogRepository) {
|
||||
this.userPlaylogRepository = userPlaylogRepository;
|
||||
}
|
||||
|
||||
public Page<UserPlaylog> getRecentPlays(String userId, Pageable page) {
|
||||
return userPlaylogRepository.findByUserCardExtId(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), 5, page);
|
||||
}
|
||||
|
||||
public List<UserPlaylog> getByUserId(String userId) {
|
||||
return userPlaylogRepository.findByUserCardExtId(Long.parseLong(userId));
|
||||
}
|
||||
|
||||
public List<UserPlaylog> getByUserIdAndMusicIdAndLevel(String userId, int id, int level) {
|
||||
return userPlaylogRepository.findByUser_Card_ExtIdAndMusicIdAndLevel(Long.parseLong(userId), id, level);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue