From 93e5eb0a01d2dae5e91b7d7f5fd0c783103924ae Mon Sep 17 00:00:00 2001 From: luoyang Date: Tue, 2 Apr 2019 16:52:45 +0800 Subject: [PATCH] =?UTF-8?q?add=20=E6=B7=BB=E5=8A=A0CBBank=E4=B8=8B?= =?UTF-8?q?=E8=BD=BD=E6=A8=A1=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../manage/merchants/core/ClientManager.java | 2 + .../core/impls/ClientManagerImpl.java | 30 ++ .../web/PartnerManageController.java | 9 + .../merchants/web/PartnerViewController.java | 9 + src/main/ui/index.html | 10 +- .../templates/client_payment_info.html | 6 +- .../partner/templates/partner_detail.html | 488 ------------------ .../partner/templates/partner_edit.html | 484 ----------------- .../templates/partner_payment_info.html | 8 +- 9 files changed, 67 insertions(+), 979 deletions(-) diff --git a/src/main/java/au/com/royalpay/payment/manage/merchants/core/ClientManager.java b/src/main/java/au/com/royalpay/payment/manage/merchants/core/ClientManager.java index 5b43ce2a6..4c6106903 100644 --- a/src/main/java/au/com/royalpay/payment/manage/merchants/core/ClientManager.java +++ b/src/main/java/au/com/royalpay/payment/manage/merchants/core/ClientManager.java @@ -190,6 +190,8 @@ public interface ClientManager { void writeAggregateQrCodeBoard(JSONObject manager, String clientMoniker, QRCodeConfig config, OutputStream ous,String plantform); + void writeCBBankAggregateQrCodeBoard(JSONObject manager, String clientMoniker, OutputStream ous,String plantform); + void writeQrCodeBoard(JSONObject manager, String clientMoniker, QRCodeConfig config, OutputStream ous,String plantform); void writePoster(JSONObject manager, String clientMoniker, OutputStream ous); diff --git a/src/main/java/au/com/royalpay/payment/manage/merchants/core/impls/ClientManagerImpl.java b/src/main/java/au/com/royalpay/payment/manage/merchants/core/impls/ClientManagerImpl.java index 0dd67b4b3..a628c15ff 100644 --- a/src/main/java/au/com/royalpay/payment/manage/merchants/core/impls/ClientManagerImpl.java +++ b/src/main/java/au/com/royalpay/payment/manage/merchants/core/impls/ClientManagerImpl.java @@ -2020,6 +2020,36 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid } } + @Override + public void writeCBBankAggregateQrCodeBoard(JSONObject manager, String clientMoniker, OutputStream ous, String plantform) { + JSONObject client = clientDetail(manager, clientMoniker); + try { + JSONObject qrboardConfig = new JSONObject(); + qrboardConfig.put("src", PlatformEnvironment.getEnv().concatUrl("/static/images/aggregate_qr_board.png")); + qrboardConfig.put("type", "royalpay"); + qrboardConfig.put("x", "835"); + qrboardConfig.put("y", "1290"); + qrboardConfig.put("size", "770"); + qrboardConfig.put("fontsize", "50"); + qrboardConfig.put("fontx", "1235"); + qrboardConfig.put("fonty", "2051"); + qrboardConfig.put("snsize", "50"); + qrboardConfig.put("snx", "1215"); + qrboardConfig.put("sny", "1320"); + qrboardConfig.put("brandx", "930"); + qrboardConfig.put("brandy", "1060"); + qrboardConfig.put("brandw", "600"); + qrboardConfig.put("brandh", "200"); + String type = qrboardConfig.getString("type"); + // QRBoard board = QRBoardProvider.getQRBoard(type, qrboardConfig, client, + // config,mongoTemplate,manager,plantform); + QRBoard board = QRBoardProvider.getQRBoard(type, qrboardConfig, client, new QRCodeConfig()); + board.drawCBBankBoardImage(ous); + } catch (Exception e) { + throw new ServerErrorException("QR board config not set for current organize", e); + } + } + @Override public void writeQrCodeBoard(JSONObject manager, String clientMoniker, QRCodeConfig config, OutputStream ous, String plantform) { JSONObject client = clientDetail(manager, clientMoniker); diff --git a/src/main/java/au/com/royalpay/payment/manage/merchants/web/PartnerManageController.java b/src/main/java/au/com/royalpay/payment/manage/merchants/web/PartnerManageController.java index 5da10fe4e..4bf424235 100644 --- a/src/main/java/au/com/royalpay/payment/manage/merchants/web/PartnerManageController.java +++ b/src/main/java/au/com/royalpay/payment/manage/merchants/web/PartnerManageController.java @@ -107,6 +107,15 @@ public class PartnerManageController { clientManager.writeAggregateQrCodeBoard(manager, clientMoniker, config, ous,"PC"); } + @ManagerMapping(value = "/{clientMoniker}/qrcode_board/CBBankAggregate", method = RequestMethod.GET) + public void getCBBankAggregateQRCodeBoardImage(@PathVariable String clientMoniker, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager, + HttpServletResponse response) throws IOException { + response.setContentType("application/octet-stream;"); + response.addHeader("Content-Disposition", "attachment; filename=qr_board.jpg"); + OutputStream ous = response.getOutputStream(); + clientManager.writeCBBankAggregateQrCodeBoard(manager, clientMoniker, ous,"PC"); + } + @ManagerMapping(value = "/{clientMoniker}/poster", method = RequestMethod.GET) public void getPosterImage(@PathVariable String clientMoniker, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager, HttpServletResponse response) throws IOException { response.setContentType("application/octet-stream;"); diff --git a/src/main/java/au/com/royalpay/payment/manage/merchants/web/PartnerViewController.java b/src/main/java/au/com/royalpay/payment/manage/merchants/web/PartnerViewController.java index 3c232773b..25e7ae85d 100644 --- a/src/main/java/au/com/royalpay/payment/manage/merchants/web/PartnerViewController.java +++ b/src/main/java/au/com/royalpay/payment/manage/merchants/web/PartnerViewController.java @@ -104,6 +104,15 @@ public class PartnerViewController { clientManager.writeAggregateQrCodeBoard(null, account.getString("client_moniker"), config, ous,"pc"); } + @PartnerMapping(value = "/qrcode_board/CBBankAggregate", method = RequestMethod.GET) + public void getCBBankAggregateQRCodeBoardImage(@ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject account, + HttpServletResponse response) throws IOException { + response.setContentType("application/octet-stream"); + response.addHeader("Content-Disposition", "attachment; filename=qr_board.jpg"); + OutputStream ous = response.getOutputStream(); + clientManager.writeCBBankAggregateQrCodeBoard(null, account.getString("client_moniker"), ous,"pc"); + } + @PartnerMapping(value = "/poster", method = RequestMethod.GET) public void getPosterImage(@ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject account, HttpServletResponse response) throws IOException { response.setContentType("application/octet-stream;"); diff --git a/src/main/ui/index.html b/src/main/ui/index.html index 57d546216..cf0a6eaa8 100644 --- a/src/main/ui/index.html +++ b/src/main/ui/index.html @@ -998,11 +998,11 @@ margin-bottom: 10%;"/> Client Details -
  • - - Marketing Materials - -
  • + + + + +
  • Accounts diff --git a/src/main/ui/static/payment/partner/templates/client_payment_info.html b/src/main/ui/static/payment/partner/templates/client_payment_info.html index 9b305e229..1eff787e8 100644 --- a/src/main/ui/static/payment/partner/templates/client_payment_info.html +++ b/src/main/ui/static/payment/partner/templates/client_payment_info.html @@ -233,7 +233,11 @@
    - +

    + Download Aggregate QR Board Image (聚合支付水晶立牌:支持支付宝、微信、翼支付) + +

    diff --git a/src/main/ui/static/payment/partner/templates/partner_detail.html b/src/main/ui/static/payment/partner/templates/partner_detail.html index fa8e2f279..32dc67aec 100644 --- a/src/main/ui/static/payment/partner/templates/partner_detail.html +++ b/src/main/ui/static/payment/partner/templates/partner_detail.html @@ -593,494 +593,6 @@ - -
    -
    Alipay Information  (Optional) -
    -
    -
    -
    - -
    - -

    - eg:Monday-Friday 09:00-20:00,Saturday-Sunday 10:00-22:00

    -
    -
    -
    - -
    - -
    -
    -
    - -
    - -
    -
    -
    - -
    - -

    eg:https://www.baidu.com

    -
    -
    -
    -
    -
    - -
    -
    Contact Information
    -
    -
    -
    - -
    - -
    -

    Required - Field

    -

    Less - Than 50 - Characters(including symbols and spaces)

    -
    -
    -
    -
    - - - -
    -
    -
    +
    - -
    - -
    -

    Required - Field

    -

    Less - Than 20 Characters

    -
    -
    -
    - -
    -

    Less - Than 2 Characters

    -
    -
    -
    - -
    -

    Required - Field

    -

    Less - Than 11 Characters

    -
    -
    -
    -
    - -
    - -
    -
    -

    Required - Field

    -

    Less Than 50 - Characters(including symbols and spaces)

    -
    -
    -
    -
    -
    - -
    -
    Address Information
    -
    -
    -
    - -
    - -
    -

    Less - Than 200 - Characters(including symbols and spaces)

    -

    Required - Field

    -
    -
    -
    -
    - -
    - -
    -

    Less - Than 50 - Characters(including symbols and spaces)

    -

    Required - Field

    -
    - - - - - - - - - -
    -
    -
    - -
    - -
    -

    Less - Than 10 - Characters(including symbols and spaces)

    -

    Required - Field

    -
    -
    -
    -
    - -
    - - - - - - - -
    -

    Required - Field

    -
    - -
    -
    -
    - -
    - -
    -

    Less - Than 20 - Characters(including symbols and spaces)

    -

    Required - Field

    -
    - - - - - - - - - -
    -
    -
    - -
    - -
    -
    -
    -
    -
    -
    -
    Location - - -
    -
    -
    - -
    -
    -
    - - - -
    -
    - Industry -
    -
    -
    - -
    - -
    -

    Required - Field

    -
    -
    -
    - -
    - -
    - -
    -

    Required - Field

    -
    -
    -
    - - -
    - -
    - -
    -

    Required - Field

    -
    -
    -
    - -
    - -
    - -
    -

    Required - Field

    -
    -
    - -
    - -
    - -
    - -
    -
    -
    -
    diff --git a/src/main/ui/static/payment/partner/templates/partner_edit.html b/src/main/ui/static/payment/partner/templates/partner_edit.html index f5525f892..fb4b73361 100644 --- a/src/main/ui/static/payment/partner/templates/partner_edit.html +++ b/src/main/ui/static/payment/partner/templates/partner_edit.html @@ -466,490 +466,6 @@ - -
    -
    Alipay Information  (Optional)
    -
    -
    -
    - -
    - -

    - eg:Monday-Friday 09:00-20:00,Saturday-Sunday 10:00-22:00

    -
    -
    -
    - -
    - -
    -
    -
    - -
    - -
    -
    -
    - -
    - -

    eg:https://www.baidu.com

    -
    -
    -
    -
    -
    - -
    -
    Contact Information
    -
    -
    -
    - -
    - -
    -

    Required - Field

    -

    Less - Than 50 - Characters(including symbols and spaces)

    -
    -
    -
    -
    - - - -
    -
    -
    +
    - -
    - -
    -

    Required - Field

    -

    Less - Than 20 Characters

    -
    -
    -
    - -
    -

    Less - Than 2 Characters

    -
    -
    -
    - -
    -

    Required - Field

    -

    Less - Than 11 Characters

    -
    -
    -
    -
    - -
    - -
    -
    -

    Required - Field

    -

    Less Than 50 - Characters(including symbols and spaces)

    -
    -
    -
    -
    -
    - -
    -
    Address Information
    -
    -
    -
    - -
    - -
    -

    Less - Than 200 - Characters(including symbols and spaces)

    -

    Required - Field

    -
    -
    -
    -
    - -
    - -
    -

    Less - Than 50 - Characters(including symbols and spaces)

    -

    Required - Field

    -
    - - - - - - - - - -
    -
    -
    - -
    - -
    -

    Less - Than 10 - Characters(including symbols and spaces)

    -

    Required - Field

    -
    -
    -
    -
    - -
    - - - - - - - -
    -

    Required - Field

    -
    - -
    -
    -
    - -
    - -
    -

    Less - Than 20 - Characters(including symbols and spaces)

    -

    Required - Field

    -
    - - - - - - - - - -
    -
    -
    - -
    - -
    -
    -
    -
    -
    -
    -
    Location - - -
    -
    -
    - -
    -
    -
    - - - -
    -
    - Industry -
    -
    -
    - -
    - -
    -

    Required - Field

    -
    -
    -
    - -
    - -
    - -
    -

    Required - Field

    -
    -
    -
    - - -
    - -
    - -
    -

    Required - Field

    -
    -
    -
    - -
    - -
    - -
    -

    Required - Field

    -
    -
    - -
    - -
    - -
    - -
    -
    -
    -
    diff --git a/src/main/ui/static/payment/partner/templates/partner_payment_info.html b/src/main/ui/static/payment/partner/templates/partner_payment_info.html index 05d6a39eb..4058906d1 100644 --- a/src/main/ui/static/payment/partner/templates/partner_payment_info.html +++ b/src/main/ui/static/payment/partner/templates/partner_payment_info.html @@ -433,9 +433,15 @@
    +
    -   仅支持微信客户端扫描 +   仅支持微信客户端扫描 +
    +

    + Download Aggregate QR Board Image (聚合支付水晶立牌:支持支付宝、微信、翼支付) +