forked from Cookies_Github_mirror/AquaDX
[-] Remove unused services
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user