From 1c145d82ca55391b183638a1c84d9b81ae17b74b Mon Sep 17 00:00:00 2001 From: dalong306 <304592994@qq.com> Date: Tue, 31 Aug 2021 11:05:42 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E9=87=8D=E6=96=B0=E5=88=B6=E4=BD=9C?= =?UTF-8?q?=E5=8D=A1=E6=94=AF=E4=BB=98=E5=90=88=E5=90=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../manage/dev/web/TestController.java | 118 ++++++++++++++++++ .../manage/merchants/core/ClientManager.java | 2 + .../core/impls/ClientManagerImpl.java | 9 ++ 3 files changed, 129 insertions(+) diff --git a/src/main/java/au/com/royalpay/payment/manage/dev/web/TestController.java b/src/main/java/au/com/royalpay/payment/manage/dev/web/TestController.java index c39d3e4bc..78efe55b9 100644 --- a/src/main/java/au/com/royalpay/payment/manage/dev/web/TestController.java +++ b/src/main/java/au/com/royalpay/payment/manage/dev/web/TestController.java @@ -249,6 +249,17 @@ public class TestController { sos.write(bos.toByteArray()); sos.close(); } + /** + * 制作卡支付合同 + * + * @param clientMoniker + * @param manager + * @throws Exception + */ + @ManagerMapping(value = "/{clientMoniker}/export/aggregate/card_agree_pdf", method = RequestMethod.GET, role = {ManagerRole.ADMIN, ManagerRole.DIRECTOR, ManagerRole.OPERATOR}) + public void exportAggregateCardAgreeFile(@PathVariable String clientMoniker, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) throws Exception { + clientManager.getAggregateCardAgreeFileAgain(clientMoniker, manager); + } public JSONObject getBankAccountByClientId(int client_id) { List list = clientBankAccountMapper.clientBankAccounts(client_id); @@ -630,6 +641,113 @@ public class TestController { } + /** + * 批量更新微信子商户号 + */ +// @GetMapping(value = "/batch_update_wxsubmerchantId_other") +// public void batchUpdateWxSubmerchantIdForOther() { +// JSONObject clientJson = clientMapper.findClient(9); +// JSONObject wechatMcc = paymentChannelMccGoodMapper.findWechatPayMccByClientId(clientJson.getIntValue("client_id")); +// JSONObject clientConfig = clientConfigMapper.find(clientJson.getIntValue("client_id")); +// if(clientJson==null){ +// logger.info("=========>没有查询到client:"+clientJson.getInteger("client_id")); +// return; +// } +// if(wechatMcc==null){ +// logger.info("=========>没有查询到mcc:"+clientJson.getInteger("client_id")); +// return; +// } +// // company_name short_name industry company_phone contact_person contact_phone contact_email 这些字段不能为空 +// if(TextUtils.isEmpty(clientJson.getString("short_name"))|| +// TextUtils.isEmpty(clientJson.getString("industry"))|| +// TextUtils.isEmpty(clientJson.getString("company_phone"))|| +// TextUtils.isEmpty(clientJson.getString("contact_phone"))|| +// TextUtils.isEmpty(clientJson.getString("contact_person"))|| +// TextUtils.isEmpty(clientJson.getString("contact_email"))|| +// TextUtils.isEmpty(wechatMcc.getString("mc_code"))){ +// logger.error("=======>数据不完整:clientid:"+clientJson.getInteger("client_id")+""); +// return; +// } +// +// NewSubMerchantIdApply newSubMerchantIdApply=new NewSubMerchantIdApply(); +// newSubMerchantIdApply.setMerchant_id(clientJson.getString("merchant_id")); +// newSubMerchantIdApply.setSub_mch_id(clientJson.getString("sub_merchant_id")); +//// newSubMerchantIdApply.setMerchantRemark(jsonObject.getString("merchant_remark")); +// newSubMerchantIdApply.setMerchant_name(cutLength("Pineapple Techology Pty Ltd",128)); +// newSubMerchantIdApply.setAddress(cutLength(clientJson.getString("address"),128)); +// newSubMerchantIdApply.setMerchant_shortname(cutLength(clientJson.getString("short_name"),64)); +// newSubMerchantIdApply.setBusiness_category(clientJson.getString("industry")); +// newSubMerchantIdApply.setWebsite(cutLength(clientJson.getString("company_website"),100)); +// newSubMerchantIdApply.setOffice_phone(cutLength(clientJson.getString("company_phone"),20)); +// newSubMerchantIdApply.setContact_phone(cutLength(clientJson.getString("contact_phone"),16)); +// newSubMerchantIdApply.setContact_name(cutLength(clientJson.getString("contact_person"),32)); +// newSubMerchantIdApply.setContact_email(cutLength(clientJson.getString("contact_email"),50)); +// newSubMerchantIdApply.setMcc_code(cutLength(wechatMcc.getString("mc_code"),10)); +// +// if(!TextUtils.isEmpty(clientConfig.getString("client_pay_type"))){ +// if(clientConfig.getString("client_pay_type").indexOf("1")>=0 +// &&clientConfig.getString("client_pay_type").indexOf("2")>=0){ +// newSubMerchantIdApply.setBusiness_type("BOTH"); +// }else if(clientConfig.getString("client_pay_type").indexOf("1")>=0){ +// newSubMerchantIdApply.setBusiness_type("ONLINE"); +// } +// else if(clientConfig.getString("client_pay_type").indexOf("2")>=0){ +// newSubMerchantIdApply.setBusiness_type("OFFLINE"); +// } +// }else{ +// newSubMerchantIdApply.setBusiness_type("BOTH"); +// } +// if (!TextUtils.isEmpty(clientJson.getString("business_structure"))) { +// newSubMerchantIdApply.setMerchant_type(clientJson.getString("business_structure").equals("Registered body(Sole Trader)")?"INDIVIDUAL":"ENTERPRISE") ; +// }else{ +// newSubMerchantIdApply.setMerchant_type("INDIVIDUAL") ; +// } +// +// newSubMerchantIdApply.setCompany_register_no(cutLength(TextUtils.isEmpty(clientJson.getString("acn"))?clientJson.getString("abn"):clientJson.getString("acn"),50)); +// if (!TextUtils.isEmpty(clientJson.getString("certificat_expire_date"))) { +// newSubMerchantIdApply.setCertificat_expire_date(clientJson.getString("certificat_expire_date")); +// } else { +// newSubMerchantIdApply.setCertificat_expire_date("PERMANENT"); +// } +// +// +// if("ENTERPRISE".equalsIgnoreCase(newSubMerchantIdApply.getMerchant_type())&&TextUtils.isEmpty(newSubMerchantIdApply.getCompany_register_no())){ +// logger.error("=======>公司注册号为空:clientid:"+clientJson.getInteger("client_id")+":"+clientJson.getString("client_moniker")); +// return; +// } +// if("BOTH".equalsIgnoreCase(newSubMerchantIdApply.getBusiness_type())&&(TextUtils.isEmpty(newSubMerchantIdApply.getAddress())|| +// TextUtils.isEmpty(newSubMerchantIdApply.getWebsite()))){ +// logger.error("=======>公司类型为BOTH:网址或地址为空:clientid:"+clientJson.getInteger("client_id")+":"+clientJson.getString("client_moniker")); +// return; +// } +// else if("OFFLINE".equalsIgnoreCase(newSubMerchantIdApply.getBusiness_type())&&(TextUtils.isEmpty(newSubMerchantIdApply.getAddress()))){ +// logger.error("=======>公司类型为OFFLINE:地址为空:clientid:"+clientJson.getInteger("client_id")+":"+clientJson.getString("client_moniker")); +// return; +// } +// else if("ONLINE".equalsIgnoreCase(newSubMerchantIdApply.getBusiness_type())&& +// TextUtils.isEmpty(newSubMerchantIdApply.getWebsite())){ +// logger.error("=======>公司类型为ONLINE:网址为空:clientid:"+clientJson.getInteger("client_id")+":"+clientJson.getString("client_moniker")); +// return; +// } +// JSONObject params = newSubMerchantIdApply.insertObject(clientJson); +//// params.put("merchant_app_id", jsonObject.getString("merchant_app_id")); +// SubMerchantInfoInheritance subMerchantInfo = JSON.toJavaObject(params, SubMerchantInfoInheritance.class); +// params.put("operator","System"); +// +// WxPayMerchantRegister register = Optional.ofNullable(merchantChannelApplicationManager.getRegister(WxPayMerchantRegister.class)) +// .orElseThrow(() -> new ServerErrorException("No Register found for wechat")); +// +// JSONObject manager=new JSONObject(); +// manager.put("display_name","System"); +// register.modifyForBatch( clientJson, subMerchantInfo, manager); +// try { +// Thread.sleep(500); +// } catch (InterruptedException e) { +// e.printStackTrace(); +// } +// +// +// } public String cutLength(String str,int maxlen){ if(TextUtils.isEmpty(str))return ""; if(str.length()>maxlen){ 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 def6bff51..f93d9ace8 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 @@ -391,6 +391,8 @@ public interface ClientManager { void getAggregateAgreeFile(String clientMoniker, JSONObject manager, boolean renewal) throws Exception; void getAggregateCardAgreeFile(String clientMoniker, JSONObject manager, boolean renewal) throws Exception; + //重新制作卡支付合同 + void getAggregateCardAgreeFileAgain(String clientMoniker, JSONObject manager) throws Exception; void getAggregateCardPromotionaAgreeFile(String clientMoniker, JSONObject manager, boolean renewal,String rateid,HttpServletResponse httpResponse); 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 3249041fa..f33ad3be3 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 @@ -3049,6 +3049,15 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid } } + @Override + @Transactional + public void getAggregateCardAgreeFileAgain(String clientMoniker, JSONObject manager) throws Exception { + logger.info("========>重新制作卡支付合同"); + exportLetterOfferPDF(clientMoniker, manager); + logger.info("========>卡支付合同制作完成"); + + } + @Override @Transactional public void getAggregateCardPromotionaAgreeFile(String clientMoniker, JSONObject manager, boolean renewal, String rateid, HttpServletResponse httpResponse) { From 23a76f1c7b636ad6a527d50ac53d4fba2e767c49 Mon Sep 17 00:00:00 2001 From: yixian Date: Tue, 31 Aug 2021 11:31:01 +0800 Subject: [PATCH 2/2] deploy to uat --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 0ad19d395..2934cc261 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ 4.0.0 manage - 2.3.88 + 2.3.88-SNAPSHOT UTF-8 2.4.0