forked from Cookies_Github_mirror/AquaDX
[aimedb] Change extId type to integer
This commit is contained in:
@@ -35,6 +35,6 @@ public class UserActivityService {
|
||||
}
|
||||
|
||||
public List<UserActivity> getAllByUserIdAndKind(String userId, String kind) {
|
||||
return userActivityRepository.findAllByUser_Card_ExtIdAndKindOrderBySortNumberDesc(Long.parseLong(userId), Integer.parseInt(kind));
|
||||
return userActivityRepository.findAllByUser_Card_ExtIdAndKindOrderBySortNumberDesc(Integer.parseInt(userId), Integer.parseInt(kind));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,6 +43,6 @@ public class UserCharacterService {
|
||||
|
||||
public Page<UserCharacter> getByUser(String userId, int pageNumber, int maxCount) {
|
||||
Pageable pageable = PageRequest.of(pageNumber, maxCount);
|
||||
return userCharacterRepository.findByUser_Card_ExtId(Long.parseLong(userId), pageable);
|
||||
return userCharacterRepository.findByUser_Card_ExtId(Integer.parseInt(userId), pageable);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ public class UserChargeService {
|
||||
}
|
||||
|
||||
public List<UserCharge> getByUserId(String userId) {
|
||||
return userChargeRepository.findByUser_Card_ExtId(Long.parseLong(userId));
|
||||
return userChargeRepository.findByUser_Card_ExtId(Integer.parseInt(userId));
|
||||
}
|
||||
|
||||
public Optional<UserCharge> getByUserAndChargeId(UserData user, String chargeId) {
|
||||
|
||||
@@ -38,11 +38,11 @@ public class UserCourseService {
|
||||
}
|
||||
|
||||
public List<UserCourse> getByUser(String userId) {
|
||||
return userCourseRepository.findByUser_Card_ExtId(Long.parseLong(userId));
|
||||
return userCourseRepository.findByUser_Card_ExtId(Integer.parseInt(userId));
|
||||
}
|
||||
|
||||
public Page<UserCourse> getByUser(String userId, int pageNum, int maxCount) {
|
||||
Pageable page = PageRequest.of(pageNum, maxCount);
|
||||
return userCourseRepository.findByUser_Card_ExtId(Long.parseLong(userId), page);
|
||||
return userCourseRepository.findByUser_Card_ExtId(Integer.parseInt(userId), page);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,6 +30,6 @@ public class UserDataExService {
|
||||
}
|
||||
|
||||
public Optional<UserDataEx> getUserByExtId(String userId) {
|
||||
return userDataExRepository.findByUser_Card_ExtId(Long.parseLong(userId));
|
||||
return userDataExRepository.findByUser_Card_ExtId(Integer.parseInt(userId));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ public class UserDataService {
|
||||
}
|
||||
|
||||
public Optional<UserData> getUserByExtId(String aimeId) {
|
||||
return userDataRepository.findByCard_ExtId(Long.parseLong(aimeId));
|
||||
return userDataRepository.findByCard_ExtId(Integer.parseInt(aimeId));
|
||||
}
|
||||
|
||||
public String updateLoginTime(UserData userData) {
|
||||
|
||||
@@ -35,7 +35,7 @@ public class UserDuelService {
|
||||
}
|
||||
|
||||
public List<UserDuel> getByUser(String userId) {
|
||||
return userDuelRepository.findByUser_Card_ExtId(Long.parseLong(userId));
|
||||
return userDuelRepository.findByUser_Card_ExtId(Integer.parseInt(userId));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -30,6 +30,6 @@ public class UserGameOptionExService {
|
||||
}
|
||||
|
||||
public Optional<UserGameOptionEx> getByUserId(String userId) {
|
||||
return userGameOptionExRepository.findByUser_Card_ExtId(Long.parseLong(userId));
|
||||
return userGameOptionExRepository.findByUser_Card_ExtId(Integer.parseInt(userId));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ public class UserGameOptionService {
|
||||
}
|
||||
|
||||
public Optional<UserGameOption> getByUserId(String userId) {
|
||||
return userGameOptionRepository.findByUser_Card_ExtId(Long.parseLong(userId));
|
||||
return userGameOptionRepository.findByUser_Card_ExtId(Integer.parseInt(userId));
|
||||
}
|
||||
|
||||
public Optional<UserGameOption> getByUser(UserData user) {
|
||||
|
||||
@@ -39,6 +39,6 @@ public class UserItemService {
|
||||
|
||||
public Page<UserItem> getByUserAndItemKind(String userId, int kind, int pageNumber, int maxCount) {
|
||||
Pageable page = PageRequest.of(pageNumber, maxCount);
|
||||
return userItemRepository.findAllByUser_Card_ExtIdAndItemKind(Long.parseLong(userId), kind, page);
|
||||
return userItemRepository.findAllByUser_Card_ExtIdAndItemKind(Integer.parseInt(userId), kind, page);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ public class UserMapService {
|
||||
}
|
||||
|
||||
public List<UserMap> getByUser(String userId) {
|
||||
return userMapRepository.findAllByUser_Card_ExtId(Long.parseLong(userId));
|
||||
return userMapRepository.findAllByUser_Card_ExtId(Integer.parseInt(userId));
|
||||
}
|
||||
|
||||
public Optional<UserMap> getByUserAndMapId(UserData user, String mapId) {
|
||||
|
||||
@@ -38,11 +38,11 @@ public class UserMusicDetailService {
|
||||
}
|
||||
|
||||
public List<UserMusicDetail> getByUser(String userId) {
|
||||
return userMusicDetailRepository.findByUser_Card_ExtId(Long.parseLong(userId));
|
||||
return userMusicDetailRepository.findByUser_Card_ExtId(Integer.parseInt(userId));
|
||||
}
|
||||
|
||||
public Page<UserMusicDetail> getByUser(String userId, int pageNum, int maxCount) {
|
||||
Pageable page = PageRequest.of(pageNum, maxCount);
|
||||
return userMusicDetailRepository.findByUser_Card_ExtId(Long.parseLong(userId), page);
|
||||
return userMusicDetailRepository.findByUser_Card_ExtId(Integer.parseInt(userId), page);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,11 +33,11 @@ public class UserPlaylogService {
|
||||
|
||||
public List<UserPlaylog> getRecent30Plays(String userId) {
|
||||
Pageable page = PageRequest.of(0, 30, Sort.by(Sort.Direction.DESC, "userPlayDate"));
|
||||
return userPlaylogRepository.findByUser_Card_ExtIdAndLevelNot(Long.parseLong(userId), 4, page);
|
||||
return userPlaylogRepository.findByUser_Card_ExtIdAndLevelNot(Integer.parseInt(userId), 4, page);
|
||||
}
|
||||
|
||||
public List<UserPlaylog> getRecentPlays(String userId) {
|
||||
Pageable page = PageRequest.of(0, 50, Sort.by(Sort.Direction.DESC, "userPlayDate"));
|
||||
return userPlaylogRepository.findByUser_Card_ExtId(Long.parseLong(userId), page);
|
||||
return userPlaylogRepository.findByUser_Card_ExtId(Integer.parseInt(userId), page);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user