forked from Cookies_Github_mirror/AquaDX
[aimedb] Change extId type to integer
This commit is contained in:
@@ -12,7 +12,7 @@ import java.util.Optional;
|
||||
@Repository("SegaCardRepository")
|
||||
public interface CardRepository extends JpaRepository<Card, Long> {
|
||||
|
||||
Optional<Card> findByExtId(long extId);
|
||||
Optional<Card> findByExtId(int extId);
|
||||
|
||||
Optional<Card> findByLuid(String luid);
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ public class Card implements Serializable {
|
||||
|
||||
// A external id
|
||||
@Column(name = "ext_id", unique = true)
|
||||
private long extId;
|
||||
private Integer extId;
|
||||
|
||||
// Access Code
|
||||
@Column(unique = true)
|
||||
|
||||
@@ -21,6 +21,6 @@ public class CardService {
|
||||
}
|
||||
|
||||
public Optional<Card> getCardByExtId(String extId) {
|
||||
return cardRepository.findByExtId(Long.parseLong(extId));
|
||||
return cardRepository.findByExtId(Integer.parseInt(extId));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user