forked from Cookies_Github_mirror/AquaDX
Initial Commit
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
package icu.samnyan.aqua.sega.general.service;
|
||||
|
||||
import icu.samnyan.aqua.sega.general.dao.CardRepository;
|
||||
import icu.samnyan.aqua.sega.general.model.Card;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Service
|
||||
public class CardService {
|
||||
|
||||
private final CardRepository cardRepository;
|
||||
|
||||
@Autowired
|
||||
public CardService(CardRepository cardRepository) {
|
||||
this.cardRepository = cardRepository;
|
||||
}
|
||||
|
||||
public Optional<Card> getCardByExtId(String extId) {
|
||||
return cardRepository.findByExtId(Long.parseLong(extId));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user