[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

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

View File

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

View File

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