From cd171f5bc25d0153313b9981f43c9093cf20292c Mon Sep 17 00:00:00 2001 From: liuxinxin Date: Tue, 6 Aug 2019 19:21:09 +0800 Subject: [PATCH] =?UTF-8?q?[RoyalPay]=E6=96=B0=E5=A2=9ECompany=20name?= =?UTF-8?q?=E9=87=8D=E5=A4=8D=E6=A3=80=E6=B5=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../payment/manage/mappers/system/ClientMapper.java | 2 ++ .../merchants/core/impls/ClientManagerImpl.java | 6 ++++++ .../payment/manage/mappers/system/ClientMapper.xml | 12 ++++++++++++ .../payment/partner/templates/partner_detail.html | 7 +++++-- 4 files changed, 25 insertions(+), 2 deletions(-) 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 38465c092..ca69cb19f 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 @@ -32,6 +32,8 @@ public interface ClientMapper { JSONObject findSamePhone(@Param("contact_phone") String contactPhone); + JSONObject findSameCompanyName(@Param("company_name") String contactPhone); + JSONObject findSameEmail(@Param("contact_email") String contactEmail); JSONObject findSameAddress(@Param("address") String address); 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 e4dc816c0..874a73ff8 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 @@ -351,6 +351,12 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid client.put("same_phone","(雷同商户:"+same_phone+")" ); } + String same_company_name = clientMapper.findSameCompanyName(client.getString("company_name")).getString("a"); + if(same_company_name!=null&& client.getString("company_name")!= null&&same_company_name.contains(" ") ) { + same_company_name = same_company_name.replace(client.getString("client_moniker"),""); + client.put("same_company_name","(雷同商户:"+same_company_name+")" ); + } + String same_email = clientMapper.findSameEmail(client.getString("contact_email")).getString("a"); if(same_email!=null&& client.getString("contact_email")!= null&&same_email.contains(" ") ) { same_email = same_email.replace(client.getString("client_moniker"),""); 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 efabf9951..fe9d74c1e 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 @@ -714,6 +714,18 @@ + +