From c9c477c64ee1389cb24f25a4537b3c53d17ad09d Mon Sep 17 00:00:00 2001 From: luoyang Date: Thu, 25 Jul 2019 16:14:52 +0800 Subject: [PATCH] =?UTF-8?q?add=20alipay=20online=20=E5=85=A8=E9=87=8F?= =?UTF-8?q?=E5=A4=87=E4=BB=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 2 +- .../manage/dev/core/impl/AliforexcelServiceImpl.java | 10 +++++++++- .../payment/manage/mappers/system/ClientMapper.java | 3 +++ .../payment/manage/mappers/system/ClientMapper.xml | 4 ++++ 4 files changed, 17 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 55932b945..5f190c5ca 100644 --- a/pom.xml +++ b/pom.xml @@ -10,7 +10,7 @@ 4.0.0 manage - 1.0.26 + 1.0.27 UTF-8 diff --git a/src/main/java/au/com/royalpay/payment/manage/dev/core/impl/AliforexcelServiceImpl.java b/src/main/java/au/com/royalpay/payment/manage/dev/core/impl/AliforexcelServiceImpl.java index 46a94aec3..9e8a5a143 100644 --- a/src/main/java/au/com/royalpay/payment/manage/dev/core/impl/AliforexcelServiceImpl.java +++ b/src/main/java/au/com/royalpay/payment/manage/dev/core/impl/AliforexcelServiceImpl.java @@ -21,6 +21,8 @@ import org.apache.poi.ss.usermodel.Cell; import org.apache.poi.ss.usermodel.Row; import org.apache.poi.ss.usermodel.Sheet; import org.dom4j.Element; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.stereotype.Service; import javax.annotation.Resource; @@ -44,6 +46,8 @@ public class AliforexcelServiceImpl implements AliforexcelService { private AlipayClient alipayClient; @Resource private OrderMapper orderMapper; + private Logger logger = LoggerFactory.getLogger(getClass()); + @Override public JSONObject listClients(HttpServletResponse httpResponse,JSONObject manager, AliExcel query) { @@ -105,7 +109,7 @@ public class AliforexcelServiceImpl implements AliforexcelService { List registerSuccessMerchant = new ArrayList<>(); List registerFailMerchant = new ArrayList<>(); List lessInfoMerchant = new ArrayList<>(); - List useAlipayOnlineMerchant = transactionMapper.useAlipayOnlineClients(); + List useAlipayOnlineMerchant = clientMapper.listUseAlipayMerchant(); for (int clientId : useAlipayOnlineMerchant) { JSONObject client = clientMapper.findClient(clientId); if (client == null) { @@ -113,6 +117,9 @@ public class AliforexcelServiceImpl implements AliforexcelService { } try { needRegisterMerchant.add(client.getString("client_moniker")); + if (StringUtils.isBlank(client.getString("company_website"))) { + client.put("company_website", client.getString("ali_sub_merchant_id")+".royalpay.com.au"); + } checkPartnerInfo(client,"online"); } catch (InvalidParameterException e) { JSONObject exception = new JSONObject(); @@ -145,6 +152,7 @@ public class AliforexcelServiceImpl implements AliforexcelService { result.put("success_register_merchant", registerSuccessMerchant); result.put("fail_register_merchant", registerFailMerchant); result.put("less_info_merchant", lessInfoMerchant); + logger.info("-------AlipayOnline Gms end----fail_register_merchant"+registerFailMerchant.toString()); return result; } diff --git a/src/main/java/au/com/royalpay/payment/manage/mappers/system/ClientMapper.java b/src/main/java/au/com/royalpay/payment/manage/mappers/system/ClientMapper.java index d5d58734c..41497c5f6 100644 --- a/src/main/java/au/com/royalpay/payment/manage/mappers/system/ClientMapper.java +++ b/src/main/java/au/com/royalpay/payment/manage/mappers/system/ClientMapper.java @@ -130,4 +130,7 @@ public interface ClientMapper { int getPartnercode(@Param("codes") String codes); JSONObject findCountByBd(@Param("bd_group") String bd_group, @Param("today") Date today, @Param("yesterday") Date yesterday, @Param("month") Date month); + + List listUseAlipayMerchant(); + } diff --git a/src/main/resources/au/com/royalpay/payment/manage/mappers/system/ClientMapper.xml b/src/main/resources/au/com/royalpay/payment/manage/mappers/system/ClientMapper.xml index cd0e4c957..fc464e886 100644 --- a/src/main/resources/au/com/royalpay/payment/manage/mappers/system/ClientMapper.xml +++ b/src/main/resources/au/com/royalpay/payment/manage/mappers/system/ClientMapper.xml @@ -701,4 +701,8 @@ AND is_valid = 1 ) b + +