diff --git a/pom.xml b/pom.xml index 86ec70e85..4063958e7 100644 --- a/pom.xml +++ b/pom.xml @@ -5,11 +5,11 @@ au.com.royalpay.payment payment-parent - 2.2.27 + 2.2.28 4.0.0 manage - 2.3.80 + 2.3.83 UTF-8 2.4.0 diff --git a/src/db/modify.sql b/src/db/modify.sql index 52d9dbccf..ff61f3acb 100644 --- a/src/db/modify.sql +++ b/src/db/modify.sql @@ -776,3 +776,8 @@ ALTER TABLE `sys_clients` -- 商户表 日期类型改为varchar 2020.12.23 ALTER TABLE `sys_clients` modify COLUMN certificat_expire_date varchar(20) DEFAULT NULL COMMENT '注册证书过期时间'; + + +-- 微信子商户表 字段长度修改 2021.04.07 +ALTER TABLE sys_wx_merchant_apply MODIFY merchant_name varchar(128); +ALTER TABLE sys_wx_merchant_apply MODIFY merchant_shortname varchar(64); 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 6c864666a..448dbf857 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 @@ -518,8 +518,10 @@ public class TestController { tradeSecureService.sendSecurePayInvoiceFile(firstDay, lastDay); } + /** + * 批量更新微信子商户号 + */ @ManagerMapping(value = "/batch_update_wxsubmerchantId", method = RequestMethod.GET, role = {ManagerRole.ADMIN, ManagerRole.DIRECTOR, ManagerRole.OPERATOR, ManagerRole.DEVELOPER}) -// @GetMapping(value = "/batch_update_wxsubmerchantId") public void batchUpdateWxSubmerchantId() { List findSubMerchantIdHistorys=sysWxMerchantApplyMapper.findSubMerchantIdHistorys(); if(findSubMerchantIdHistorys==null)return; @@ -536,6 +538,17 @@ public class TestController { logger.info("=========>没有查询到mcc:"+jsonObject.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:"+jsonObject.getInteger("client_id")+""); + return; + } NewSubMerchantIdApply newSubMerchantIdApply=new NewSubMerchantIdApply(); newSubMerchantIdApply.setMerchant_id(jsonObject.getString("merchant_id")); @@ -543,13 +556,13 @@ public class TestController { newSubMerchantIdApply.setMerchantRemark(jsonObject.getString("merchant_remark")); newSubMerchantIdApply.setMerchant_name(cutLength(jsonObject.getString("merchant_name"),50)); newSubMerchantIdApply.setAddress(cutLength(clientJson.getString("address"),128)); - newSubMerchantIdApply.setMerchant_shortname(cutLength(clientJson.getString("short_name"),20)); + newSubMerchantIdApply.setMerchant_shortname(cutLength(clientJson.getString("short_name"),64)); newSubMerchantIdApply.setBusiness_category(clientJson.getString("industry")); - newSubMerchantIdApply.setWebsite(cutLength(clientJson.getString("company_website"),128)); + 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"),128)); + 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"))){ @@ -559,7 +572,7 @@ public class TestController { }else if(clientConfig.getString("client_pay_type").indexOf("1")>=0){ newSubMerchantIdApply.setBusiness_type("ONLINE"); } - else if(clientConfig.getString("client_pay_type").indexOf("1")>=0){ + else if(clientConfig.getString("client_pay_type").indexOf("2")>=0){ newSubMerchantIdApply.setBusiness_type("OFFLINE"); } }else{ @@ -570,13 +583,33 @@ public class TestController { }else{ newSubMerchantIdApply.setMerchant_type("INDIVIDUAL") ; } - newSubMerchantIdApply.setCompany_register_no(cutLength(TextUtils.isEmpty(clientJson.getString("acn"))?clientJson.getString("abn"):clientJson.getString("abn"),50)); + + newSubMerchantIdApply.setCompany_register_no(cutLength(TextUtils.isEmpty(clientJson.getString("acn"))?clientJson.getString("abn"):clientJson.getString("acn"),50)); newSubMerchantIdApply.setCertificat_expire_date("PERMANENT"); 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"); + + if("ENTERPRISE".equalsIgnoreCase(newSubMerchantIdApply.getMerchant_type())&&TextUtils.isEmpty(newSubMerchantIdApply.getCompany_register_no())){ + logger.error("=======>公司注册号为空:clientid:"+jsonObject.getInteger("client_id")); + return; + } + if("BOTH".equalsIgnoreCase(newSubMerchantIdApply.getBusiness_type())&&(TextUtils.isEmpty(newSubMerchantIdApply.getAddress()))|| + TextUtils.isEmpty(newSubMerchantIdApply.getWebsite())){ + logger.error("=======>公司类型为BOTH:网址或地址为空:clientid:"+jsonObject.getInteger("client_id")); + return; + } + else if("OFFLINE".equalsIgnoreCase(newSubMerchantIdApply.getBusiness_type())&&(TextUtils.isEmpty(newSubMerchantIdApply.getAddress()))){ + logger.error("=======>公司类型为OFFLINE:地址为空:clientid:"+jsonObject.getInteger("client_id")); + return; + } + else if("ONLINE".equalsIgnoreCase(newSubMerchantIdApply.getBusiness_type())&& + TextUtils.isEmpty(newSubMerchantIdApply.getWebsite())){ + logger.error("=======>公司类型为ONLINE:网址为空:clientid:"+jsonObject.getInteger("client_id")); + return; + } WxPayMerchantRegister register = Optional.ofNullable(merchantChannelApplicationManager.getRegister(WxPayMerchantRegister.class)) .orElseThrow(() -> new ServerErrorException("No Register found for wechat")); @@ -589,13 +622,9 @@ public class TestController { e.printStackTrace(); } - }); -// String declareResp = paymentDevHelper.devQueryCustomsReport(reportId); -// JSONObject res = new JSONObject(); -// res.put("xml", declareResp); } public String cutLength(String str,int maxlen){ if(TextUtils.isEmpty(str))return ""; diff --git a/src/main/ui/static/images/payment_page_v2101_step1.png b/src/main/ui/static/images/payment_page_v2101_step1.png new file mode 100644 index 000000000..b2fb59877 Binary files /dev/null and b/src/main/ui/static/images/payment_page_v2101_step1.png differ diff --git a/src/main/ui/static/images/payment_page_v2101_step2.png b/src/main/ui/static/images/payment_page_v2101_step2.png new file mode 100644 index 000000000..45bb082b0 Binary files /dev/null and b/src/main/ui/static/images/payment_page_v2101_step2.png differ diff --git a/src/main/ui/static/payment/partner/templates/new_apply_wx_sub_merchant_id.html b/src/main/ui/static/payment/partner/templates/new_apply_wx_sub_merchant_id.html index de2ec9660..97850b1db 100644 --- a/src/main/ui/static/payment/partner/templates/new_apply_wx_sub_merchant_id.html +++ b/src/main/ui/static/payment/partner/templates/new_apply_wx_sub_merchant_id.html @@ -11,10 +11,10 @@
+ type="text" name="merchant_name" id="merchant_name_input" required maxlength="128">

Required Field

-

Length is more than 50

+

Length is more than 128

@@ -43,10 +43,10 @@
+ type="text" name="merchant_storename" id="merchant_storename_input" required maxlength="64">

Required Field

-

Length is more than 20

+

Length is more than 64

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 68c9c0692..79245604a 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 @@ -714,6 +714,7 @@ +
@@ -731,6 +732,10 @@ src="/static/images/payment_page_v5.jpg"> + +
@@ -757,4 +762,4 @@ - \ No newline at end of file + diff --git a/src/main/ui/static/payment/partner/templates/update_apply_wx_sub_merchant_id.html b/src/main/ui/static/payment/partner/templates/update_apply_wx_sub_merchant_id.html index 5502868db..821e07160 100644 --- a/src/main/ui/static/payment/partner/templates/update_apply_wx_sub_merchant_id.html +++ b/src/main/ui/static/payment/partner/templates/update_apply_wx_sub_merchant_id.html @@ -11,10 +11,10 @@
+ type="text" name="merchant_name" id="merchant_name_input" required maxlength="128">

Required Field

-

Length is more than 50

+

Length is more than 128

@@ -43,10 +43,10 @@
+ type="text" name="merchant_storename" id="merchant_storename_input" required maxlength="64">

Required Field

-

Length is more than 20

+

Length is more than 64