package com.ecep.contract.cloud.u8.ctx;

import static com.ecep.contract.SpringApp.getBean;

import com.ecep.contract.MessageHolder;
import com.ecep.contract.ds.company.service.CompanyBankAccountService;
import com.ecep.contract.model.Company;

import lombok.Setter;

public class CompanyBankAccountCtx extends AbstractYongYouU8Ctx {
    @Setter
    private CompanyBankAccountService companyBankAccountService;

    CompanyBankAccountService getCompanyBankAccountService() {
        if (companyBankAccountService == null) {
            companyBankAccountService = getBean(CompanyBankAccountService.class);
        }
        return companyBankAccountService;
    }

    public void updateBankAccount(Company company, String bank, String bankAccount, MessageHolder holder) {
        getCompanyBankAccountService().updateBankAccount(company, bank, bankAccount, holder);
    }
}
