[aimedb] Change extId type to integer

This commit is contained in:
samnyan
2020-01-31 11:27:21 +08:00
parent 95512aa843
commit 955e5727d5
26 changed files with 35 additions and 31 deletions

View File

@@ -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));
}
}

View File

@@ -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);
}
}

View File

@@ -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) {

View File

@@ -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);
}
}

View File

@@ -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));
}
}

View File

@@ -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) {

View File

@@ -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));
}
}

View File

@@ -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));
}
}

View File

@@ -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) {

View File

@@ -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);
}
}

View File

@@ -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) {

View File

@@ -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);
}
}

View File

@@ -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);
}
}