表结构
``` @startuml
class precision_marketing_batch_target_customer {}
precision_marketing_batch “1” — “many” precision_marketing_batch_statistics precision_marketing_batch “1” — “many” precision_marketing_batch_content precision_marketing_batch_content “1” — “1” precision_marketing_sms_template precision_marketing_sms_template “1” — “1” msg_template precision_marketing_batch_content “1” *— “1” coupon_template
precision_marketing_batch “1” — “many” precision_marketing_batch_detail precision_marketing_batch_detail “1” — “1” precision_marketing_batch_detail_ext_sms precision_marketing_batch_detail “1” — “1” precision_marketing_batch_detail_ext_coupon precision_marketing_batch_detail “1” — “many” precision_marketing_batch_detail_content precision_marketing_batch_detail_content “1” — “1” coupon precision_marketing_batch_detail_content “1” — “1” msg_send_detail @enduml
<a name="uLNpm"></a>
# 接口
![](https://cdn.nlark.com/yuque/__puml/bd15dffd10be9fb31096941e3cb65597.svg#lake_card_v2=eyJ0eXBlIjoicHVtbCIsImNvZGUiOiJAc3RhcnR1bWxcblxuY2xhc3MgUHJpbnRDYXJkQmlsbENvbnRyb2xsZXJ7XG5cdHByaXZhdGUgUHJpbnRNYW5hZ2VyPFByaW50Q2FyZEJpbGxDcmVhdGVWbz4gcHJpbnRPcGVuQmlsbE1hbmFnZXI7XG5cdHByaXZhdGUgUHJpbnRNYW5hZ2VyPFByaW50Q2FyZEJpbGxDcmVhdGVWbz4gcHJpbnRSZWNoYXJnZUJpbGxNYW5hZ2VyO1xuXHRwcml2YXRlIFByaW50TWFuYWdlcjxQcmludENhcmRCaWxsQ3JlYXRlVm8-IHByaW50VGtkQmlsbE1hbmFnZXI7XG59XG5cbmludGVyZmFjZSBQcmludE1hbmFnZXI8VCBleHRlbmRzIFByaW50Q3JlYXRlVm8-IHtcbiAgU3RyaW5nIHByaW50KHByaW50Q3JlYXRlVm8pXG59XG5cbmludGVyZmFjZSBEYXRhTWFza01hbmFnZXI8VCBleHRlbmRzIERhdGFNYXNrQmFzZVZvPntcblx0dm9pZCBkYXRhTWFzayhCaWdJbnRlZ2VyIGlkT3duT3JnLCBUIG1hc2tWbyk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lwZSlcblx0fVx0XG5cdFxuUHJpbnRPcGVuQmlsbGxNYW5hZ2VySW1wbCAqLS0gT3BlbkJpbGxDb250ZXh0XHRcbk9wZW5CaWxsQ29udGV4dCAqLS0gT3BlbkJpbGxGYWN0b3J5XG5PcGVuQmlsbEZhY3RvcnkgKi0tIFBhY2thZ2VDYXJkT3BlbkJpbGxRdWVyeVNlcnZpY2VDYWxsZXJcbk9wZW5CaWxsRmFjdG9yeSAqLS0gVmFsdWVDYXJkT3BlbkJpbGxRdWVyeVNlcnZpY2VDYWxsZXJcblxuUHJpbnRSZWNoYXJnZUJpbGxNYW5hZ2VySW1wbCAqLS0gUmVjaGFyZ2VCaWxsQ29udGV4dFxuUmVjaGFyZ2VCaWxsQ29udGV4dCAqLS0gUmVjaGFyZ2VCaWxsRmFjdG9yeVxuUmVjaGFyZ2VCaWxsRmFjdG9yeSAqLS0gUGFja2FnZUNhcmRSZWNoYXJnZUJpbGxRdWVyeVNlcnZpY2VDYWxsZXJcblJlY2hhcmdlQmlsbEZhY3RvcnkgKi0tIFZhbHVlQ2FyZFJlY2hhcmdlQmlsbFF1ZXJ5U2VydmljZUNhbGxlclxuXHRcblByaW50Q2FyZEJpbGxDb250cm9sbGVyICotLSBQcmludE1hbmFnZXJcbkBlbmR1bWwiLCJ1cmwiOiJodHRwczovL2Nkbi5ubGFyay5jb20veXVxdWUvX19wdW1sL2JkMTVkZmZkMTBiZTlmYjMxMDk2OTQxZTNjYjY1NTk3LnN2ZyIsImlkIjoiUDV0RTUiLCJtYXJnaW4iOnsidG9wIjp0cnVlLCJib3R0b20iOnRydWV9LCJjYXJkIjoiZGlhZ3JhbSJ9)```java
@startuml
class PrintCardBillController{
private PrintManager<PrintCardBillCreateVo> printOpenBillManager;
private PrintManager<PrintCardBillCreateVo> printRechargeBillManager;
private PrintManager<PrintCardBillCreateVo> printTkdBillManager;
}
interface PrintManager<T extends PrintCreateVo> {
String print(printCreateVo)
}
interface DataMaskManager<T extends DataMaskBaseVo>{
void dataMask(BigInteger idOwnOrg, T maskVo);
}
abstract class AbstractPrintManager<T extends PrintCreateVo,K extends DataMaskBaseVo> implements PrintManager,DataMaskManager{
boolean checkTemplateId(printCreateVo)
abstract Map getPrintParam(printCreateVo)
abstract Map printDataMask(map)
String createPrintPdf(printCreateVo,map)
final String print(printCreateVo)
}
abstract class AbstractPrintCardBillManager<T extends PrintCardBillCreateVo, K extends PrintCardBillDataMaskVo, R extends PrintCardBillBaseVo> extends AbstractPrintManager{
Map getPrintParam(PrintCardBillBaseVo)
void dataMask(BigInteger idOwnOrg, K maskVo)
void printDataMask(map)
T fillCardBillInfo(printCreateVo)
abstract R queryBillInfo(T printCardBillBaseVo)
R fillCardEntityInfo(R printCardBillBaseVo, CardInfoDTO cardInfoDTO) {
}
class PrintOpenBilllManagerImpl extends AbstractPrintCardBillManager{
private OpenBillContext openBillContext;
PrintOpenBillVo queryBillInfo(PrintCardBillCreateVo printCardBillBaseVo)
PrintOpenBillVo fillCardEntityInfo(PrintOpenBillVo printCardBillBaseVo, CardInfoDTO cardInfoDTO)
}
class PrintRechargeBillManagerImpl extends AbstractPrintCardBillManager{
private RechargeBillContext rechargeBillContext;
PrintRechargeBillVo queryBillInfo(PrintCardBillCreateVo printCardBillBaseVo)
}
class PrintCardTKDBillManagerImpl extends AbstractPrintCardBillManager{
}
class PackageCardOpenBillQueryServiceCaller{
PackageCardOpenBillFullInfo getById(CardBillGetByIdQuery cardBillGetByIdQuery)
}
class PackageCardRechargeBillQueryServiceCaller{
PackageCardRechargeBillFullInfo getById(CardBillGetByIdQuery cardBillGetByIdQuery)
}
class ValueCardOpenBillQueryServiceCaller{
ValueCardOpenBillFullInfo getById(CardBillGetByIdQuery cardBillGetByIdQuery)
}
class ValueCardRechargeBillQueryServiceCaller{
ValueCardRechargeBillFullInfo getById(CardBillGetByIdQuery cardBillGetByIdQuery)
}
class PrintCreateVo{
private bigint idOwnOrg;
private int templateId;
private bigint id;
}
class PrintCardBillCreateVo extends PrintCreateVo{
private String cardType;
}
class PrintOpenBillVo extends PrintCardBillBaseVo{}
class PrintValueCardOpenBillVo extends PrintOpenBillVo{
private BigDecimal cardAmount;
}
class PrintPackageCardOpenBillVo extends PrintOpenBillVo{
private List<PrintPackageCardOpenBillPartVo> partList;
private List<PrintPackageCardOpenBillServiceVo> serviceList;
private List<PrintPackageCardOpenBillPackVo> packageList;
}
class PrintRechargeBillVo extends PrintCardBillBaseVo{}
class PrintValueRechargeBillVo extends PrintRechargeBillVo{
private BigDecimal cardAmount;
}
class PrintPackageCardRechargeBillVo extends PrintRechargeBillVo{
private List<PrintPackageCardRechargeBillPartVo> partList;
private List<PrintPackageCardRechargeBillServiceVo> serviceList;
private List<PrintPackageCardRechargeBillPackVo> packageList;
}
class PrintCardTKDBillVo extends PrintCardBillBaseVo{}
class RechargeBillContext{
private RechargeBillFactory rechargeBillFactory;
PrintCardBillBaseVo queryCardBillBaseVo(PrintCardBillCreateVo printCardBillBaseVo)
}
class RechargeBillFactory {
private PrintPackageCardRechargeBillQueryApiService printPackageCardRechargeBillQueryApiService;
private PrintValueCardRechargeBillQueryApiService printValueCardRechargeBillQueryApiService;
PrintCardBillReadService queryApiService(String cardType)
}
class OpenBillContext{
private OpenBillFactory openBillFactory;
PrintCardBillBaseVo queryCardBillBaseVo(PrintCardBillCreateVo printCardBillBaseVo)
}
class OpenBillFactory{
private PrintPackageCardOpenBillQueryApiService printPackageCardOpenBillQueryApiService;
private PrintValueCardOpenBillQueryApiService printValueCardOpenBillQueryApiService;
PrintCardBillReadService queryApiService(String cardType)
}
PrintOpenBilllManagerImpl *-- OpenBillContext
OpenBillContext *-- OpenBillFactory
OpenBillFactory *-- PackageCardOpenBillQueryServiceCaller
OpenBillFactory *-- ValueCardOpenBillQueryServiceCaller
PrintRechargeBillManagerImpl *-- RechargeBillContext
RechargeBillContext *-- RechargeBillFactory
RechargeBillFactory *-- PackageCardRechargeBillQueryServiceCaller
RechargeBillFactory *-- ValueCardRechargeBillQueryServiceCaller
PrintCardBillController *-- PrintManager
@enduml