📄 createcreditcardaccount.java
字号:
package springexample.creditcardaccount;
import springexample.creditlinking.CreditLinkingInterface;
import springexample.creditrating.CreditRatingInterface;
import springexample.domain.ICustomer;
import springexample.email.EmailInterface;
public class CreateCreditCardAccount implements CreateCreditCardAccountInterface {
private CreditLinkingInterface creditLinkingInterface;
private CreditRatingInterface creditRatingInterface;
private EmailInterface emailInterface;
public CreditLinkingInterface getCreditLinkingInterface() {
return creditLinkingInterface;
}
public void setCreditLinkingInterface(
CreditLinkingInterface creditLinkingInterface) {
this.creditLinkingInterface = creditLinkingInterface;
}
public CreditRatingInterface getCreditRatingInterface() {
return creditRatingInterface;
}
public void setCreditRatingInterface(CreditRatingInterface creditRatingInterface) {
this.creditRatingInterface = creditRatingInterface;
}
public EmailInterface getEmailInterface() {
return emailInterface;
}
public void setEmailInterface(EmailInterface emailInterface) {
this.emailInterface = emailInterface;
}
public void createCreditCardAccount(ICustomer icustomer) throws Exception{
boolean crediRating = getCreditRatingInterface().getUserCreditHistoryInformation(icustomer);
icustomer.setCreditRating(crediRating);
//Good Rating
if(crediRating){
getCreditLinkingInterface().linkCreditBankAccount(icustomer);
}
getEmailInterface().sendEmail(icustomer);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -