createcreditcardaccount.java
来自「spring的例子 很实用的」· Java 代码 · 共 62 行
JAVA
62 行
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 + =
减小字号Ctrl + -
显示快捷键?