表结构

类图 - 图1``` @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

  1. <a name="uLNpm"></a>
  2. # 接口
  3. ![](https://cdn.nlark.com/yuque/__puml/bd15dffd10be9fb31096941e3cb65597.svg#lake_card_v2=eyJ0eXBlIjoicHVtbCIsImNvZGUiOiJAc3RhcnR1bWxcblxuY2xhc3MgUHJpbnRDYXJkQmlsbENvbnRyb2xsZXJ7XG5cdHByaXZhdGUgUHJpbnRNYW5hZ2VyPFByaW50Q2FyZEJpbGxDcmVhdGVWbz4gcHJpbnRPcGVuQmlsbE1hbmFnZXI7XG5cdHByaXZhdGUgUHJpbnRNYW5hZ2VyPFByaW50Q2FyZEJpbGxDcmVhdGVWbz4gcHJpbnRSZWNoYXJnZUJpbGxNYW5hZ2VyO1xuXHRwcml2YXRlIFByaW50TWFuYWdlcjxQcmludENhcmRCaWxsQ3JlYXRlVm8-IHByaW50VGtkQmlsbE1hbmFnZXI7XG59XG5cbmludGVyZmFjZSBQcmludE1hbmFnZXI8VCBleHRlbmRzIFByaW50Q3JlYXRlVm8-IHtcbiAgU3RyaW5nIHByaW50KHByaW50Q3JlYXRlVm8pXG59XG5cbmludGVyZmFjZSBEYXRhTWFza01hbmFnZXI8VCBleHRlbmRzIERhdGFNYXNrQmFzZVZvPntcblx0dm9pZCBkYXRhTWFzayhCaWdJbnRlZ2VyIGlkT3duT3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KFN0cmluZyBjYXJkVHlwZSlcblx0fVx0XG5cdFxuUHJpbnRPcGVuQmlsbGxNYW5hZ2VySW1wbCAqLS0gT3BlbkJpbGxDb250ZXh0XHRcbk9wZW5CaWxsQ29udGV4dCAqLS0gT3BlbkJpbGxGYWN0b3J5XG5PcGVuQmlsbEZhY3RvcnkgKi0tIFBhY2thZ2VDYXJkT3BlbkJpbGxRdWVyeVNlcnZpY2VDYWxsZXJcbk9wZW5CaWxsRmFjdG9yeSAqLS0gVmFsdWVDYXJkT3BlbkJpbGxRdWVyeVNlcnZpY2VDYWxsZXJcblxuUHJpbnRSZWNoYXJnZUJpbGxNYW5hZ2VySW1wbCAqLS0gUmVjaGFyZ2VCaWxsQ29udGV4dFxuUmVjaGFyZ2VCaWxsQ29udGV4dCAqLS0gUmVjaGFyZ2VCaWxsRmFjdG9yeVxuUmVjaGFyZ2VCaWxsRmFjdG9yeSAqLS0gUGFja2FnZUNhcmRSZWNoYXJnZUJpbGxRdWVyeVNlcnZpY2VDYWxsZXJcblJlY2hhcmdlQmlsbEZhY3RvcnkgKi0tIFZhbHVlQ2FyZFJlY2hhcmdlQmlsbFF1ZXJ5U2VydmljZUNhbGxlclxuXHRcblByaW50Q2FyZEJpbGxDb250cm9sbGVyICotLSBQcmludE1hbmFnZXJcbkBlbmR1bWwiLCJ1cmwiOiJodHRwczovL2Nkbi5ubGFyay5jb20veXVxdWUvX19wdW1sL2JkMTVkZmZkMTBiZTlmYjMxMDk2OTQxZTNjYjY1NTk3LnN2ZyIsImlkIjoiUDV0RTUiLCJtYXJnaW4iOnsidG9wIjp0cnVlLCJib3R0b20iOnRydWV9LCJjYXJkIjoiZGlhZ3JhbSJ9)```java
  4. @startuml
  5. class PrintCardBillController{
  6. private PrintManager<PrintCardBillCreateVo> printOpenBillManager;
  7. private PrintManager<PrintCardBillCreateVo> printRechargeBillManager;
  8. private PrintManager<PrintCardBillCreateVo> printTkdBillManager;
  9. }
  10. interface PrintManager<T extends PrintCreateVo> {
  11. String print(printCreateVo)
  12. }
  13. interface DataMaskManager<T extends DataMaskBaseVo>{
  14. void dataMask(BigInteger idOwnOrg, T maskVo);
  15. }
  16. abstract class AbstractPrintManager<T extends PrintCreateVo,K extends DataMaskBaseVo> implements PrintManager,DataMaskManager{
  17. boolean checkTemplateId(printCreateVo)
  18. abstract Map getPrintParam(printCreateVo)
  19. abstract Map printDataMask(map)
  20. String createPrintPdf(printCreateVo,map)
  21. final String print(printCreateVo)
  22. }
  23. abstract class AbstractPrintCardBillManager<T extends PrintCardBillCreateVo, K extends PrintCardBillDataMaskVo, R extends PrintCardBillBaseVo> extends AbstractPrintManager{
  24. Map getPrintParam(PrintCardBillBaseVo)
  25. void dataMask(BigInteger idOwnOrg, K maskVo)
  26. void printDataMask(map)
  27. T fillCardBillInfo(printCreateVo)
  28. abstract R queryBillInfo(T printCardBillBaseVo)
  29. R fillCardEntityInfo(R printCardBillBaseVo, CardInfoDTO cardInfoDTO) {
  30. }
  31. class PrintOpenBilllManagerImpl extends AbstractPrintCardBillManager{
  32. private OpenBillContext openBillContext;
  33. PrintOpenBillVo queryBillInfo(PrintCardBillCreateVo printCardBillBaseVo)
  34. PrintOpenBillVo fillCardEntityInfo(PrintOpenBillVo printCardBillBaseVo, CardInfoDTO cardInfoDTO)
  35. }
  36. class PrintRechargeBillManagerImpl extends AbstractPrintCardBillManager{
  37. private RechargeBillContext rechargeBillContext;
  38. PrintRechargeBillVo queryBillInfo(PrintCardBillCreateVo printCardBillBaseVo)
  39. }
  40. class PrintCardTKDBillManagerImpl extends AbstractPrintCardBillManager{
  41. }
  42. class PackageCardOpenBillQueryServiceCaller{
  43. PackageCardOpenBillFullInfo getById(CardBillGetByIdQuery cardBillGetByIdQuery)
  44. }
  45. class PackageCardRechargeBillQueryServiceCaller{
  46. PackageCardRechargeBillFullInfo getById(CardBillGetByIdQuery cardBillGetByIdQuery)
  47. }
  48. class ValueCardOpenBillQueryServiceCaller{
  49. ValueCardOpenBillFullInfo getById(CardBillGetByIdQuery cardBillGetByIdQuery)
  50. }
  51. class ValueCardRechargeBillQueryServiceCaller{
  52. ValueCardRechargeBillFullInfo getById(CardBillGetByIdQuery cardBillGetByIdQuery)
  53. }
  54. class PrintCreateVo{
  55. private bigint idOwnOrg;
  56. private int templateId;
  57. private bigint id;
  58. }
  59. class PrintCardBillCreateVo extends PrintCreateVo{
  60. private String cardType;
  61. }
  62. class PrintOpenBillVo extends PrintCardBillBaseVo{}
  63. class PrintValueCardOpenBillVo extends PrintOpenBillVo{
  64. private BigDecimal cardAmount;
  65. }
  66. class PrintPackageCardOpenBillVo extends PrintOpenBillVo{
  67. private List<PrintPackageCardOpenBillPartVo> partList;
  68. private List<PrintPackageCardOpenBillServiceVo> serviceList;
  69. private List<PrintPackageCardOpenBillPackVo> packageList;
  70. }
  71. class PrintRechargeBillVo extends PrintCardBillBaseVo{}
  72. class PrintValueRechargeBillVo extends PrintRechargeBillVo{
  73. private BigDecimal cardAmount;
  74. }
  75. class PrintPackageCardRechargeBillVo extends PrintRechargeBillVo{
  76. private List<PrintPackageCardRechargeBillPartVo> partList;
  77. private List<PrintPackageCardRechargeBillServiceVo> serviceList;
  78. private List<PrintPackageCardRechargeBillPackVo> packageList;
  79. }
  80. class PrintCardTKDBillVo extends PrintCardBillBaseVo{}
  81. class RechargeBillContext{
  82. private RechargeBillFactory rechargeBillFactory;
  83. PrintCardBillBaseVo queryCardBillBaseVo(PrintCardBillCreateVo printCardBillBaseVo)
  84. }
  85. class RechargeBillFactory {
  86. private PrintPackageCardRechargeBillQueryApiService printPackageCardRechargeBillQueryApiService;
  87. private PrintValueCardRechargeBillQueryApiService printValueCardRechargeBillQueryApiService;
  88. PrintCardBillReadService queryApiService(String cardType)
  89. }
  90. class OpenBillContext{
  91. private OpenBillFactory openBillFactory;
  92. PrintCardBillBaseVo queryCardBillBaseVo(PrintCardBillCreateVo printCardBillBaseVo)
  93. }
  94. class OpenBillFactory{
  95. private PrintPackageCardOpenBillQueryApiService printPackageCardOpenBillQueryApiService;
  96. private PrintValueCardOpenBillQueryApiService printValueCardOpenBillQueryApiService;
  97. PrintCardBillReadService queryApiService(String cardType)
  98. }
  99. PrintOpenBilllManagerImpl *-- OpenBillContext
  100. OpenBillContext *-- OpenBillFactory
  101. OpenBillFactory *-- PackageCardOpenBillQueryServiceCaller
  102. OpenBillFactory *-- ValueCardOpenBillQueryServiceCaller
  103. PrintRechargeBillManagerImpl *-- RechargeBillContext
  104. RechargeBillContext *-- RechargeBillFactory
  105. RechargeBillFactory *-- PackageCardRechargeBillQueryServiceCaller
  106. RechargeBillFactory *-- ValueCardRechargeBillQueryServiceCaller
  107. PrintCardBillController *-- PrintManager
  108. @enduml