From 073df7b0eef86c206cd8298a3bbc198d84aad322 Mon Sep 17 00:00:00 2001 From: dulingling Date: Mon, 3 Feb 2020 11:52:06 +0800 Subject: [PATCH 1/8] =?UTF-8?q?Upd:=E5=AE=A2=E6=88=B7=E8=AE=A2=E5=8D=95?= =?UTF-8?q?=E4=BA=A4=E6=98=93=E6=95=B0=E6=8D=AE=E4=BF=AE=E6=94=B9=E4=B8=BA?= =?UTF-8?q?=E6=97=A0=E4=BA=A4=E6=98=93=E4=B9=9F=E6=98=BE=E7=A4=BA=E6=97=A5?= =?UTF-8?q?=E6=9C=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 2 +- .../CustomerAndOrdersStatisticsMapper.xml | 72 +++++++++++-------- 2 files changed, 45 insertions(+), 29 deletions(-) diff --git a/pom.xml b/pom.xml index 5ff40f4a7..e86ade078 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ 4.0.0 manage - 1.3.21 + 1.3.22 UTF-8 1.4.0 diff --git a/src/main/resources/au/com/royalpay/payment/manage/analysis/mappers/CustomerAndOrdersStatisticsMapper.xml b/src/main/resources/au/com/royalpay/payment/manage/analysis/mappers/CustomerAndOrdersStatisticsMapper.xml index b223cc6f8..1c8eadd2e 100644 --- a/src/main/resources/au/com/royalpay/payment/manage/analysis/mappers/CustomerAndOrdersStatisticsMapper.xml +++ b/src/main/resources/au/com/royalpay/payment/manage/analysis/mappers/CustomerAndOrdersStatisticsMapper.xml @@ -93,36 +93,52 @@ @@ -628,7 +632,7 @@ select sum(if(temp.transaction_type = 'Credit', temp.clearing_amount * d.proportion, -temp.clearing_amount * d.proportion)) total - FROM (SELECT l.client_id,l.clearing_amount,l.refund_id,l.transaction_type,o.create_time + FROM (SELECT l.client_id, l.clearing_amount, l.refund_id, l.transaction_type, o.create_time FROM pmt_transactions l INNER JOIN pmt_orders o ON o.order_id = l.order_id @@ -744,13 +748,13 @@ if(t.transaction_type = 'Credit', t.clearing_amount, -t.clearing_amount) clearing_amount, if(t.transaction_type = 'Credit', t.total_surcharge, -t.total_surcharge) total_surcharge, if(t.transaction_type = 'Credit', t.channel_surcharge, -t.channel_surcharge) channel_surcharge, - if(t.transaction_type = 'Credit', t.settle_amount, -t.settle_amount) settle_amount, + if(t.transaction_type = 'Credit', t.settle_amount, -t.settle_amount) settle_amount, t.order_id, t.org_rate, t.surcharge_cashback, o.customer_surcharge from pmt_transactions t - LEFT JOIN pmt_orders o on o.order_id = t.order_id + LEFT JOIN pmt_orders o on o.order_id = t.order_id INNER JOIN sys_org so ON t.org_id = so.org_id AND so.is_valid = 1 AND so.type = 0 AND so.citypartner = 1 AND so.commission = 1 @@ -763,7 +767,7 @@ @@ -1145,10 +1149,10 @@ t.channel = 'Settlement' ]]> - AND t.client_id IN - - #{clientId} - + AND t.client_id IN + + #{clientId} + and t.client_id=#{client_id} @@ -1208,42 +1212,42 @@ From 05823215568eff0d19465ef14b7296750c63e7ca Mon Sep 17 00:00:00 2001 From: "taylor.dang" Date: Thu, 6 Feb 2020 00:44:05 +0800 Subject: [PATCH 3/8] =?UTF-8?q?[Y]=20=E6=96=B0=E5=A2=9E=E7=A6=81=E6=AD=A2?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2level3=E5=95=86=E6=88=B7=E5=BC=80=E5=85=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 4 +- .../impls/SimpleClientApplyServiceImpl.java | 21 +- .../listeners/AfterPaymentFinishListener.java | 2 - .../datav/core/Impl/DatavServiceImpl.java | 5 +- .../core/impl/OperationLogServiceImpl.java | 11 +- .../manage/mappers/system/ClientMapper.java | 4 + .../impl/MerchantIdManageServiceImpl.java | 13 +- .../core/impls/ClientManagerImpl.java | 34 +- .../notice/core/impls/MailServiceImp.java | 84 +-- .../manage/ofei/core/impl/OfeiClientImpl.java | 21 +- .../ReadWriteSplitRoutingDataSource.java | 4 +- .../posters/core/impls/PosterServiceImpl.java | 17 +- .../refund/impls/RefundServiceImpl.java | 11 +- .../impls/CustomerImpressionImplTest.java | 628 ------------------ .../payment/manage/valid/JPinYinTest.java | 11 + 15 files changed, 97 insertions(+), 773 deletions(-) delete mode 100644 src/test/java/au/com/royalpay/payment/manage/apps/core/impls/CustomerImpressionImplTest.java diff --git a/pom.xml b/pom.xml index e86ade078..ba4d16666 100644 --- a/pom.xml +++ b/pom.xml @@ -5,11 +5,11 @@ au.com.royalpay.payment payment-parent - 1.1.7 + 1.1.12 4.0.0 manage - 1.3.22 + 1.3.23 UTF-8 1.4.0 diff --git a/src/main/java/au/com/royalpay/payment/manage/application/core/impls/SimpleClientApplyServiceImpl.java b/src/main/java/au/com/royalpay/payment/manage/application/core/impls/SimpleClientApplyServiceImpl.java index 3cc6c9bd0..5696a9815 100644 --- a/src/main/java/au/com/royalpay/payment/manage/application/core/impls/SimpleClientApplyServiceImpl.java +++ b/src/main/java/au/com/royalpay/payment/manage/application/core/impls/SimpleClientApplyServiceImpl.java @@ -24,12 +24,12 @@ import au.com.royalpay.payment.tools.exceptions.NotFoundException; import au.com.royalpay.payment.tools.exceptions.ServerErrorException; import au.com.royalpay.payment.tools.locale.LocaleSupport; import au.com.royalpay.payment.tools.utils.PasswordUtils; - import au.com.royalpay.payment.tools.utils.PdfUtils; import au.com.royalpay.payment.tools.utils.TimeZoneUtils; +import cn.yixblog.platform.http.HttpRequestGenerator; +import cn.yixblog.platform.http.HttpRequestResult; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; - import com.alibaba.fastjson.parser.Feature; import org.apache.commons.codec.binary.Base64; import org.apache.commons.lang3.RandomStringUtils; @@ -45,10 +45,14 @@ import org.springframework.util.Assert; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.multipart.MultipartFile; import org.thymeleaf.context.Context; +import org.thymeleaf.spring5.SpringTemplateEngine; +import javax.annotation.PostConstruct; +import javax.annotation.Resource; +import javax.imageio.ImageIO; +import javax.servlet.http.HttpServletRequest; import java.awt.image.BufferedImage; import java.io.*; -import java.math.BigDecimal; import java.net.URISyntaxException; import java.net.URLDecoder; import java.util.*; @@ -57,15 +61,6 @@ import java.util.concurrent.ThreadPoolExecutor; import java.util.concurrent.TimeUnit; import java.util.stream.Collectors; -import javax.annotation.PostConstruct; -import javax.annotation.Resource; -import javax.imageio.ImageIO; -import javax.servlet.http.HttpServletRequest; - -import cn.yixblog.platform.http.HttpRequestGenerator; -import cn.yixblog.platform.http.HttpRequestResult; -import org.thymeleaf.spring5.SpringTemplateEngine; - @Service public class SimpleClientApplyServiceImpl implements SimpleClientApplyService { @@ -828,7 +823,7 @@ public class SimpleClientApplyServiceImpl implements SimpleClientApplyService { throw new NotFoundException("BSB Number Not Found"); } } - } catch (URISyntaxException | IOException e) { + } catch (IOException e) { throw new ServerErrorException(); } return banInfo; diff --git a/src/main/java/au/com/royalpay/payment/manage/apps/events/listeners/AfterPaymentFinishListener.java b/src/main/java/au/com/royalpay/payment/manage/apps/events/listeners/AfterPaymentFinishListener.java index b52e8387b..512641468 100644 --- a/src/main/java/au/com/royalpay/payment/manage/apps/events/listeners/AfterPaymentFinishListener.java +++ b/src/main/java/au/com/royalpay/payment/manage/apps/events/listeners/AfterPaymentFinishListener.java @@ -3,10 +3,8 @@ package au.com.royalpay.payment.manage.apps.events.listeners; import au.com.royalpay.payment.core.events.AfterPaymentFinishEvent; import au.com.royalpay.payment.manage.customers.core.CustomerPaymentInfoService; import au.com.royalpay.payment.manage.mappers.system.SysCustomerPaymentInfoMapper; - import au.com.royalpay.payment.manage.merchants.core.ClientManager; import com.alibaba.fastjson.JSONObject; - import org.apache.commons.lang3.StringUtils; import org.springframework.context.ApplicationListener; import org.springframework.stereotype.Service; diff --git a/src/main/java/au/com/royalpay/payment/manage/datav/core/Impl/DatavServiceImpl.java b/src/main/java/au/com/royalpay/payment/manage/datav/core/Impl/DatavServiceImpl.java index ae4015685..e3404217e 100644 --- a/src/main/java/au/com/royalpay/payment/manage/datav/core/Impl/DatavServiceImpl.java +++ b/src/main/java/au/com/royalpay/payment/manage/datav/core/Impl/DatavServiceImpl.java @@ -4,17 +4,14 @@ import au.com.royalpay.payment.manage.analysis.core.PartnersAnalysisService; import au.com.royalpay.payment.manage.datav.core.DatavService; import au.com.royalpay.payment.manage.mappers.payment.OrderMapper; import au.com.royalpay.payment.manage.mappers.system.ClientAndCustomerLocation; -import au.com.royalpay.payment.tools.env.PlatformEnvironment; import cn.yixblog.platform.http.HttpRequestGenerator; import cn.yixblog.platform.http.HttpRequestResult; import com.alibaba.fastjson.JSONObject; -import org.apache.commons.lang3.time.DateUtils; import org.springframework.stereotype.Service; import org.springframework.web.bind.annotation.RequestMethod; import javax.annotation.Resource; import java.io.IOException; -import java.net.URISyntaxException; import java.util.ArrayList; import java.util.Date; import java.util.List; @@ -104,7 +101,7 @@ public class DatavServiceImpl implements DatavService { obj.put("moniker_longitude", customer.getString("longitude")); obj.put("moniker_latitude", customer.getString("latitude")); } - } catch (IOException | URISyntaxException e) { + } catch (IOException e) { e.printStackTrace(); } } diff --git a/src/main/java/au/com/royalpay/payment/manage/logview/core/impl/OperationLogServiceImpl.java b/src/main/java/au/com/royalpay/payment/manage/logview/core/impl/OperationLogServiceImpl.java index 0528e18c8..0e29be584 100644 --- a/src/main/java/au/com/royalpay/payment/manage/logview/core/impl/OperationLogServiceImpl.java +++ b/src/main/java/au/com/royalpay/payment/manage/logview/core/impl/OperationLogServiceImpl.java @@ -3,11 +3,9 @@ package au.com.royalpay.payment.manage.logview.core.impl; import au.com.royalpay.payment.manage.logview.core.OperationLogService; import au.com.royalpay.payment.manage.merchants.beans.mongo.ClientConfigLog; import au.com.royalpay.payment.manage.merchants.core.ClientManager; - import com.alibaba.fastjson.JSONObject; import com.github.miemiedev.mybatis.paginator.domain.PageBounds; import com.github.miemiedev.mybatis.paginator.domain.Paginator; - import org.apache.commons.lang3.StringUtils; import org.springframework.data.domain.PageRequest; import org.springframework.data.domain.Sort; @@ -16,9 +14,8 @@ import org.springframework.data.mongodb.core.query.Criteria; import org.springframework.data.mongodb.core.query.Query; import org.springframework.stereotype.Service; -import java.util.List; - import javax.annotation.Resource; +import java.util.List; /** * @author kira @@ -35,16 +32,16 @@ public class OperationLogServiceImpl implements OperationLogService { public JSONObject query(JSONObject params, PageBounds pageBounds) { if (StringUtils.isNotEmpty(params.getString("client_moniker"))) { JSONObject client = clientManager.getClientInfoByMoniker(params.getString("client_moniker")); - if(client!=null) { + if (client != null) { params.put("client_id", client.getIntValue("client_id")); } } Query query = new Query(); - query.with(new Sort(new Sort.Order(Sort.Direction.DESC,"createTime"))); + query.with(Sort.by(Sort.Direction.DESC, "createTime")); if (params.getIntValue("client_id") != 0) { query.addCriteria(Criteria.where("clientId").is(params.getIntValue("client_id"))); } - query.with(new PageRequest(pageBounds.getPage()-1, pageBounds.getLimit())); + query.with(PageRequest.of(pageBounds.getPage() - 1, pageBounds.getLimit())); query.addCriteria(Criteria.where("createTime").gt((params.getDate("begin"))).lt(params.getDate("end"))); List clientConfigLogList = mongoTemplate.find(query, ClientConfigLog.class); return buildPageListResult(clientConfigLogList, 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 82f4aa242..4b164c94a 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 @@ -78,6 +78,10 @@ public interface ClientMapper { @AdvanceSelect(addonWhereClause = "is_valid=1") List listChildClients(@Param("parent_client_id") int parentClientId); + @AutoSql(type = SqlType.SELECT) + @AdvanceSelect(addonWhereClause = "is_valid=1") + List listChildClients(@Param("parent_client_id") int parentClientId, PageBounds pagination); + @AutoSql(type = SqlType.UPDATE) void updateCleanDays(@Param("client_id") int clientId, @Param("clean_days") int cleanDays); diff --git a/src/main/java/au/com/royalpay/payment/manage/merchantid/core/impl/MerchantIdManageServiceImpl.java b/src/main/java/au/com/royalpay/payment/manage/merchantid/core/impl/MerchantIdManageServiceImpl.java index 0832bd737..c30c83d22 100644 --- a/src/main/java/au/com/royalpay/payment/manage/merchantid/core/impl/MerchantIdManageServiceImpl.java +++ b/src/main/java/au/com/royalpay/payment/manage/merchantid/core/impl/MerchantIdManageServiceImpl.java @@ -25,13 +25,14 @@ import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.cache.annotation.Cacheable; import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; import org.springframework.web.bind.annotation.RequestMethod; import javax.annotation.Resource; import java.io.IOException; -import java.net.URISyntaxException; -import java.util.*; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import java.util.Map; import java.util.stream.Collectors; /** @@ -166,11 +167,7 @@ public class MerchantIdManageServiceImpl implements MerchantIdManageService { param.put("sub_merchant_id",sub_merchant_id); String createUrl= PlatformEnvironment.getEnv().concatUrl("api/v1.0/gateway/partners/" + partner_code + "/orders/" + orderId +"/manager/test"+"?" + queryParams(partner_code)); HttpRequestResult result = null; - try { - result = new HttpRequestGenerator(createUrl, RequestMethod.PUT).setJSONEntity(param).execute(); - } catch (URISyntaxException e) { - e.printStackTrace(); - } + result = new HttpRequestGenerator(createUrl, RequestMethod.PUT).setJSONEntity(param).execute(); if (result.isSuccess()) { try { return result.getResponseContentJSONObj(); 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 5298c79c0..234519c17 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 @@ -126,7 +126,6 @@ import java.awt.image.BufferedImage; import java.io.*; import java.math.BigDecimal; import java.math.RoundingMode; -import java.net.URISyntaxException; import java.net.URL; import java.net.URLDecoder; import java.security.InvalidParameterException; @@ -830,7 +829,6 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid @Transactional public void updateClientRegisterInfo(JSONObject manager, String clientMoniker, ClientRegisterInfo info) { JSONObject client = getClientInfoByMoniker(clientMoniker); - Assert.notNull(client); checkOrgPermission(manager, client); JSONObject updateInfo = info.updateObject(); @@ -892,7 +890,6 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid @Transactional public void updateClientRegisterInfoV2(JSONObject manager, String clientMoniker, JSONObject info) { JSONObject client = getClientInfoByMoniker(clientMoniker); - Assert.notNull(client); checkOrgPermission(manager, client); int clientId = client.getIntValue("client_id"); @@ -1656,7 +1653,6 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid private JSONObject checkAndFindAccount(JSONObject manager, String clientMoniker, String accountId) { JSONObject account = clientAccountMapper.findById(accountId); - Assert.notNull(account); if (clientMoniker != null) { JSONObject client = getClientInfoByMoniker(clientMoniker); Assert.notNull(client); @@ -2072,15 +2068,17 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid throw new InvalidShortIdException(); } checkOrgPermission(manager, client); - JSONObject listSubClients = new JSONObject(); List listChildClients = clientMapper.listChildClients(client.getIntValue("client_id")); - for (JSONObject partner : listChildClients) { - List clients = clientMapper.listChildClients(partner.getIntValue("client_id")); - if (clients.size() > 0) { - partner.put("level3Clients", clients); - clients.forEach(e -> { - e.put("parent_client_moniker", partner.getString("client_moniker")); - }); + JSONObject mchConfig = merchantInfoProvider.getMchExtParams(client.getIntValue("client_id")); + if (!mchConfig.getBooleanValue("disable_level3_mch")) { + for (JSONObject partner : listChildClients) { + List clients = clientMapper.listChildClients(partner.getIntValue("client_id")); + if (clients.size() > 0) { + partner.put("level3Clients", clients); + clients.forEach(e -> { + e.put("parent_client_moniker", partner.getString("client_moniker")); + }); + } } } return listChildClients; @@ -2546,7 +2544,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid ous.flush(); IOUtils.closeQuietly(ous); } - } catch (URISyntaxException | IOException e) { + } catch (IOException e) { throw new ServerErrorException("Error", e); } } @@ -2565,7 +2563,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid ous.flush(); IOUtils.closeQuietly(ous); } - } catch (URISyntaxException | IOException e) { + } catch (IOException e) { throw new ServerErrorException("Error", e); } } @@ -2602,7 +2600,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid ImageUtils.drawImage(g, logoImg, 588, 1916, 2363, 960); } - } catch (URISyntaxException | IOException ignored) { + } catch (IOException ignored) { } } } @@ -2795,7 +2793,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid if (result.isSuccess()) { res = result.getResponseContentJSONObj(); } - } catch (URISyntaxException | IOException e) { + } catch (IOException e) { logger.error(e.getMessage(), e); } return res; @@ -3400,14 +3398,12 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid @Override public void disableClient(String clientMoniker, JSONObject manager) { JSONObject client = clientDetail(manager, clientMoniker); - Assert.notEmpty(client); clientModifySupport.processClientModify(new DisableModify(manager, clientMoniker, false)); } @Override public void revertClient(String clientMoniker, JSONObject manager) { JSONObject client = clientDetail(manager, clientMoniker); - Assert.notEmpty(client); clientModifySupport.processClientModify(new DisableModify(manager, clientMoniker, true)); } @@ -4716,7 +4712,6 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid @Override public void updateAppClient(JSONObject account, int client_id, AppClientBean appClientBean) { JSONObject client = getClientInfo(client_id); - Assert.notNull(client); JSONObject updateObj = appClientBean.updateObject(); if (updateObj.size() > 0) { updateObj.put("client_id", client_id); @@ -5838,7 +5833,6 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid @Override public void sendVerifyEmail(JSONObject client, String accountId) { JSONObject clientAccount = clientAccountMapper.findById(accountId); - Assert.notNull(clientAccount); simpleClientApplyService.sendVerifyEmail(client.getString("contact_email"), client.getIntValue("client_id"), clientAccount.getString("username")); } diff --git a/src/main/java/au/com/royalpay/payment/manage/notice/core/impls/MailServiceImp.java b/src/main/java/au/com/royalpay/payment/manage/notice/core/impls/MailServiceImp.java index fc3b70d66..2f273da61 100644 --- a/src/main/java/au/com/royalpay/payment/manage/notice/core/impls/MailServiceImp.java +++ b/src/main/java/au/com/royalpay/payment/manage/notice/core/impls/MailServiceImp.java @@ -11,13 +11,13 @@ import au.com.royalpay.payment.tools.exceptions.NotFoundException; import au.com.royalpay.payment.tools.exceptions.ServerErrorException; import au.com.royalpay.payment.tools.utils.PageListUtils; import au.com.royalpay.payment.tools.utils.id.IdUtil; - +import cn.yixblog.platform.http.HttpRequestGenerator; +import cn.yixblog.platform.http.HttpRequestResult; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import com.github.miemiedev.mybatis.paginator.domain.Order; import com.github.miemiedev.mybatis.paginator.domain.PageBounds; - import org.apache.commons.codec.digest.DigestUtils; import org.apache.commons.lang3.RandomStringUtils; import org.apache.commons.lang3.StringUtils; @@ -33,6 +33,7 @@ import org.springframework.stereotype.Service; import org.springframework.util.Assert; import org.springframework.web.bind.annotation.RequestMethod; +import javax.annotation.Resource; import java.io.IOException; import java.net.URISyntaxException; import java.nio.charset.StandardCharsets; @@ -40,11 +41,6 @@ import java.security.Key; import java.util.ArrayList; import java.util.List; -import javax.annotation.Resource; - -import cn.yixblog.platform.http.HttpRequestGenerator; -import cn.yixblog.platform.http.HttpRequestResult; - /** * Created by yishuqian on 18/01/2017. */ @@ -183,17 +179,13 @@ public class MailServiceImp implements MailService { noticeBean.setPassword(mailPwd); String postUrl = mailHost + "/mail/single?" + generateMailSignParam(); HttpRequestResult result = null; - try { - logger.info("===sendEmail===noticeBean:" + JSON.toJSON(noticeBean)); - result = new HttpRequestGenerator(postUrl, RequestMethod.POST).setJSONEntity(noticeBean).setTimeout(60_000).execute(); - if (result.isSuccess()) { - String mail_id = result.getResponseContentJSONObj().getString("mail_id"); - return mail_id; - //System.out.println("send Mail=============="+mail_id); - } else { - throw new ServerErrorException("Error Connection"); - } - } catch (URISyntaxException e) { + logger.info("===sendEmail===noticeBean:" + JSON.toJSON(noticeBean)); + result = new HttpRequestGenerator(postUrl, RequestMethod.POST).setJSONEntity(noticeBean).setTimeout(60_000).execute(); + if (result.isSuccess()) { + String mail_id = result.getResponseContentJSONObj().getString("mail_id"); + return mail_id; + //System.out.println("send Mail=============="+mail_id); + } else { throw new ServerErrorException("Error Connection"); } } @@ -219,17 +211,13 @@ public class MailServiceImp implements MailService { noticeBean.setPassword(mailPwd); String postUrl = mailHost + "/mail/single?" + generateMailSignParam(); HttpRequestResult result = null; - try { - logger.info("===sendEmail===noticeBean:" + JSON.toJSON(noticeBean)); - result = new HttpRequestGenerator(postUrl, RequestMethod.POST).setJSONEntity(noticeBean).setTimeout(60_000).execute(); - if (result.isSuccess()) { - String mail_id = result.getResponseContentJSONObj().getString("mail_id"); - return mail_id; - //System.out.println("send Mail=============="+mail_id); - } else { - throw new ServerErrorException("Error Connection"); - } - } catch (URISyntaxException e) { + logger.info("===sendEmail===noticeBean:" + JSON.toJSON(noticeBean)); + result = new HttpRequestGenerator(postUrl, RequestMethod.POST).setJSONEntity(noticeBean).setTimeout(60_000).execute(); + if (result.isSuccess()) { + String mail_id = result.getResponseContentJSONObj().getString("mail_id"); + return mail_id; + //System.out.println("send Mail=============="+mail_id); + } else { throw new ServerErrorException("Error Connection"); } } @@ -249,7 +237,7 @@ public class MailServiceImp implements MailService { } else { throw new ServerErrorException("Mail Service failed; status code=" + result.getStatusCode()); } - } catch (URISyntaxException | IOException e) { + } catch (IOException e) { throw new ServerErrorException("Mail Service failed", e); } @@ -305,17 +293,13 @@ public class MailServiceImp implements MailService { noticeBean.setAttachFiles(attachFiles); String postUrl = mailHost + "/mail/single?" + generateMailSignParam(); HttpRequestResult result = null; - try { - logger.info("===sendEmail===noticeBean:" + JSON.toJSON(noticeBean)); - result = new HttpRequestGenerator(postUrl, RequestMethod.POST).setJSONEntity(noticeBean).setTimeout(60_000).execute(); - if (result.isSuccess()) { - String mail_id = result.getResponseContentJSONObj().getString("mail_id"); - return mail_id; - //System.out.println("send Mail=============="+mail_id); - } else { - throw new ServerErrorException("Error Connection"); - } - } catch (URISyntaxException e) { + logger.info("===sendEmail===noticeBean:" + JSON.toJSON(noticeBean)); + result = new HttpRequestGenerator(postUrl, RequestMethod.POST).setJSONEntity(noticeBean).setTimeout(60_000).execute(); + if (result.isSuccess()) { + String mail_id = result.getResponseContentJSONObj().getString("mail_id"); + return mail_id; + //System.out.println("send Mail=============="+mail_id); + } else { throw new ServerErrorException("Error Connection"); } } @@ -350,17 +334,13 @@ public class MailServiceImp implements MailService { } String postUrl = mailHost + "/mail/single?" + generateMailSignParam(); HttpRequestResult result = null; - try { - logger.info("===sendEmail===noticeBean:" + JSON.toJSON(noticeBean)); - result = new HttpRequestGenerator(postUrl, RequestMethod.POST).setJSONEntity(noticeBean).setTimeout(60_000).execute(); - if (result.isSuccess()) { - String mail_id = result.getResponseContentJSONObj().getString("mail_id"); - return mail_id; - //System.out.println("send Mail=============="+mail_id); - } else { - throw new ServerErrorException("Error Connection"); - } - } catch (URISyntaxException e) { + logger.info("===sendEmail===noticeBean:" + JSON.toJSON(noticeBean)); + result = new HttpRequestGenerator(postUrl, RequestMethod.POST).setJSONEntity(noticeBean).setTimeout(60_000).execute(); + if (result.isSuccess()) { + String mail_id = result.getResponseContentJSONObj().getString("mail_id"); + return mail_id; + //System.out.println("send Mail=============="+mail_id); + } else { throw new ServerErrorException("Error Connection"); } } diff --git a/src/main/java/au/com/royalpay/payment/manage/ofei/core/impl/OfeiClientImpl.java b/src/main/java/au/com/royalpay/payment/manage/ofei/core/impl/OfeiClientImpl.java index 645afdd93..d8b9f391d 100644 --- a/src/main/java/au/com/royalpay/payment/manage/ofei/core/impl/OfeiClientImpl.java +++ b/src/main/java/au/com/royalpay/payment/manage/ofei/core/impl/OfeiClientImpl.java @@ -9,9 +9,9 @@ import au.com.royalpay.payment.tools.env.PlatformEnvironment; import au.com.royalpay.payment.tools.exceptions.BadRequestException; import au.com.royalpay.payment.tools.exceptions.ServerErrorException; import au.com.royalpay.payment.tools.fixing.FixedDocumentHelper; - +import cn.yixblog.platform.http.HttpRequestGenerator; +import cn.yixblog.platform.http.HttpRequestResult; import com.alibaba.fastjson.JSONObject; - import org.apache.commons.lang3.RandomStringUtils; import org.apache.commons.lang3.time.DateFormatUtils; import org.apache.http.NameValuePair; @@ -25,18 +25,9 @@ import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; import org.springframework.web.bind.annotation.RequestMethod; -import java.io.IOException; -import java.net.URISyntaxException; -import java.util.ArrayList; -import java.util.Date; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - import javax.annotation.Resource; - -import cn.yixblog.platform.http.HttpRequestGenerator; -import cn.yixblog.platform.http.HttpRequestResult; +import java.io.IOException; +import java.util.*; /** * Created by wangning on 2017/12/7. @@ -266,7 +257,7 @@ public class OfeiClientImpl implements OfeiClient { } else { throw new ChannelNetworkException(errMsg + "-->Network Error:" + res.getStatusCode()); } - } catch (URISyntaxException | DocumentException | IOException e) { + } catch (DocumentException | IOException e) { throw new ChannelNetworkException(errMsg + "-->Network Error", e); } } @@ -282,7 +273,7 @@ public class OfeiClientImpl implements OfeiClient { } else { throw new ChannelNetworkException(errMsg + "-->Network Error:" + res.getStatusCode()); } - } catch (URISyntaxException | IOException e) { + } catch (IOException e) { throw new ChannelNetworkException(errMsg + "-->Network Error", e); } diff --git a/src/main/java/au/com/royalpay/payment/manage/pos/datasource/ReadWriteSplitRoutingDataSource.java b/src/main/java/au/com/royalpay/payment/manage/pos/datasource/ReadWriteSplitRoutingDataSource.java index 1f3bc62a1..180e7c967 100644 --- a/src/main/java/au/com/royalpay/payment/manage/pos/datasource/ReadWriteSplitRoutingDataSource.java +++ b/src/main/java/au/com/royalpay/payment/manage/pos/datasource/ReadWriteSplitRoutingDataSource.java @@ -12,9 +12,7 @@ public class ReadWriteSplitRoutingDataSource extends AbstractRoutingDataSource { @Override public Object determineCurrentLookupKey() { - DbContextHolder.DbType dataSource = DbContextHolder.getDbType(); - logger.info("------------------当前数据源:{}---------------------",dataSource); - return dataSource; + return DbContextHolder.getDbType(); } } diff --git a/src/main/java/au/com/royalpay/payment/manage/posters/core/impls/PosterServiceImpl.java b/src/main/java/au/com/royalpay/payment/manage/posters/core/impls/PosterServiceImpl.java index a4a25e5a0..8ff68653e 100644 --- a/src/main/java/au/com/royalpay/payment/manage/posters/core/impls/PosterServiceImpl.java +++ b/src/main/java/au/com/royalpay/payment/manage/posters/core/impls/PosterServiceImpl.java @@ -11,7 +11,6 @@ import org.springframework.stereotype.Service; import org.springframework.web.bind.annotation.RequestMethod; import java.io.IOException; -import java.net.URISyntaxException; /** @@ -29,16 +28,12 @@ public class PosterServiceImpl implements PosterService { public void updatePoster(String imgUrl) { String url = cmsHost + "/api/statistics/count"; HttpRequestGenerator htg = new HttpRequestGenerator(url, RequestMethod.PUT); - try { - HttpRequestResult result = htg.addQueryString("imgUrl", imgUrl).execute(); - if (result.isSuccess()) { - int statusCode = result.getStatusCode(); - if (statusCode == 200) { - logger.info("CMS request succeeded"); - } + HttpRequestResult result = htg.addQueryString("imgUrl", imgUrl).execute(); + if (result.isSuccess()) { + int statusCode = result.getStatusCode(); + if (statusCode == 200) { + logger.info("CMS request succeeded"); } - } catch (URISyntaxException e) { - e.printStackTrace(); } } @@ -57,8 +52,6 @@ public class PosterServiceImpl implements PosterService { // final String s = result.getResponseContentString(); return obj; } - } catch (URISyntaxException e) { - e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } diff --git a/src/main/java/au/com/royalpay/payment/manage/tradelog/refund/impls/RefundServiceImpl.java b/src/main/java/au/com/royalpay/payment/manage/tradelog/refund/impls/RefundServiceImpl.java index 076947193..8512b1582 100644 --- a/src/main/java/au/com/royalpay/payment/manage/tradelog/refund/impls/RefundServiceImpl.java +++ b/src/main/java/au/com/royalpay/payment/manage/tradelog/refund/impls/RefundServiceImpl.java @@ -23,11 +23,9 @@ import au.com.royalpay.payment.tools.exceptions.ForbiddenException; import au.com.royalpay.payment.tools.permission.enums.PartnerRole; import au.com.royalpay.payment.tools.utils.CurrencyAmountUtils; import au.com.royalpay.payment.tools.utils.PageListUtils; - import com.alibaba.fastjson.JSONObject; import com.github.miemiedev.mybatis.paginator.domain.PageBounds; import com.github.miemiedev.mybatis.paginator.domain.PageList; - import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.context.ApplicationEventPublisher; @@ -35,12 +33,11 @@ import org.springframework.context.ApplicationEventPublisherAware; import org.springframework.stereotype.Service; import org.springframework.util.Assert; +import javax.annotation.Resource; import java.math.BigDecimal; import java.util.Date; import java.util.List; -import javax.annotation.Resource; - /** * Created by yixian on 2016-07-04. */ @@ -213,7 +210,7 @@ public class RefundServiceImpl implements RefundService, ApplicationEventPublish } private JSONObject executeRefund(String orderId, BigDecimal amount, String remark, JSONObject partnerAccount, JSONObject manager, JSONObject order, - JSONObject client) { + JSONObject client) { checkOrderUseCustomerCoupon(order, amount); JSONObject clientConfig = clientConfigService.find(client.getIntValue("client_id")); OperatorType type = partnerAccount != null ? OperatorType.PARTNER : OperatorType.MANAGER; @@ -222,7 +219,7 @@ public class RefundServiceImpl implements RefundService, ApplicationEventPublish int accountClientId = partnerAccount.getIntValue("client_id"); Assert.isTrue(accountClientId == client.getIntValue("client_id") || accountClientId == client.getIntValue("parent_client_id") - ||clientManager.listLevel3Client(accountClientId).contains(client.getIntValue("parent_client_id")), + || clientManager.listLevel3Client(accountClientId).contains(client.getIntValue("parent_client_id")), "This order is not belong to current merchant"); operator.put("operator_id", partnerAccount.getString("account_id")); operator.put("operator", partnerAccount.getString("display_name")); @@ -233,7 +230,7 @@ public class RefundServiceImpl implements RefundService, ApplicationEventPublish boolean requireAudit = type == OperatorType.PARTNER && PartnerRole.getRole(partnerAccount.getIntValue("role")) == PartnerRole.CASHIER && clientConfig.getBooleanValue("enable_refund_auth"); logger.debug("applyer type=" + type + "; require audit=" + requireAudit); - return paymentApi.refundOrder(orderId, null, amount, remark, operator, type, requireAudit); + return paymentApi.refundOrder(null, orderId, null, amount, remark, operator, type, requireAudit); } // 订单使用积分商城优惠券,仅支持全额退款 diff --git a/src/test/java/au/com/royalpay/payment/manage/apps/core/impls/CustomerImpressionImplTest.java b/src/test/java/au/com/royalpay/payment/manage/apps/core/impls/CustomerImpressionImplTest.java deleted file mode 100644 index 6d1c6a9ae..000000000 --- a/src/test/java/au/com/royalpay/payment/manage/apps/core/impls/CustomerImpressionImplTest.java +++ /dev/null @@ -1,628 +0,0 @@ -package au.com.royalpay.payment.manage.apps.core.impls; - -import au.com.royalpay.payment.manage.analysis.core.WeekReporter; -import au.com.royalpay.payment.manage.citypartner.core.CityPartnerPrizeService; -import au.com.royalpay.payment.manage.mappers.payment.OrderMapper; -import au.com.royalpay.payment.manage.mappers.system.ClientConfigMapper; -import au.com.royalpay.payment.manage.mappers.system.ClientMapper; -import au.com.royalpay.payment.manage.mappers.system.OrgMapper; -import au.com.royalpay.payment.manage.merchants.core.ClientManager; -import au.com.royalpay.payment.manage.notice.core.MailService; -import au.com.royalpay.payment.tools.mail.MailGunClient; -import au.com.royalpay.payment.tools.mail.SendMail; - -import com.alibaba.fastjson.JSONArray; -import com.alibaba.fastjson.JSONObject; - -import org.apache.commons.codec.binary.Base64; -import org.apache.commons.lang3.StringUtils; -import org.apache.commons.lang3.time.DateFormatUtils; -import org.apache.commons.lang3.time.DateUtils; -import org.apache.poi.hssf.usermodel.HSSFCell; -import org.apache.poi.ss.usermodel.Cell; -import org.apache.poi.ss.usermodel.CellStyle; -import org.apache.poi.ss.usermodel.Row; -import org.apache.poi.xssf.usermodel.XSSFSheet; -import org.apache.poi.xssf.usermodel.XSSFWorkbook; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.data.redis.core.BoundListOperations; -import org.springframework.data.redis.core.StringRedisTemplate; -import org.springframework.test.context.ActiveProfiles; -import org.springframework.test.context.junit4.SpringRunner; -import org.springframework.web.bind.annotation.RequestMethod; - -import java.io.File; -import java.io.FileInputStream; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.OutputStream; -import java.math.BigDecimal; -import java.net.URISyntaxException; -import java.nio.charset.Charset; -import java.text.ParseException; -import java.util.ArrayList; -import java.util.Date; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Iterator; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import javax.annotation.Resource; - -import cn.yixblog.platform.http.HttpRequestGenerator; -import cn.yixblog.platform.http.HttpRequestResult; - -/** - * Created by wangning on 05/01/2018. - */ -// @SpringBootTest -// @ActiveProfiles({ "local", "alipay", "wechat", "jd", "bestpay" }) -// @RunWith(SpringRunner.class) -public class CustomerImpressionImplTest { - @Resource - private OrderMapper orderMapper; - - @Resource - private StringRedisTemplate stringRedisTemplate; - @Resource - private ClientMapper clientMapper; - @Resource - private OrgMapper orgMapper; - @Resource - private MailGunClient mailGunClient; - @Resource - private ClientConfigMapper clientConfigMapper; - @Resource - private ClientManager clientManager; - - @Resource - private MailService mailService; - - @Resource - private WeekReporter weekReporter; - @Resource - private CityPartnerPrizeService cityPartnerPrizeService; - - @Test - public void redisQueue() { - BoundListOperations ops = stringRedisTemplate.boundListOps("customer_impression"); - JSONObject order = orderMapper.find("00009201711300930013961422"); - for (int i = 0; i < 10000; i++) { - ops.rightPush(order.toJSONString()); - - } - } - - @Test - public void excel1() { - try { - XSSFWorkbook workbook = new XSSFWorkbook(new FileInputStream(new File("/Users/wangning/Desktop/asd.xlsx"))); - XSSFSheet sheet = workbook.getSheetAt(0); - Iterator rowIterator = sheet.rowIterator(); - Row row = null; - Cell cell = null; - Map> result = new HashMap<>(); - while (rowIterator.hasNext()) { - row = rowIterator.next(); - cell = row.getCell(0); - cell.setCellType(HSSFCell.CELL_TYPE_STRING); - - String amount = cell.getStringCellValue().trim(); - cell = row.getCell(1); - cell.setCellType(HSSFCell.CELL_TYPE_STRING); - String dateStr = cell.getStringCellValue(); - - cell = row.getCell(2); - cell.setCellType(HSSFCell.CELL_TYPE_STRING); - String clientId = cell.getStringCellValue(); - - if (result.containsKey(clientId)) { - result.get(clientId).put(dateStr, amount); - } else { - Map ele = new HashMap<>(); - ele.put(dateStr, amount); - result.put(clientId, ele); - } - } - Set clients = new HashSet<>(); - - result.entrySet().parallelStream().forEach(p -> { - - p.getValue().entrySet().parallelStream().forEach(o -> { - BigDecimal insAvg = BigDecimal.valueOf(Double.valueOf(o.getValue())); - BigDecimal pastTotal = BigDecimal.ZERO; - for (int i = 1; i < 4; i++) { - if (i == 1) { - pastTotal = BigDecimal.ZERO; - } - try { - Date tmp = DateUtils.addMonths(DateUtils.parseDate(o.getKey(), "YYYYMM"), (-i + 1)); - String pastKey = String.valueOf(tmp.getYear() + 1900) + String.valueOf(tmp.getMonth()); - - if (p.getValue().containsKey(String.valueOf(pastKey))) { - BigDecimal pastAvgtmp = BigDecimal.valueOf(Double.parseDouble(p.getValue().get(String.valueOf(pastKey)))); - pastTotal = pastTotal.add(pastAvgtmp); - } else { - i = 10; - } - - if (i == 3) { - try { - BigDecimal pastAvg = pastTotal.divide(BigDecimal.valueOf(3L), 5, BigDecimal.ROUND_HALF_DOWN); - if (pastAvg.compareTo(BigDecimal.ZERO) > 0) { - if (insAvg.divide(pastAvg, 5, BigDecimal.ROUND_HALF_DOWN).intValue() > 3) { - clients.add(p.getKey()); - } - } - } catch (Exception ignore) { - - } - } - } catch (ParseException e) { - } - - } - - }); - }); - - clients.forEach(p -> { - System.out.println(p); - }); - System.out.println(clients.size()); - System.out.println(clients.size()); - System.out.println(clients.size()); - System.out.println(clients.size()); - System.out.println(clients.size()); - System.out.println(clients.size()); - System.out.println(clients.size()); - - OutputStream out = new FileOutputStream("/Users/wangning/Desktop/春节活动报名结果通知(包含BD名称).xlsx"); - workbook.write(out); - workbook.close(); - } catch (IOException e) { - e.printStackTrace(); - } - } - - @Test - public void excel2() { - try { - XSSFWorkbook workbook = new XSSFWorkbook(new FileInputStream(new File("/Users/wangning/Desktop/qwe.xlsx"))); - XSSFSheet sheet = workbook.getSheetAt(0); - Iterator rowIterator = sheet.rowIterator(); - Row row = null; - Cell cell = null; - Map> result = new HashMap<>(); - while (rowIterator.hasNext()) { - row = rowIterator.next(); - cell = row.getCell(3); - cell.setCellType(HSSFCell.CELL_TYPE_STRING); - String orders = cell.getStringCellValue().trim(); - - cell = row.getCell(1); - cell.setCellType(HSSFCell.CELL_TYPE_STRING); - String dateStr = cell.getStringCellValue(); - - cell = row.getCell(2); - cell.setCellType(HSSFCell.CELL_TYPE_STRING); - String clientId = cell.getStringCellValue(); - - if (result.containsKey(clientId)) { - result.get(clientId).put(dateStr, orders); - } else { - LinkedHashMap ele = new LinkedHashMap<>(); - ele.put(dateStr, orders); - result.put(clientId, ele); - } - } - Set clients = new HashSet<>(); - - for (Map.Entry> p : result.entrySet()) { - int count = 1; - for (Map.Entry o : p.getValue().entrySet()) { - count += 1; - for (int i = 1; i < 4; i++) { - if (p.getValue().size() < 4 && count == p.getValue().size()) { - try { - if (DateUtils.addMonths(DateUtils.parseDate(o.getKey(), "YYYYMM"), 3).compareTo(new Date()) < 0) { - clients.add(p.getKey()); - } - } catch (ParseException e) { - } - } - - Date tmp = null; - try { - tmp = DateUtils.addMonths(DateUtils.parseDate(o.getKey(), "YYYYMM"), i); - String pastKey = String.valueOf(tmp.getYear() + 1900) + String.valueOf(tmp.getMonth()); - if (p.getValue().containsKey(String.valueOf(pastKey))) { - i = 10; - } else { - if (i == 3 && (Integer.valueOf(o.getValue()) > 99)) { - clients.add(p.getKey()); - } - } - - } catch (ParseException e) { - e.printStackTrace(); - } - - } - - } - - } - - System.out.println(clients.size()); - System.out.println(clients.size()); - System.out.println(clients.size()); - System.out.println(clients.size()); - System.out.println(clients.size()); - System.out.println(clients.size()); - System.out.println(clients.size()); - - // OutputStream out = new FileOutputStream("/Users/wangning/Desktop/春节活动报名结果通知(包含BD名称).xlsx"); - // workbook.write(out); - workbook.close(); - } catch (IOException e) { - e.printStackTrace(); - } - } - - @Test - public void excel3() { - - List clients = clientMapper.listValidClient(); - Map clientMap = new HashMap<>(); - clients.parallelStream().forEach(p->{ - clientMap.put(p.getString("client_id"),p); - }); - try { - XSSFWorkbook workbook = new XSSFWorkbook(new FileInputStream(new File("/Users/wangning/Desktop/e4.xlsx"))); - XSSFSheet sheet = workbook.getSheetAt(0); - Iterator rowIterator = sheet.rowIterator(); - Row row = null; - Cell cell = null; - Map> result = new HashMap<>(); - while (rowIterator.hasNext()) { - row = rowIterator.next(); - cell = row.getCell(0); - cell.setCellType(HSSFCell.CELL_TYPE_STRING); - String orderCounts = cell.getStringCellValue().trim(); - - cell = row.getCell(1); - cell.setCellType(HSSFCell.CELL_TYPE_STRING); - String clientId = cell.getStringCellValue().trim(); - - cell = row.getCell(2); - cell.setCellType(HSSFCell.CELL_TYPE_STRING); - String dateStr = cell.getStringCellValue().trim(); - - if (result.containsKey(clientId)) { - result.get(clientId).put(dateStr, orderCounts); - } else { - LinkedHashMap ele = new LinkedHashMap<>(); - ele.put(dateStr, orderCounts); - result.put(clientId, ele); - } - } - Set resultClients = new HashSet<>(); - Date now = new Date(); - for (Map.Entry> p : result.entrySet()) { - JSONObject tmpClient = clientMap.get(p.getKey()); - if(tmpClient==null){ - continue; - } - if(DateUtils.addMonths(tmpClient.getDate("create_time"), 7).compareTo(now)>-1){ - continue; - } - for (Map.Entry o : p.getValue().entrySet()) { - LinkedHashMap resultEle = p.getValue(); - int compareCount = 0; - for (int i = 1; i < 7; i++) { - compareCount+=1; - if(DateUtils.addMonths(DateUtils.parseDate(o.getKey(), "YYYY-MM"), 7).compareTo(now)>-1){ - i=10; - continue; - } - Date compareDate = DateUtils.addMonths(DateUtils.parseDate(o.getKey(), "YYYY-MM"), i); - String compareKey = DateFormatUtils.format(compareDate,"YYYY-MM"); - if(resultEle.containsKey(compareKey)){ - i=10; - } - if(compareCount==6){ - resultClients.add(p.getKey()); - } - } - } - } - - - System.out.println("0---"+resultClients.size()); - - resultClients.forEach(p->{ - System.out.println(p); - }); - - - // OutputStream out = new FileOutputStream("/Users/wangning/Desktop/春节活动报名结果通知(包含BD名称).xlsx"); - // workbook.write(out); - workbook.close(); - } catch (Exception e) { - e.printStackTrace(); - } - } - - @Test - public void sendSimpleMessage() throws Exception { - String url = "https://api.mailgun.net/v3/dev.showcodes.com/messages?from=postmaster@mail.royalpay.com.au&to=164851225@qq.com,1029811920@qq.com&subject=啊是记录&text=暗杀苏&v:my-custom-data={\"key\":\"value\"}"; - String asd = "王宁测试标题"; - HttpRequestGenerator generator = new HttpRequestGenerator(url, RequestMethod.POST).addHeader("Authorization", getHeader()); - - HttpRequestResult res = null; - try { - res = generator.execute(); - } catch (URISyntaxException e) { - e.printStackTrace(); - } - System.out.println(res.getException()); - System.out.println(); - System.out.println(); - - try { - System.out.println(res.getResponseContentJSONObj().toJSONString()); - } catch (IOException e) { - e.printStackTrace(); - } - } - - @Test - public void sendSimeMessage() throws Exception { - String url = "https://api.mailgun.net/v3/dev.showcodes.com/events"; - HttpRequestGenerator generator = new HttpRequestGenerator(url, RequestMethod.POST).addHeader("Authorization", getHeader()); - - generator.addQueryString("ascending", "yes"); - generator.addQueryString("v:my-custom-data", "123456789"); - generator.addQueryString("limit", "12"); - System.out.println(String.valueOf(DateUtils.addDays(new Date(), 1))); - HttpRequestResult res = null; - try { - res = generator.execute(); - } catch (URISyntaxException e) { - e.printStackTrace(); - } - System.out.println(res.getException()); - System.out.println(); - System.out.println(); - - try { - System.out.println(res.getResponseContentJSONObj().toJSONString()); - } catch (IOException e) { - e.printStackTrace(); - } - } - - private String getHeader() { - String auth = "api:key-96fa3b5866ace125b8ec5a9d27e19353"; - byte[] encodedAuth = Base64.encodeBase64(auth.getBytes(Charset.forName("UTF-8"))); - String authHeader = "Basic " + new String(encodedAuth); - return authHeader; - } - - @Test - public void sendSimpleMessages() throws Exception { - SendMail sendMail = new SendMail(); - sendMail.setFrom("info@mail.royalpay.com.au"); - sendMail.setContent("

Hi

"); - List list = new ArrayList<>(); - list.add("testTag"); - // sendMail.setTags(list); - Set mailCCs = new HashSet<>(); - mailCCs.add("asd1159111@163.com"); - sendMail.setMailCcs(mailCCs); - Set mailtos = new HashSet<>(); - mailtos.add("eason.qian@royalpay.com.au"); - sendMail.setMailTos(mailtos); - sendMail.setTitle("Final Test"); - - JSONObject result = mailGunClient.sendMail(sendMail); - System.out.println(result.toJSONString()); - System.out.println(result.toJSONString()); - System.out.println(result.toJSONString()); - } - - @Test - public void asd() { - JSONObject client = clientMapper.findClient(9); - JSONObject var = new JSONObject(); - var.put("client_moniker", client.getString("client_moniker")); - var.put("short_name", client.getString("short_name")); - JSONObject result = mailGunClient.addListMember(client.getString("contact_email"), "merchants@mail.royalpay.com.au", client.getString("contact_person"), - "", var); - } - - @Test - public void fd() { - List asd12eq = new ArrayList<>(); - asd12eq.add("9"); - JSONObject asd = clientManager.getByEmail("164851225@qq.com", 1, 1, asd12eq); - JSONArray qwe = asd.getJSONArray("data"); - System.out.println(asd.getJSONArray("data")); - System.out.println(qwe); - System.out.println(asd); - System.out.println(asd); - System.out.println(asd); - } - - @Test - public void addMailUnsub() { - try { - XSSFWorkbook workbook = new XSSFWorkbook(new FileInputStream(new File("/Users/wangning/Desktop/asd.xlsx"))); - XSSFSheet sheet = workbook.getSheetAt(0); - Iterator rowIterator = sheet.rowIterator(); - Row row = null; - Cell cell = null; - - while (rowIterator.hasNext()) { - row = rowIterator.next(); - cell = row.getCell(1); - if (cell == null) { - continue; - } - cell.setCellType(HSSFCell.CELL_TYPE_STRING); - CellStyle cellStyle = cell.getCellStyle(); - if (cellStyle.getFillForegroundColor() == 0) { - continue; - } - String clientMonikers = cell.getStringCellValue().trim(); - if (clientMonikers.contains("/")) { - String[] clientMonikerArr = clientMonikers.split("/"); - for (String s : clientMonikerArr) { - String tmp = s.trim().toUpperCase(); - if (tmp.length() > 4 || tmp.length() == 0) { - continue; - } - mailService.addUnsub(s.trim().toUpperCase()); - } - } else { - String tmp = clientMonikers.trim().toUpperCase(); - if (tmp.length() > 4 || tmp.length() == 0) { - continue; - } - mailService.addUnsub(clientMonikers.trim().toUpperCase()); - } - } - } catch (IOException e) { - e.printStackTrace(); - } - } - - @Test - public void zxc() { - weekReporter.generateReport("2018-06-04", false); - } - - @Test - public void royalpayIndustryTransform() { - String json = "[\n" + " {\n" + " \"children\": [\n" + " {\n" + " \"children\": [],\n" + " \"label\": \"机票\",\n" - + " \"mccCode\": \"10001\"\n" + " },\n" + " {\n" + " \"children\": [],\n" + " \"label\": \"旅游行业\",\n" - + " \"mccCode\": \"10002\"\n" + " },\n" + " {\n" + " \"children\": [],\n" + " \"label\": \"私人定制旅游\",\n" - + " \"mccCode\": \"10003\"\n" + " },\n" + " {\n" + " \"children\": [],\n" + " \"label\": \"租车\",\n" - + " \"mccCode\": \"10004\"\n" + " },\n" + " {\n" + " \"children\": [],\n" + " \"label\": \"巴士\",\n" - + " \"mccCode\": \"10005\"\n" + " }\n" + " ],\n" + " \"label\": \"旅游出行\",\n" + " \"mccCode\": \"1\"\n" + " },\n" + " {\n" - + " \"children\": [\n" + " {\n" + " \"children\": [],\n" + " \"label\": \"饭店\",\n" + " \"mccCode\": \"20001\"\n" - + " },\n" + " {\n" + " \"children\": [],\n" + " \"label\": \"奶茶店\",\n" + " \"mccCode\": \"20002\"\n" - + " },\n" + " {\n" + " \"children\": [],\n" + " \"label\": \"烧烤\",\n" + " \"mccCode\": \"20003\"\n" - + " },\n" + " {\n" + " \"children\": [],\n" + " \"label\": \"火锅\",\n" + " \"mccCode\": \"20004\"\n" - + " },\n" + " {\n" + " \"children\": [],\n" + " \"label\": \"Coffee\",\n" + " \"mccCode\": \"20005\"\n" - + " },\n" + " {\n" + " \"children\": [],\n" + " \"label\": \"酒吧\",\n" + " \"mccCode\": \"20006\"\n" + " }\n" - + " ],\n" + " \"label\": \"餐饮\",\n" + " \"mccCode\": \"2\"\n" + " },\n" + " {\n" + " \"children\": [\n" + " {\n" - + " \"children\": [],\n" + " \"label\": \"培训类\",\n" + " \"mccCode\": \"30001\"\n" + " },\n" + " {\n" - + " \"children\": [],\n" + " \"label\": \"移民留学\",\n" + " \"mccCode\": \"30002\"\n" + " },\n" + " {\n" - + " \"children\": [],\n" + " \"label\": \"私人幼儿园\",\n" + " \"mccCode\": \"30003\"\n" + " }\n" + " ],\n" - + " \"label\": \"教育\",\n" + " \"mccCode\": \"3\"\n" + " },\n" + " {\n" + " \"children\": [\n" + " {\n" - + " \"children\": [],\n" + " \"label\": \"换汇\",\n" + " \"mccCode\": \"40001\"\n" + " },\n" + " {\n" - + " \"children\": [],\n" + " \"label\": \"房产\",\n" + " \"mccCode\": \"40002\"\n" + " }\n" + " ],\n" - + " \"label\": \"商务咨询\",\n" + " \"mccCode\": \"4\"\n" + " },\n" + " {\n" + " \"children\": [\n" + " {\n" - + " \"children\": [],\n" + " \"label\": \"公众号服务商\",\n" + " \"mccCode\": \"50001\"\n" + " },\n" + " {\n" - + " \"children\": [],\n" + " \"label\": \"各种媒体类宣传\",\n" + " \"mccCode\": \"50002\"\n" + " }\n" + " ],\n" - + " \"label\": \"传媒\",\n" + " \"mccCode\": \"5\",\n" - + " \"value\": \"{\\\"category\\\":\\\"SERVICE\\\",\\\"code\\\":\\\"7542\\\",\\\"description\\\":\\\"Car Washes\\\",\\\"parentCode\\\":\\\"S10\\\"}\"\n" - + " },\n" + " {\n" + " \"children\": [\n" + " {\n" + " \"children\": [],\n" + " \"label\": \"美容院\",\n" - + " \"mccCode\": \"60001\"\n" + " },\n" + " {\n" + " \"children\": [],\n" + " \"label\": \"医疗美容\",\n" - + " \"mccCode\": \"60002\"\n" + " }\n" + " ],\n" + " \"label\": \"医美\",\n" + " \"mccCode\": \"6\"\n" + " },\n" + " {\n" - + " \"children\": [\n" + " {\n" + " \"label\": \"超市\",\n" + " \"mccCode\": \"70001\"\n" + " },\n" + " {\n" - + " \"children\": [],\n" + " \"label\": \"服装店\",\n" + " \"mccCode\": \"70002\"\n" + " },\n" + " {\n" - + " \"children\": [],\n" + " \"label\": \"鞋店\",\n" + " \"mccCode\": \"70003\"\n" + " },\n" + " {\n" - + " \"children\": [],\n" + " \"label\": \"珠宝店\",\n" + " \"mccCode\": \"70004\"\n" + " },{\n" - + " \"children\": [],\n" + " \"label\": \"箱包\",\n" + " \"mccCode\": \"70005\"\n" + " }\n" + " ],\n" - + " \"label\": \"零售\",\n" + " \"mccCode\": \"7\"\n" + " },\n" + " {\n" + " \"children\": [\n" + " {\n" - + " \"children\": [],\n" + " \"label\": \"桌游吧\",\n" + " \"mccCode\": \"80001\"\n" + " },\n" + " {\n" - + " \"children\": [],\n" + " \"label\": \"演唱会\",\n" + " \"mccCode\": \"80002\"\n" + " },\n" + " {\n" - + " \"children\": [],\n" + " \"label\": \"马术训练\",\n" + " \"mccCode\": \"80003\"\n" + " },\n" + " {\n" - + " \"children\": [],\n" + " \"label\": \"瑜伽\",\n" + " \"mccCode\": \"80004\"\n" + " },\n" + " {\n" - + " \"children\": [],\n" + " \"label\": \"健身\",\n" + " \"mccCode\": \"80005\"\n" + " },\n" + " {\n" - + " \"children\": [],\n" + " \"label\": \"社团\",\n" + " \"mccCode\": \"80006\"\n" + " },\n" + " {\n" - + " \"children\": [],\n" + " \"label\": \"网吧\",\n" + " \"mccCode\": \"80007\"\n" + " },\n" + " {\n" - + " \"children\": [],\n" + " \"label\": \"KTV\",\n" + " \"mccCode\": \"80008\"\n" + " },\n" + " {\n" - + " \"children\": [],\n" + " \"label\": \"电影\",\n" + " \"mccCode\": \"80009\"\n" + " }\n" + " ],\n" - + " \"label\": \"休闲娱乐\",\n" + " \"mccCode\": \"8\"\n" + " },\n" + " {\n" + " \"children\": [\n" + " {\n" - + " \"children\": [],\n" + " \"label\": \"摄影\",\n" + " \"mccCode\": \"90001\"\n" + " },\n" + " {\n" - + " \"children\": [],\n" + " \"label\": \"massage\",\n" + " \"mccCode\": \"90002\"\n" + " },\n" + " {\n" - + " \"children\": [],\n" + " \"label\": \"通讯运营商\",\n" + " \"mccCode\": \"90003\"\n" + " },\n" + " {\n" - + " \"children\": [],\n" + " \"label\": \"车行\",\n" + " \"mccCode\": \"90004\"\n" + " },\n" + " {\n" - + " \"children:\":[],\n" + " \"label\":\"软件服务\",\n" + " \"mccCode\":\"90005\"\n" + " }\n" + " ],\n" - + " \"label\": \"其他服务类\",\n" + " \"mccCode\": \"9\"\n" + " },\n" + " {\n" + " \"children\": [\n" + " {\n" - + " \"children\": [],\n" + " \"label\": \"Hotel\",\n" + " \"mccCode\": \"100001\"\n" + " },\n" + " {\n" - + " \"children\": [],\n" + " \"label\": \"Motel\",\n" + " \"mccCode\": \"100002\"\n" + " }\n" + " ],\n" - + " \"label\": \"酒店\",\n" + " \"mccCode\": \"10\"\n" + " },\n" + " {\n" + " \"children\": [\n" + " {\n" - + " \"children\": [],\n" + " \"label\": \"代购\",\n" + " \"mccCode\": \"110001\"\n" + " },\n" + " {\n" - + " \"children\": [],\n" + " \"label\": \"物流(大宗出口贸易)\",\n" + " \"mccCode\": \"110002\"\n" + " },\n" + " {\n" - + " \"children\": [],\n" + " \"label\": \"红酒出口\",\n" + " \"mccCode\": \"110003\"\n" + " },\n" + " {\n" - + " \"children\": [],\n" + " \"label\": \"综合电商\",\n" + " \"mccCode\": \"110004\"\n" + " }\n" + " ],\n" - + " \"label\": \"出口贸易\",\n" + " \"mccCode\": \"11\"\n" + " },\n" + " {\n" + " \"children\": [\n" + " {\n" - + " \"children\": [],\n" + " \"label\": \"建材\",\n" + " \"mccCode\": \"120001\"\n" + " },\n" + " {\n" - + " \"children\": [],\n" + " \"label\": \"家居\",\n" + " \"mccCode\": \"120002\"\n" + " }\n" + " ],\n" - + " \"label\": \"家居建材\",\n" + " \"mccCode\": \"12\"\n" + " }\n" + "]"; - - JSONArray jsonArray = JSONObject.parseArray(json); - - try { - XSSFWorkbook workbook = new XSSFWorkbook(new FileInputStream(new File("/Users/wangning/Desktop/asd.xlsx"))); - XSSFSheet sheet = workbook.getSheetAt(0); - Iterator rowIterator = sheet.rowIterator(); - Row row = null; - Cell cell = null; - while (rowIterator.hasNext()) { - row = rowIterator.next(); - cell = row.getCell(2); - if (cell == null) { - continue; - } - cell.setCellType(HSSFCell.CELL_TYPE_STRING); - String industryChinese = recursionIndustry(jsonArray, cell.getStringCellValue()); - cell.setCellValue(industryChinese); - - } - OutputStream out = new FileOutputStream("/Users/wangning/Desktop/qwe.xlsx"); - workbook.write(out); - workbook.close(); - } catch (IOException e) { - e.printStackTrace(); - } - } - - public String recursionIndustry(JSONArray jsonArray, String mccCode) { - String result = ""; - for (Object o : jsonArray) { - if (StringUtils.isNotEmpty(result)) { - break; - } - JSONObject tmp = (JSONObject) o; - if (tmp.getString("mccCode").equals(mccCode)) { - result = tmp.getString("label"); - } else { - if (tmp.getJSONArray("children") != null) { - result = recursionIndustry(tmp.getJSONArray("children"), mccCode); - } else { - result = ""; - } - } - } - return result; - - - } - - @Test - public void zxcs(){ - cityPartnerPrizeService.generateSenior("2018-02"); - } - -} \ No newline at end of file diff --git a/src/test/java/au/com/royalpay/payment/manage/valid/JPinYinTest.java b/src/test/java/au/com/royalpay/payment/manage/valid/JPinYinTest.java index cef5a20dd..bd427757c 100644 --- a/src/test/java/au/com/royalpay/payment/manage/valid/JPinYinTest.java +++ b/src/test/java/au/com/royalpay/payment/manage/valid/JPinYinTest.java @@ -6,6 +6,7 @@ import au.com.royalpay.payment.tools.codec.AESCrypt; import au.com.royalpay.payment.tools.encryptalgorithm.SignUtils; import com.alibaba.fastjson.JSONObject; import com.github.stuxuhai.jpinyin.PinyinException; +import org.apache.commons.codec.digest.DigestUtils; import org.apache.commons.net.util.Base64; import org.junit.Test; @@ -62,4 +63,14 @@ public class JPinYinTest { System.err.println(SignUtils.decData(aesData, rsa1_pri)); } + + + + @Test + public void testhash(){ + String hash = DigestUtils.sha256Hex("customer&xxnpdBRwd4sIaCCI&1575949279241&/api/sso/manager_sign_in").toLowerCase(); + String hash2 = DigestUtils.sha256Hex("customer&xxnpdBRwd4sIaCCI&1575950092568&/api/sso/manager_sign_in&119.28.3.196").toLowerCase(); + System.err.println(hash); + System.err.println(hash2); + } } From 246ef08ab8fc128aaf51b809e10a9d9a11865d26 Mon Sep 17 00:00:00 2001 From: luoyang Date: Thu, 6 Feb 2020 09:36:03 +0800 Subject: [PATCH 4/8] =?UTF-8?q?1.3.24=20=E5=A2=9E=E5=8A=A0surcharge=5Frate?= =?UTF-8?q?=20=E5=AD=97=E6=AE=B5=EF=BC=8C=E5=90=8E=E7=BB=AD=E6=9C=AA?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 2 +- .../manage/appclient/core/impls/RetailRSvcServiceImpl.java | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index ba4d16666..bd14ee9e8 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ 4.0.0 manage - 1.3.23 + 1.3.24 UTF-8 1.4.0 diff --git a/src/main/java/au/com/royalpay/payment/manage/appclient/core/impls/RetailRSvcServiceImpl.java b/src/main/java/au/com/royalpay/payment/manage/appclient/core/impls/RetailRSvcServiceImpl.java index 535275a01..f3b570abb 100644 --- a/src/main/java/au/com/royalpay/payment/manage/appclient/core/impls/RetailRSvcServiceImpl.java +++ b/src/main/java/au/com/royalpay/payment/manage/appclient/core/impls/RetailRSvcServiceImpl.java @@ -15,6 +15,8 @@ import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.parser.Feature; import org.apache.commons.lang3.StringUtils; import org.apache.commons.net.util.Base64; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.stereotype.Service; import javax.annotation.Resource; @@ -25,6 +27,7 @@ import java.util.UUID; @Service public class RetailRSvcServiceImpl implements RetailRSvcService { + private Logger logger = LoggerFactory.getLogger(getClass()); @Resource private ClientManager clientManager; @@ -65,6 +68,7 @@ public class RetailRSvcServiceImpl implements RetailRSvcService { result.put("timestamp", System.currentTimeMillis()); result = JSONObject.parseObject(JSON.toJSONString(result), Feature.OrderedField); result.put("sign", SignUtils.buildSign(result.toJSONString(), svcInfo.getString("platform_pri_key"))); + logger.info("svc [{}] info:{}", sourceCode, result.toJSONString()); return result; } @@ -96,6 +100,7 @@ public class RetailRSvcServiceImpl implements RetailRSvcService { serviceApply.put("client_id", client.getIntValue("client_id")); serviceApply.put("title", params.getString("signData")); serviceApply.put("amount", decData(params.getString("signPrice"), key, svcInfo.getString("platform_pri_key"))); + serviceApply.put("surcharge_rate", decData(params.getString("signRate"), key, svcInfo.getString("platform_pri_key"))); serviceApply.put("apply_username", params.getString("signName")); serviceApply.put("status", 0); serviceApply.put("is_valid", 1); From 5b1bb5d48cfb65f0bfe85ad0a4b4204d5ede63a0 Mon Sep 17 00:00:00 2001 From: "taylor.dang" Date: Thu, 6 Feb 2020 12:23:45 +0800 Subject: [PATCH 5/8] remove redpack mp --- .../payment/manage/merchants/web/PartnerViewController.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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 8ef0ad00c..95fec7103 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 @@ -13,7 +13,6 @@ import au.com.royalpay.payment.manage.permission.manager.RequirePartner; import au.com.royalpay.payment.manage.pos.datasource.ReadOnlyConnection; import au.com.royalpay.payment.manage.signin.core.SignInAccountService; import au.com.royalpay.payment.manage.support.wechatclients.KangaLandWechatApiImpl; -import au.com.royalpay.payment.manage.support.wechatclients.RedpackWechatApiImpl; import au.com.royalpay.payment.manage.system.core.ClientContractService; import au.com.royalpay.payment.manage.tradelog.beans.TradeLogQuery; import au.com.royalpay.payment.manage.tradelog.core.TradeLogService; @@ -248,7 +247,7 @@ public class PartnerViewController { } @WechatMapping(value = "/wechat_bind/{randomKey}", method = RequestMethod.GET, oauthType = WxOauthType.USERINFO, - addonMp = {KangaLandWechatApiImpl.class, RedpackWechatApiImpl.class}) + addonMp = {KangaLandWechatApiImpl.class}) public String bindWechatUser(@PathVariable String randomKey, @ModelAttribute(CommonConsts.WECHATINFO) JSONObject user, Model model) { clientManager.bindWechatUser(randomKey, user, model); return "wechat_bind"; From 1f20c0f34ea6f744891c9a51f401e2f983a301cc Mon Sep 17 00:00:00 2001 From: yixian Date: Thu, 6 Feb 2020 15:00:03 +0800 Subject: [PATCH 6/8] =?UTF-8?q?=E6=B8=85=E7=AE=97=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E5=90=88=E5=B9=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../clearing/core/impl/CleanServiceImpl.java | 78 ++++++++++++++++++- .../mappers/log/ClearingDetailMapper.xml | 43 ++++++---- 2 files changed, 101 insertions(+), 20 deletions(-) diff --git a/src/main/java/au/com/royalpay/payment/manage/management/clearing/core/impl/CleanServiceImpl.java b/src/main/java/au/com/royalpay/payment/manage/management/clearing/core/impl/CleanServiceImpl.java index 32d66a4e0..7f1cb41ec 100644 --- a/src/main/java/au/com/royalpay/payment/manage/management/clearing/core/impl/CleanServiceImpl.java +++ b/src/main/java/au/com/royalpay/payment/manage/management/clearing/core/impl/CleanServiceImpl.java @@ -36,6 +36,7 @@ import au.com.royalpay.payment.tools.utils.PageListUtils; import au.com.royalpay.payment.tools.utils.TimeZoneUtils; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONException; import com.alibaba.fastjson.JSONObject; import com.github.miemiedev.mybatis.paginator.domain.Order; import com.github.miemiedev.mybatis.paginator.domain.PageBounds; @@ -325,6 +326,7 @@ public class CleanServiceImpl implements CleanService, ManagerTodoNoticeProvider String filename = "Merchant_Settlement_Info_" + dateString + RandomStringUtils.random(8, false, true) + ".csv"; zos.putNextEntry(new ZipEntry(filename)); List details = clearingDetailMapper.listReportsOfSettlement(log.getIntValue("clearing_id")); + details = mergeBatchSettleClients(details); byte[] csv = generateSettleCSVFile(dt, details); IOUtils.write(csv, zos); } @@ -369,6 +371,7 @@ public class CleanServiceImpl implements CleanService, ManagerTodoNoticeProvider logger.info("using newest version test"); for (JSONObject log : logs) { List details = clearingDetailMapper.listReportsOfSettlement(log.getIntValue("clearing_id")); + details = mergeBatchSettleClients(details); exportAllBankXlsFiles(zos, details, log.getDate("operate_time")); } zos.flush(); @@ -400,7 +403,9 @@ public class CleanServiceImpl implements CleanService, ManagerTodoNoticeProvider String filename = "Merchant_Settlement_Info_" + DateFormatUtils.format(dt, "yyyyMMdd") + "_" + fileIndex + ".xlsx"; JSONObject file = new JSONObject(); file.put("name", filename); - file.put("byteArr", generateSettleXlsxFile(dt, clearingDetailMapper.listReportsOfSettlement(log.getIntValue("clearing_id")), bank)); + List details = clearingDetailMapper.listReportsOfSettlement(log.getIntValue("clearing_id")); + details = mergeBatchSettleClients(details); + file.put("byteArr", generateSettleXlsxFile(dt, details, bank)); result.add(file); fileIndex++; } @@ -409,7 +414,9 @@ public class CleanServiceImpl implements CleanService, ManagerTodoNoticeProvider String filename = "Merchant_Settlement_Info_" + DateFormatUtils.format(dt, "yyyyMMdd") + ".xlsx"; JSONObject file = new JSONObject(); file.put("name", filename); - file.put("byteArr", generateSettleXlsxFile(dt, clearingDetailMapper.listReportsOfSettlement(log.getIntValue("clearing_id")), bank)); + List details = clearingDetailMapper.listReportsOfSettlement(log.getIntValue("clearing_id")); + details = mergeBatchSettleClients(details); + file.put("byteArr", generateSettleXlsxFile(dt, details, bank)); result.add(file); } } @@ -417,6 +424,67 @@ public class CleanServiceImpl implements CleanService, ManagerTodoNoticeProvider return result; } + private List mergeBatchSettleClients(List details) { + Map> sameBankDetails = details.stream() + .filter(this::detailEnabledMergeSettle) + .collect(Collectors.groupingBy(this::detailGroupingId)); + List mergedSettleDetails = sameBankDetails.values().stream() + .map(this::mergeDetailGroup).collect(Collectors.toList()); + List relatedDetailIds = sameBankDetails.values().stream() + .flatMap(group -> group.stream().map(detail -> detail.getInteger("clear_detail_id"))) + .collect(Collectors.toList()); + details.removeIf(detail -> relatedDetailIds.contains(detail.getInteger("clear_detail_id"))); + details.addAll(mergedSettleDetails); + return details; + } + + private JSONObject mergeDetailGroup(List details) { + JSONObject first = details.get(0); + int clientId = details.stream().map(detail -> detail.getInteger("parent_client_id")) + .filter(Objects::nonNull) + .findAny().orElse(first.getIntValue("client_id")); + JSONObject cli = clientManager.getClientInfo(clientId); + String moniker = cli.getString("client_moniker"); + String bsb = first.getString("bsb_no"); + String accountNo = first.getString("account_no"); + String accountName = first.getString("account_name"); + String settleBank = first.getString("settle_bank"); + BigDecimal clearingAmount = details.stream().map(detail -> detail.getBigDecimal("clearing_amount")) + .reduce(BigDecimal::add).orElse(BigDecimal.ZERO); + JSONObject merged = new JSONObject(); + merged.put("client_id", clientId); + merged.put("client_moniker", moniker); + merged.put("bsb_no", bsb); + merged.put("account_no", accountNo); + merged.put("account_name", accountName); + merged.put("settle_bank", settleBank); + merged.put("clearing_amount", clearingAmount); + return merged; + } + + private String detailGroupingId(JSONObject detail) { + String cliPId = detail.getString("parent_client_id"); + if (cliPId == null) { + cliPId = detail.getString("client_id"); + } + String bsb = detail.getString("bsb_no"); + String accountNo = detail.getString("account_no"); + return String.join("_", cliPId, bsb, accountNo); + } + + private boolean detailEnabledMergeSettle(JSONObject detail) { + String extParams = detail.getString("ext_params"); + if (extParams != null) { + try { + JSONObject ext = JSON.parseObject(extParams); + return ext.getBooleanValue("merge_settle"); + } catch (JSONException e) { + return false; + } + } + return false; + } + @Override public List getAba(Date dt, String bank) { List logs = clearingLogMapper.findByDate(dt); @@ -427,6 +495,7 @@ public class CleanServiceImpl implements CleanService, ManagerTodoNoticeProvider List files = new ArrayList<>(); for (JSONObject log : logs) { List details = clearingDetailMapper.listReportsOfSettlement(log.getIntValue("clearing_id")); + details = mergeBatchSettleClients(details); files.addAll(generateSettleAbaFiles(dt, details, log.getDate("operate_time"))); } return files.stream().filter(file -> bank.equals(file.bank())).collect(Collectors.toList()); @@ -447,7 +516,7 @@ public class CleanServiceImpl implements CleanService, ManagerTodoNoticeProvider row.createCell(0, Cell.CELL_TYPE_STRING).setCellValue(settle.getString("bsb_no")); row.createCell(1, Cell.CELL_TYPE_STRING).setCellValue(settle.getString("account_no")); row.createCell(2, Cell.CELL_TYPE_STRING).setCellValue(settle.getString("account_name")); - row.createCell(3, Cell.CELL_TYPE_STRING).setCellValue(settle.getBigDecimal("clearing_amount").setScale(2, BigDecimal.ROUND_DOWN).toPlainString()); + row.createCell(3, Cell.CELL_TYPE_STRING).setCellValue(settle.getBigDecimal("clearing_amount").setScale(2, RoundingMode.DOWN).toPlainString()); } ByteArrayOutputStream bos = new ByteArrayOutputStream(); wb.write(bos); @@ -466,6 +535,7 @@ public class CleanServiceImpl implements CleanService, ManagerTodoNoticeProvider for (JSONObject log : logs) { List details = clearingDetailMapper.listReportsOfSettlement(log.getIntValue("clearing_id")); + details = mergeBatchSettleClients(details); files.addAll(generateSettleAbaFiles(dt, details, log.getDate("operate_time"))); } OutputStream ous = resp.getOutputStream(); @@ -502,6 +572,7 @@ public class CleanServiceImpl implements CleanService, ManagerTodoNoticeProvider throw new NotFoundException("Clearing batch " + batchId + " not found"); } List details = clearingDetailMapper.listReportsOfSettlement(clearingId); + details = mergeBatchSettleClients(details); Date settleDate = clearing.getDate("settle_date"); Date opTime = clearing.getDate("operate_time"); String zipName = "Merchant_Settlement_Info_" + DateFormatUtils.format(opTime, "yyyyMMddHHmmss") + "_all.zip"; @@ -1214,6 +1285,7 @@ public class CleanServiceImpl implements CleanService, ManagerTodoNoticeProvider String defaultBank = config.getRemainsTo(); clearingDetailMapper.updateAllBanks(defaultBank, clearingId); List details = clearingDetailMapper.listReportsOfSettlement(clearingId); + details = mergeBatchSettleClients(details); details.sort((log1, log2) -> { if (StringUtils.equals(defaultBank, log1.getString("account_bank")) == StringUtils.equals(defaultBank, log2.getString("account_bank"))) { diff --git a/src/main/resources/au/com/royalpay/payment/manage/mappers/log/ClearingDetailMapper.xml b/src/main/resources/au/com/royalpay/payment/manage/mappers/log/ClearingDetailMapper.xml index 473d41a81..cd6d3e435 100644 --- a/src/main/resources/au/com/royalpay/payment/manage/mappers/log/ClearingDetailMapper.xml +++ b/src/main/resources/au/com/royalpay/payment/manage/mappers/log/ClearingDetailMapper.xml @@ -2,28 +2,34 @@ - update log_clearing_detail set settle_bank=#{settle_bank} where clearing_id=#{clearing_id} + update log_clearing_detail + set settle_bank=#{settle_bank} + where clearing_id = #{clearing_id} + SELECT count(1) + FROM org_sign_info + where gateway_short_id = #{codes}; + + diff --git a/src/main/resources/i18n/msg_zh.properties b/src/main/resources/i18n/msg_zh.properties index 14d573c35..88fd110a1 100644 --- a/src/main/resources/i18n/msg_zh.properties +++ b/src/main/resources/i18n/msg_zh.properties @@ -1,6 +1,6 @@ msg.test=测试 -error.payment.valid.param_missing=请填写{0} +error.payment.valid.param_missing= {0} 请填写 error.payment.valid.invalid_time=时间格式不正确 error.payment.valid.invalid_channel=不合法的支付通道 error.payment.valid.invalid_fee=不正确的金额 diff --git a/src/main/ui/static/config/organizations/organizations.js b/src/main/ui/static/config/organizations/organizations.js index 5a09e8e70..b144fb176 100644 --- a/src/main/ui/static/config/organizations/organizations.js +++ b/src/main/ui/static/config/organizations/organizations.js @@ -542,8 +542,68 @@ define(['angular', 'uiRouter', 'uiBootstrap'], function (angular) { $scope.listManagers(); }) } + $scope.gateway_sign = {}; + $scope.gateway_sign.platform_public_key = $scope.org.platform_public_key; + $scope.gateway_sign.org_id = $scope.org.org_id; + $scope.gateway_sign.mch_public_key = $scope.org.mch_public_key; + + $scope.refreshPlatformPubliKey = function () { + $uibModal.open({ + templateUrl: '/static/payment/partner/templates/partner_refresh_platform_public_key_dialog.html', + controller: 'clientRefreshPlatformPublicKeyDialogCtrl', + backdrop: false, + size: 'lg', + resolve: { + gateway_sign: function () { + return $scope.gateway_sign; + } + } + }).result.then(function () { + commonDialog.alert({ + title: 'Success!', + content: 'RoyalPay Public Key Refresh Successfully', + type: 'success' + }) + $state.reload(); + }) + }; + $scope.resetPartnerPubliKey = function () { + $uibModal.open({ + templateUrl: '/static/payment/partner/templates/partner_reset_public_key_dialog.html', + controller: 'clientResetPartnerPublicKeyDialogCtrl', + backdrop: false, + size: 'lg', + resolve: { + gateway_sign: function () { + return $scope.gateway_sign; + } + } + }).result.then(function () { + commonDialog.alert({ + title: 'Success!', + content: 'Partner Public Key Upload Successfully', + type: 'success' + }) + $state.reload(); + }) + }; + $scope.refreshMerchantCode = function () { + commonDialog.confirm({ + title: 'Confirm', + content: 'This operation will refresh the gateway short id, Are you sure?' + }).then(function () { + $http.get('/sys/orgs/' + $scope.org.org_id + '/init/merchant_code').then(function (response) { + commonDialog.alert({title: 'Success', content: "Gateway Short Id Refresh Successfully", type: 'success'}) + $scope.org.gateway_short_id = response.data.partner_code; + }, function (resp) { + commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'}) + }); + }) + }; }]); app.controller('orgDetailParentCtrl', ['$scope', '$http', '$state', 'Upload', '$uibModal','commonDialog', 'org','stateMap', function ($scope, $http, $state, Upload,$uibModal,commonDialog, org,stateMap) { + $scope.merchantCodeChecked = true; + $scope.merchantIsValid = true; $scope.types = angular.copy(types); $scope.states = stateMap.configs(); $scope.commission_types = angular.copy(commission_types); @@ -589,62 +649,96 @@ define(['angular', 'uiRouter', 'uiBootstrap'], function (angular) { commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'}) }) }; -/* - $scope.toggleRateEditable = function () { - if($scope.org.rate_editable==org.data.rate_editable){ - return; - } - $http.put('/sys/orgs/'+$scope.org.org_id+'/enable_change_rate',{enabled:$scope.org.rate_editable}).then(function () { + $scope.gateway_sign = {}; + $scope.gateway_sign.platform_public_key = $scope.org.platform_public_key; + $scope.gateway_sign.org_id = $scope.org.org_id; + $scope.gateway_sign.mch_public_key = $scope.org.mch_public_key; - },function (resp) { - commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'}); - }) - }; - - $scope.search = {role:'1111111'}; - $scope.listManagers = function () { - $http.get('/sys/manager_accounts',{params:{org_id:$scope.org.org_id}}).then(function (resp) { - $scope.managers = resp.data; + $scope.refreshPlatformPubliKey = function () { + $uibModal.open({ + templateUrl: '/static/payment/partner/templates/partner_refresh_platform_public_key_dialog.html', + controller: 'clientRefreshPlatformPublicKeyDialogCtrl', + backdrop: false, + size: 'lg', + resolve: { + gateway_sign: function () { + return $scope.gateway_sign; + } + } + }).result.then(function () { + commonDialog.alert({ + title: 'Success!', + content: 'RoyalPay Public Key Refresh Successfully', + type: 'success' + }) + $state.reload(); }) }; - - $scope.listManagers(); - $scope.modifyManager = function (manager) { + $scope.resetPartnerPubliKey = function () { $uibModal.open({ - templateUrl: '/static/config/managers/templates/modify.html', - controller: 'modifyManagerCtrl', + templateUrl: '/static/payment/partner/templates/partner_reset_public_key_dialog.html', + controller: 'clientResetPartnerPublicKeyDialogCtrl', + backdrop: false, + size: 'lg', resolve: { - manager: function () { - return angular.copy(manager); + gateway_sign: function () { + return $scope.gateway_sign; } } }).result.then(function () { - $scope.listManagers(); + commonDialog.alert({ + title: 'Success!', + content: 'Org Public Key Upload Successfully', + type: 'success' + }) + $state.reload(); }) }; - $scope.disableManager = function (manager) { + $scope.refreshMerchantCode = function () { commonDialog.confirm({ - title: 'Confirm!', - content: 'You are setting manager ' + manager.display_name + ' disabled.Are you sure?' + title: 'Confirm', + content: 'This operation will refresh the gateway short id, Are you sure?' }).then(function () { - $http.delete('/sys/manager_accounts/' + manager.manager_id).then(function () { - $scope.listManagers(); + $http.get('/sys/orgs/' + $scope.org.org_id + '/init/merchant_code').then(function (response) { + commonDialog.alert({title: 'Success', content: "Gateway Short Id Refresh Successfully", type: 'success'}) + $scope.org.gateway_short_id = response.data.partner_code; }, function (resp) { commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'}) - }) + }); }) }; - $scope.newManager = function () { - $uibModal.open({ - templateUrl: '/static/config/managers/templates/new_manager.html', - controller: 'newManagerCtrl', - resolve: { - org: angular.copy($scope.org) - } - }).result.then(function () { - $scope.listManagers(); + }]); + app.controller('clientResetPartnerPublicKeyDialogCtrl', ['$scope', '$http', 'gateway_sign', function ($scope, $http, gateway_sign) { + $scope.gateway_sign = angular.copy(gateway_sign); + $scope.uploadPublicKey = function (mch_public_key) { + $scope.errmsg = null; + $http.put('/sys/orgs/' + $scope.gateway_sign.org_id + '/partner_public_key', {partner_public_key: mch_public_key}).then(function () { + $scope.$close(); + }, function (resp) { + $scope.errmsg = resp.data.message; }) - }*/ + } + }]); + app.controller('clientRefreshPlatformPublicKeyDialogCtrl', ['$scope', '$http', 'gateway_sign', 'commonDialog', function ($scope, $http, gateway_sign, commonDialog) { + $scope.gateway_sign = angular.copy(gateway_sign); + $scope.copyPublicKey = function () { + var e = document.getElementById("c-cpKey"); + e.select(); + var successful = document.execCommand("Copy"); + if (successful) { + commonDialog.alert({title: 'Success', content: '已复制到剪切板!', type: 'success'}); + } else { + commonDialog.alert({title: 'Error', content: '您的浏览器不支持!请手动复制', type: 'error'}); + } + }; + $scope.refreshPublicKey = function () { + $scope.errmsg = null; + $http.put('/sys/orgs/' + $scope.gateway_sign.org_id + '/refresh_platform_public_key').then(function () { + $scope.$close(); + }, function (resp) { + $scope.errmsg = resp.data.message; + }) + } }]); app.controller('newOrgCtrl', ['$scope', '$http', '$state', 'Upload', 'commonDialog','stateMap', function ($scope, $http, $state, Upload, commonDialog,stateMap) { $scope.types = angular.copy(types); @@ -711,7 +805,6 @@ define(['angular', 'uiRouter', 'uiBootstrap'], function (angular) { }) }; }]); - app.controller('modifyManagerCtrl', ['$scope', '$http', 'manager', function ($scope, $http, manager) { $scope.manager = manager; $scope.isOrgModify = true; @@ -815,4 +908,4 @@ define(['angular', 'uiRouter', 'uiBootstrap'], function (angular) { } }); return app; -}); \ No newline at end of file +}); diff --git a/src/main/ui/static/config/organizations/templates/org_detail.html b/src/main/ui/static/config/organizations/templates/org_detail.html index df2f98844..af53d7d00 100644 --- a/src/main/ui/static/config/organizations/templates/org_detail.html +++ b/src/main/ui/static/config/organizations/templates/org_detail.html @@ -440,6 +440,36 @@ + +
+
+ +
+

+ {{org.gateway_short_id||'初始化'}} + +

+
+
+
+ + +
+
+ + +
+
+
diff --git a/src/main/ui/static/config/organizations/templates/org_detail_parent.html b/src/main/ui/static/config/organizations/templates/org_detail_parent.html index 67d929ab0..138178412 100644 --- a/src/main/ui/static/config/organizations/templates/org_detail_parent.html +++ b/src/main/ui/static/config/organizations/templates/org_detail_parent.html @@ -432,6 +432,36 @@ + +
+
+ +
+

+ {{org.gateway_short_id||'初始化'}} + +

+
+
+
+ + +
+
+ + +
+
+
@@ -516,4 +546,4 @@ --> - \ No newline at end of file + 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 c24de99b6..54ff61fe9 100644 --- a/src/main/ui/static/payment/partner/templates/partner_detail.html +++ b/src/main/ui/static/payment/partner/templates/partner_detail.html @@ -43,7 +43,7 @@

- + (Gateway API) Date: Mon, 10 Feb 2020 17:22:12 +0800 Subject: [PATCH 8/8] =?UTF-8?q?fix=20revert=20api=20doc=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/document/cn/apis.js | 212 ---------------------------------------- src/document/en/apis.js | 211 --------------------------------------- 2 files changed, 423 deletions(-) diff --git a/src/document/cn/apis.js b/src/document/cn/apis.js index 2dcd8697f..6d2d28a08 100644 --- a/src/document/cn/apis.js +++ b/src/document/cn/apis.js @@ -1099,218 +1099,6 @@ * @apiError (ERROR_CODE) ORDER_MISMATCH 订单号与商户不匹配 * */ - -/** - * @api {POST} /api/v1.0/gateway/partners/{gateway_short_id}/merchant/application 商户进件接口 - * @apiName application_merchant - * @apiDescription - * 提交商户信息进件接口。签名详细说明:商户进件签名说明文档 - * - * @apiVersion 1.0.0 - * @apiGroup Merchant - * @apiHeader Accept application/json - * @apiHeader Content-Type application/json - * @apiParam (PathVariable) {String(14)} gateway_short_id 必填,代理网关编码,由10-14位大写字母或数字构成(RoyalPay代理后台生成) - * - * @apiParam (JSON) {String(50)} apply_id 必填,RoyalPay管理账号用户名Username - * @apiParam (JSON) {String(4)} parent_partner_code 选填,父商户编码,填写后会自动关联商户关系 - * @apiParam (JSON) {String(200)} notify_url 选填,审核结果通知url,详见审核通知api,不填则不会推送审核通知 - * @apiParam (JSON) {JSON} company_info 必填,商户公司主体信息 - * @apiParam (JSON) {JSON} contact_info 必填,商户联系人信息 - * @apiParam (JSON) {JSON} legal_info 必填,商户法人信息 - * @apiParam (JSON) {JSON} pay_info 必填,商户支付信息 - * @apiParam (JSON) {JSON} settle_info 必填,商户清算信息 - * @apiParam (JSON) {JSON} compliance_file_info 必填,商户合规文件信息 - * - * @apiParam (COMPANY_SUB_JSON) {String(100)} company_name 必填,公司名称 - * @apiParam (COMPANY_SUB_JSON) {String(50)} short_name 必填,公司简称 - * @apiParam (COMPANY_SUB_JSON) {String(15)} store_name 必填,店铺名称 - * @apiParam (COMPANY_SUB_JSON) {String(100)} business_name 选填,企业名称 - * @apiParam (COMPANY_SUB_JSON) {String(100)=Association,Company,Government body,Partnership,Registered body(Sole Trader),Trust} business_structure 必填,企业结构类型 - * @apiParam (COMPANY_SUB_JSON) {String(20)} abn 选填,如果business_structure非Company时必填 - * @apiParam (COMPANY_SUB_JSON) {String(9)} acn 选填,如果business_structure为Company时必填(acn为9位数字) - * @apiParam (COMPANY_SUB_JSON) {String(15)} company_phone 必填,公司服务电话 - * @apiParam (COMPANY_SUB_JSON) {String(200)} logo_url 必填,公司logo图片url(图片需使用文件上传接口上传至服务器) - * - * @apiParam (CONTACT_SUB_JSON) {String(50)} contact_person 必填,公司联系人姓名 - * @apiParam (CONTACT_SUB_JSON) {String(15)} contact_phone 必填,公司联系人电话 - * @apiParam (CONTACT_SUB_JSON) {String(50)} contact_email 必填,公司联系人邮箱 - * @apiParam (CONTACT_SUB_JSON) {String(50)} contact_job 必填,公司联系人工作职位 - * @apiParam (CONTACT_SUB_JSON) {String(200)} address 必填,公司所在地址 - * @apiParam (CONTACT_SUB_JSON) {String(50)} suburb 必填,公司所在区域 - * @apiParam (CONTACT_SUB_JSON) {String(10)} postcode 必填,公司所在区域邮编 - * @apiParam (CONTACT_SUB_JSON) {String(20)=ACT,NSW,NT,QLD,SA,TAS,VIC,WA,OTHER} state 必填,公司所在州 - * @apiParam (CONTACT_SUB_JSON) {String(20)} country=AUS 必填,公司所在国家 - * @apiParam (CONTACT_SUB_JSON) {String(200)} registered_address 必填,公司注册地址(可与公司所在地址相同) - * @apiParam (CONTACT_SUB_JSON) {String(50)} registered_suburb 必填,公司注册区域(可与公司所在区域相同) - * @apiParam (CONTACT_SUB_JSON) {String(10)} registered_postcode 必填,公司注册所在区域邮编(可与公司所在区域邮编相同) - * @apiParam (CONTACT_SUB_JSON) {String(20)=ACT,NSW,NT,QLD,SA,TAS,VIC,WA,OTHER} registered_state 必填,公司注册所在州(可与公司所在州相同) - * @apiParam (CONTACT_SUB_JSON) {String(30)=Australia/West,Australia/Eucla,Australia/North,Australia/South,Australia/Brisbane,Australia/Melbourne,Australia/LHI} timezone 必填,公司所在时区 - * - * @apiParam (LEGAL_SUB_JSON) {String(50)} legal_representative_person 必填,公司法人姓名(可与公司联系人相同) - * @apiParam (LEGAL_SUB_JSON) {String(15)} legal_representative_phone 必填,公司法人联系电话(可与公司联系人电话相同) - * @apiParam (LEGAL_SUB_JSON) {String(50)} legal_representative_email 必填,公司法人联系邮件(可与公司联系人邮件相同) - * @apiParam (LEGAL_SUB_JSON) {String(50)} legal_representative_job 必填,公司法人职位(可与公司联系人工作职位相同) - * - * @apiParam (PAY_SUB_JSON) {int[]=1,2} client_pay_type 必填,公司支付场景(可多选) 例:1,2 - *
  • 1:线上支付
  • - *
  • 2:线下支付
  • - * @apiParam (PAY_SUB_JSON) {int[]} client_pay_desc 必填,公司支付场景描述(可多选) 例:101,102,105,202,203,20306 - *
  • 101:PC网站
  • - *
  • 102:手机端网站
  • - *
  • 103:APP
  • - *
  • 104:微信内、支付宝内网站
  • - *
  • 105:小程序
  • - *
  • 201:二维码立牌
  • - *
  • 202:RoyalPay POS
  • - *
  • 203:收银系统
  • - *
  • 204:无人售货机
  • - *
  • 20301:ipos
  • - *
  • 20302:pospal
  • - *
  • 20303:Lotus
  • - *
  • 20304:AoShangBao
  • - *
  • 20305:Infinity
  • - *
  • 20306:EasyCloud
  • - *
  • 20307:Aus Post
  • - *
  • 20308:AoMaiKe
  • - *
  • 20399:其他
  • - * @apiParam (PAY_SUB_JSON) {String(10)} royalpay_industry 必填,RoyalPay行业编码,详情见行业编码对照表:行业编码对照表 - * @apiParam (PAY_SUB_JSON) {String(10)} wechat_industry 必填,微信行业编码,详情见行业编码对照表:行业编码对照表 - * @apiParam (PAY_SUB_JSON) {String(10)} alipay_industry 必填,支付宝行业编码,详情见行业编码对照表:行业编码对照表 - * @apiParam (PAY_SUB_JSON) {String(200)} company_photo 选填,公司照片url,如果支付场景为线下必填 - * @apiParam (PAY_SUB_JSON) {String(200)} store_photo 选填,门店照片url,如果支付场景为线下必填 - * @apiParam (PAY_SUB_JSON) {String(200)} company_website 选填,公司网站url,如果支付场景为线上必填 - * - * @apiParam (SETTLE_SUB_JSON) {String(12)} swift_code 必填,银行代码 - * @apiParam (SETTLE_SUB_JSON) {String(6)} bsb_no 必填,BSB号码 - * @apiParam (SETTLE_SUB_JSON) {String(100)} bank 必填,银行编码 - * @apiParam (SETTLE_SUB_JSON) {String(30)} city 必填,银行所在城市 - * @apiParam (SETTLE_SUB_JSON) {String(100)} address 必填,银行所在地址 - * @apiParam (SETTLE_SUB_JSON) {String(20)} system 必填,银行系统 - * @apiParam (SETTLE_SUB_JSON) {String(20)} postcode 必填,银行邮编 - * @apiParam (SETTLE_SUB_JSON) {String(30)} state 必填,银行所在州 - * @apiParam (SETTLE_SUB_JSON) {String(100)} branch 必填,银行分行 - * @apiParam (SETTLE_SUB_JSON) {String(20)} account_no 必填,银行账户编号 - * @apiParam (SETTLE_SUB_JSON) {String(50)} account_name 必填,银行账户名称 - * @apiParam (SETTLE_SUB_JSON) {int=1,2,3} clean_days 必填,清算周期:t+1,t+2,t+3 - * @apiParam (SETTLE_SUB_JSON) {Double} wechat_rate 必填,微信清算费率(2=2%,1.5=1.5%) - * @apiParam (SETTLE_SUB_JSON) {Double} alipay_rate 必填,支付宝清算费率(2=2%,1.5=1.5%) - * @apiParam (SETTLE_SUB_JSON) {Double} alipay_online_rate 必填,支付宝线上清算费率(2=2%,1.5=1.5%) - * @apiParam (SETTLE_SUB_JSON) {Double} transaction_fee=0 必填,交易手续费 - * @apiParam (SETTLE_SUB_JSON) {Date} active_time 必填,生效时间必须早于当日,格式化:'yyyy-mm-dd HH:mm:ss' - * @apiParam (SETTLE_SUB_JSON) {Date} expire_time 必填,过期时间,格式化:'yyyy-mm-dd HH:mm:ss' - * - * @apiParam (COMPLIANCE_SUB_JSON) {String(200)} id_file 必填,公司负责人ID文件,上传驾照或护照,推荐上传公司直接受益人ID文件,如提供公司其他负责人ID文件需要描述原因(文件需使用文件上传接口上传至服务器) - * * @apiParam (COMPLIANCE_SUB_JSON) {String=passport,driver_license} id_type 必填,上传id文件的类型 - *
  • passport:护照
  • - *
  • driver_license:驾照
  • - * @apiParam (COMPLIANCE_SUB_JSON) {String='Ultimate beneficiary owner','CEO','Director','General Manager','Other'} id_title 必填,id文件人的职位 - * @apiParam (COMPLIANCE_SUB_JSON) {String(200)} id_title_description 选填,未提供公司直接受益人ID文件的原因 - * @apiParam (COMPLIANCE_SUB_JSON) {String(200)} bank_statement 必填,银行结单文件url(文件需使用文件上传接口上传至服务器) - * @apiParam (COMPLIANCE_SUB_JSON) {String(200)} certificate_of_registration 必填,公司注册文件url(文件需使用文件上传接口上传至服务器) - * @apiParam (COMPLIANCE_SUB_JSON) {String(200)} utility_bill 选填,公司水电煤账单文件url(文件需使用文件上传接口上传至服务器) - * - * @apiSuccess {JSON} data 返回参数 - * @apiSuccess {String} sign 返回签名 - * - * @apiSuccess (SUB_JSON) {String} partner_code 商户编码 - * @apiSuccess (SUB_JSON) {String='PASS','PROCESSING','REFUSED'} partner_status 商户审核状态:PASS,PROCESSING,REFUSED - * @apiSuccess (SUB_JSON) {String} company_name 商户企业名称 - * @apiSuccess (SUB_JSON) {String} credential_code 商户开发者密钥 - * @apiSuccess (SUB_JSON) {String} short_name 商户简称 - * @apiSuccess (SUB_JSON) {String} sign_type=RSA2 签名加密方式 - * @apiSuccess (SUB_JSON) {String} nonce_str 随机字符串 - * @apiSuccess (SUB_JSON) {String} url 接口url - * - * @apiError (ERROR) return_code Error Code - * @apiError (ERROR) return_msg Error Description - * @apiUse MerchantError - * @apiError (ERROR_CODE) PARAM_INVALID 参数不符合要求,具体细节可参考return_msg字段 - * - */ -/** - * @api {GET} /api/v1.0/gateway/partners/{gateway_short_id}/merchant/{partner_code}/status 商户状态查询接口 - * @apiName query_merchant - * @apiDescription - * 查询商户审核状态及商户简要信息。签名详细说明:商户进件签名说明文档 - * - * @apiVersion 1.0.0 - * @apiGroup Merchant - * @apiHeader Accept multipart/form-data - * @apiHeader Content-Type multipart/form-data - * @apiParam (PathVariable) {String(14)} gateway_short_id 必填,代理网关编码,由10-14位大写字母或数字构成(RoyalPay代理后台生成) - * - * @apiSuccess {JSON} data 返回参数 - * @apiSuccess {String} sign 返回签名 - * - * @apiSuccess (SUB_JSON) {String} partner_code 商户编码 - * @apiSuccess (SUB_JSON) {String='PASS','PROCESSING','REFUSED'} partner_status 商户审核状态:PASS,PROCESSING,REFUSED - * @apiSuccess (SUB_JSON) {String} company_name 商户企业名称 - * @apiSuccess (SUB_JSON) {String} credential_code 商户开发者密钥 - * @apiSuccess (SUB_JSON) {String} short_name 商户简称 - * @apiSuccess (SUB_JSON) {String} sign_type=RSA2 签名加密方式 - * @apiSuccess (SUB_JSON) {String} nonce_str 随机字符串 - * @apiSuccess (SUB_JSON) {String} url 接口url - * - * @apiError (ERROR) return_code Error Code - * @apiError (ERROR) return_msg Error Description - * @apiUse MerchantError - * @apiError (ERROR_CODE) INVALID_SHORT_ID 商户编码不合法或没有对应商户 - * - */ -/** - * @api {POST} /api/v1.0/gateway/partners/{gateway_short_id}/attachment/files 图片、文件上传 - * @apiName update_file - * @apiDescription - * 上传图片、文件接口,可用于上传商户logo、公司照片、店铺照片、银行文件。如图片过大建议压缩后上传,签名详细说明:商户进件签名说明文档 - * - * @apiVersion 1.0.0 - * @apiGroup Merchant - * @apiHeader Accept application/json - * @apiHeader Content-Type application/json - * @apiParam (PathVariable) {String(14)} gateway_short_id 必填,代理网关编码,由10-14位大写字母或数字构成(RoyalPay代理后台生成) - * - * @apiParam (BINARY) {binary} file 文件数据流 - * - * @apiSuccess {JSON} data 返回参数 - * @apiSuccess {String} sign 返回签名 - * - * @apiSuccess (SUB_JSON) {String} file_type 文件类型 - * @apiSuccess (SUB_JSON) {String} file_url 文件网络url - * @apiSuccess (SUB_JSON) {String} original_filename 文件原名称 - * @apiSuccess (SUB_JSON) {String} sign_type=RSA2 签名加密方式 - * @apiSuccess (SUB_JSON) {String} nonce_str 随机字符串 - * @apiSuccess (SUB_JSON) {String} url 接口url - * - * @apiError (ERROR) return_code Error Code - * @apiError (ERROR) return_msg Error Description - * @apiUse MerchantError - * - */ -/** - * @api {POST} /notify_url 商户审核状态通知 - * @apiName merchant_notice - * @apiGroup Merchant - * @apiVersion 1.0.0 - * @apiDescription - * 若商户进件时提供了notify_url,系统会在商户审核状态改变后向这个地址主动发送商户审核结束状态推送,请求方式为POST - * 与服务器API不同,推送校验参数会包含在json内,商户系统应该验证校验参数,确定来源正确后再进行后续操作。 - * @apiHeader Accept application/json - * @apiHeader Content-Type application/json - * @apiSuccess {JSON} data 返回参数 - * @apiSuccess {String} sign 返回签名 - * - * @apiSuccess (SUB_JSON) {String} partner_code 商户编码 - * @apiSuccess (SUB_JSON) {String='PASS','PROCESSING','REFUSED'} partner_status 商户审核状态:PASS,PROCESSING,REFUSED - * @apiSuccess (SUB_JSON) {String} company_name 商户企业名称 - * @apiSuccess (SUB_JSON) {String} credential_code 商户开发者密钥 - * @apiSuccess (SUB_JSON) {String} short_name 商户简称 - * @apiSuccess (SUB_JSON) {String} sign_type=RSA2 签名加密方式 - * @apiSuccess (SUB_JSON) {String} nonce_str 随机字符串 - * @apiSuccess (SUB_JSON) {String} url 商户进件notify_url - * - * @apiSuccess {String} return_code SUCCESS - */ function apis() { } diff --git a/src/document/en/apis.js b/src/document/en/apis.js index 52613f5f6..ed523570b 100644 --- a/src/document/en/apis.js +++ b/src/document/en/apis.js @@ -1116,217 +1116,6 @@ * @apiError (ERROR_CODE) ORDER_MISMATCH Order is not belong to this partner * */ -/** - * @api {POST} /api/v1.0/gateway/partners/{gateway_short_id}/merchant/application Merchant Application - * @apiName application_merchant - * @apiDescription - * Submit merchant information。Signature details:Merchant signature documentation - * - * @apiVersion 1.0.0 - * @apiGroup Merchant - * @apiHeader Accept application/json - * @apiHeader Content-Type application/json - * @apiParam (PathVariable) {String(14)} gateway_short_id Required,gateway short id,Consists of 10-14 digits of capital letters or Numbers (generated by the RoyalPay) - * - * @apiParam (JSON) {String(50)} apply_id Required,RoyalPay Admin account Username - * @apiParam (JSON) {String(4)} parent_partner_code Optional,parent partner code,After filling in, it will automatically associate the merchant relationship - * @apiParam (JSON) {String(200)} notify_url Optional,System will call the notify url if provided when the merchant audit is complete - * @apiParam (JSON) {JSON} company_info Required,Main information of merchant company - * @apiParam (JSON) {JSON} contact_info Required,Merchant contact information - * @apiParam (JSON) {JSON} legal_info Required,Merchant legal person information - * @apiParam (JSON) {JSON} pay_info Required,Merchant payment information - * @apiParam (JSON) {JSON} settle_info Required,Merchant settlement information - * @apiParam (JSON) {JSON} compliance_file_info Required,Merchant compliance file information - * - * @apiParam (COMPANY_SUB_JSON) {String(100)} company_name Required,Company name - * @apiParam (COMPANY_SUB_JSON) {String(50)} short_name Required,Company short name - * @apiParam (COMPANY_SUB_JSON) {String(15)} store_name Required,Store name - * @apiParam (COMPANY_SUB_JSON) {String(100)} business_name Optional,Business name - * @apiParam (COMPANY_SUB_JSON) {String(100)=Association,Company,Government body,Partnership,Registered body(Sole Trader),Trust} business_structure Required,Business structure - * @apiParam (COMPANY_SUB_JSON) {String(20)} abn Optional,If business_structure is not a Company, this is required - * @apiParam (COMPANY_SUB_JSON) {String(9)} acn Optional,If business_structure is Company, it must be filled in (acn is 9 digits) - * @apiParam (COMPANY_SUB_JSON) {String(15)} company_phone Required,company phone - * @apiParam (COMPANY_SUB_JSON) {String(200)} logo_url Required,Company logo url (the image should be uploaded to the server through the file upload api) - * - * @apiParam (CONTACT_SUB_JSON) {String(50)} contact_person Required,Company contact person - * @apiParam (CONTACT_SUB_JSON) {String(15)} contact_phone Required,Company contact phone - * @apiParam (CONTACT_SUB_JSON) {String(50)} contact_email Required,Company contact email - * @apiParam (CONTACT_SUB_JSON) {String(50)} contact_job Required,Company contact person job - * @apiParam (CONTACT_SUB_JSON) {String(200)} address Required,address - * @apiParam (CONTACT_SUB_JSON) {String(50)} suburb Required,suburb - * @apiParam (CONTACT_SUB_JSON) {String(10)} postcode Required,postcode - * @apiParam (CONTACT_SUB_JSON) {String(20)=ACT,NSW,NT,QLD,SA,TAS,VIC,WA,OTHER} state Required,state - * @apiParam (CONTACT_SUB_JSON) {String(20)} country=AUS Required,country - * @apiParam (CONTACT_SUB_JSON) {String(200)} registered_address Required,Company registered address(It could be the same address) - * @apiParam (CONTACT_SUB_JSON) {String(50)} registered_suburb Required,Company registered suburb(It could be the same suburb) - * @apiParam (CONTACT_SUB_JSON) {String(10)} registered_postcode Required,Company registered postcode(It could be the same postcode) - * @apiParam (CONTACT_SUB_JSON) {String(20)=ACT,NSW,NT,QLD,SA,TAS,VIC,WA,OTHER} registered_state Required,Company registered state(It could be the same state) - * @apiParam (CONTACT_SUB_JSON) {String(30)=Australia/West,Australia/Eucla,Australia/North,Australia/South,Australia/Brisbane,Australia/Melbourne,Australia/LHI} timezone Required,timezone - * - * @apiParam (LEGAL_SUB_JSON) {String(50)} legal_representative_person Required,Company legal person(It could be the same contact_person) - * @apiParam (LEGAL_SUB_JSON) {String(15)} legal_representative_phone Required,Company legal person phone(It could be the same contact_phone) - * @apiParam (LEGAL_SUB_JSON) {String(50)} legal_representative_email Required,Company legal person email(It could be the same contact_email) - * @apiParam (LEGAL_SUB_JSON) {String(50)} legal_representative_job Required,Company legal person job(It could be the same contact_job) - * - * @apiParam (PAY_SUB_JSON) {int[]=1,2} client_pay_type Required,Company payment scenario(multi-select) example:1,2 - *
  • 1:The online payment
  • - *
  • 2:The offline payment
  • - * @apiParam (PAY_SUB_JSON) {int[]} client_pay_desc Required,Company payment description(multi-select) example:101,102,105,202,203,20306 - *
  • 101:PC Web
  • - *
  • 102:Mobile website(H5)
  • - *
  • 103:APP
  • - *
  • 104:Wechat/Alipay JSAPI
  • - *
  • 105:Mini Program
  • - *
  • 201:QR Code
  • - *
  • 202:RoyalPay POS
  • - *
  • 203:Cashier system
  • - *
  • 204:Vending machine
  • - *
  • 20301:ipos
  • - *
  • 20302:pospal
  • - *
  • 20303:Lotus
  • - *
  • 20304:AoShangBao
  • - *
  • 20305:Infinity
  • - *
  • 20306:EasyCloud
  • - *
  • 20307:Aus Post
  • - *
  • 20308:AoMaiKe
  • - *
  • 20399:other
  • - * @apiParam (PAY_SUB_JSON) {String(10)} royalpay_industry Required,RoyalPay industry code,See industry code comparison table for details:Industry code comparison table - * @apiParam (PAY_SUB_JSON) {String(10)} wechat_industry Required,Wechat industry code,See industry code comparison table for details:Industry code comparison table - * @apiParam (PAY_SUB_JSON) {String(10)} alipay_industry Required,Alipay industry code,See industry code comparison table for details:Industry code comparison table - * @apiParam (PAY_SUB_JSON) {String(200)} company_photo Optional,Company photo url,If the company payment scenario is required offline - * @apiParam (PAY_SUB_JSON) {String(200)} store_photo Optional,Store photo url,If the company payment scenario is required offline - * @apiParam (PAY_SUB_JSON) {String(200)} company_website Optional,Company website,If the company payment scenario is required online - * - * @apiParam (SETTLE_SUB_JSON) {String(12)} swift_code Required,Swift code - * @apiParam (SETTLE_SUB_JSON) {String(6)} bsb_no Required,BSB No - * @apiParam (SETTLE_SUB_JSON) {String(100)} bank Required,Bank - * @apiParam (SETTLE_SUB_JSON) {String(30)} city Required,City - * @apiParam (SETTLE_SUB_JSON) {String(100)} address Required,Address - * @apiParam (SETTLE_SUB_JSON) {String(20)} system Required,System - * @apiParam (SETTLE_SUB_JSON) {String(20)} postcode Required,Postcode - * @apiParam (SETTLE_SUB_JSON) {String(30)} state Required,State - * @apiParam (SETTLE_SUB_JSON) {String(100)} branch Required,Branch - * @apiParam (SETTLE_SUB_JSON) {String(20)} account_no Required,Account No - * @apiParam (SETTLE_SUB_JSON) {String(50)} account_name Required,Account Name - * @apiParam (SETTLE_SUB_JSON) {int=1,2,3} clean_days Required,Clean days:t+1,t+2,t+3 - * @apiParam (SETTLE_SUB_JSON) {Double} wechat_rate Required,Wechat Rate(2=2%,1.5=1.5%) - * @apiParam (SETTLE_SUB_JSON) {Double} alipay_rate Required,Alipay Rate(2=2%,1.5=1.5%) - * @apiParam (SETTLE_SUB_JSON) {Double} alipay_online_rate Required,Alipay Online Rate(2=2%,1.5=1.5%) - * @apiParam (SETTLE_SUB_JSON) {Double} transaction_fee=0 Required,Transaction fee - * @apiParam (SETTLE_SUB_JSON) {Date} active_time Required,Active Time,format:'yyyy-mm-dd HH:mm:ss' - * @apiParam (SETTLE_SUB_JSON) {Date} expire_time Required,Expire Time,format:'yyyy-mm-dd HH:mm:ss' - * - * @apiParam (COMPLIANCE_SUB_JSON) {String(200)} id_file Required,ID file of company leader, upload driver's license or passport, recommend uploading ID file of direct beneficiary of the company, if you provide ID file of other company leader, please describe the reason (the file should be uploaded to the server through file upload api) - * @apiParam (COMPLIANCE_SUB_JSON) {String=passport,driver_license} id_type Required,Type of id file to upload - *
  • passport:Passport
  • - *
  • driver_license:Driver License
  • - * @apiParam (COMPLIANCE_SUB_JSON) {String='Ultimate beneficiary owner','CEO','Director','General Manager','Other'} id_title Required,Id file person's position - * @apiParam (COMPLIANCE_SUB_JSON) {String(200)} id_title_description Optional,The reason for not providing the ID file of the direct beneficiary of the company - * @apiParam (COMPLIANCE_SUB_JSON) {String(200)} bank_statement Required,Bank statement file url(files need to be uploaded to the server using file upload api) - * @apiParam (COMPLIANCE_SUB_JSON) {String(200)} certificate_of_registration Required,Company registration file url(files need to be uploaded to the server using file upload api) - * @apiParam (COMPLIANCE_SUB_JSON) {String(200)} utility_bill Optional,Company utility bill file url(files need to be uploaded to the server using file upload api) - * - * @apiSuccess {JSON} data Returns the parameter - * @apiSuccess {String} sign Returns the signature - * - * @apiSuccess (SUB_JSON) {String} partner_code Partner code - * @apiSuccess (SUB_JSON) {String='PASS','PROCESSING','REFUSED'} partner_status Merchant audit status:PASS,PROCESSING,REFUSED - * @apiSuccess (SUB_JSON) {String} company_name Company name - * @apiSuccess (SUB_JSON) {String} credential_code Credential code - * @apiSuccess (SUB_JSON) {String} short_name Company Short name - * @apiSuccess (SUB_JSON) {String} sign_type=RSA2 Signature encryption - * @apiSuccess (SUB_JSON) {String} nonce_str nonce string - * @apiSuccess (SUB_JSON) {String} url api url - * - * @apiError (ERROR) return_code Error Code - * @apiError (ERROR) return_msg Error Description - * @apiUse MerchantError - * @apiError (ERROR_CODE) PARAM_INVALID Parameters are invalid. See return_msg for more details. - * - */ -/** - * @api {GET} /api/v1.0/gateway/partners/{gateway_short_id}/merchant/{partner_code}/status Merchant status query - * @apiName query_merchant - * @apiDescription - * Inquire merchant audit status and merchant brief information. Signature details:Merchant signature documentation - * - * @apiVersion 1.0.0 - * @apiGroup Merchant - * @apiHeader Accept multipart/form-data - * @apiHeader Content-Type multipart/form-data - * @apiParam (PathVariable) {String(14)} gateway_short_id Required,gateway short id,Consists of 10-14 digits of capital letters or Numbers (generated by the RoyalPay) - * - * @apiSuccess {JSON} data Returns the parameter - * @apiSuccess {String} sign Returns the signature - * - * @apiSuccess (SUB_JSON) {String} partner_code Partner code - * @apiSuccess (SUB_JSON) {String='PASS','PROCESSING','REFUSED'} partner_status Merchant audit status:PASS,PROCESSING,REFUSED - * @apiSuccess (SUB_JSON) {String} company_name Company name - * @apiSuccess (SUB_JSON) {String} credential_code Credential code - * @apiSuccess (SUB_JSON) {String} short_name Short name - * @apiSuccess (SUB_JSON) {String} sign_type=RSA2 Signature encryption - * @apiSuccess (SUB_JSON) {String} nonce_str nonce string - * @apiSuccess (SUB_JSON) {String} url api url - * - * @apiError (ERROR) return_code Error Code - * @apiError (ERROR) return_msg Error Description - * @apiUse MerchantError - * @apiError (ERROR_CODE) INVALID_SHORT_ID Partner code is invalid or there is no partner associated with this code - * - */ -/** - * @api {POST} /api/v1.0/gateway/partners/{gateway_short_id}/attachment/files Upload pictures and files - * @apiName update_file - * @apiDescription - * Upload picture and file api, which can be used to upload merchant logo, company photo, store photo and bank file. If the picture is too large, it is suggested to upload after compression,Signature details:Merchant signature documentation - * - * @apiVersion 1.0.0 - * @apiGroup Merchant - * @apiHeader Accept application/json - * @apiHeader Content-Type application/json - * @apiParam (PathVariable) {String(14)} gateway_short_id Required,gateway short id,Consists of 10-14 digits of capital letters or Numbers (generated by the RoyalPay) - * - * @apiParam (BINARY) {binary} file File data stream - * - * @apiSuccess {JSON} data Returns the parameter - * @apiSuccess {String} sign Returns the signature - * - * @apiSuccess (SUB_JSON) {String} file_type File type - * @apiSuccess (SUB_JSON) {String} file_url File url - * @apiSuccess (SUB_JSON) {String} original_filename Original file name - * @apiSuccess (SUB_JSON) {String} sign_type=RSA2 Signature encryption - * @apiSuccess (SUB_JSON) {String} nonce_str nonce string - * @apiSuccess (SUB_JSON) {String} url api url - * - * @apiError (ERROR) return_code Error Code - * @apiError (ERROR) return_msg Error Description - * @apiUse MerchantError - * - */ -/** - * @api {POST} /notify_url Notification of merchant audit status - * @apiName merchant_notice - * @apiGroup Merchant - * @apiVersion 1.0.0 - * @apiDescription - * If notify_url is provided when the merchant audit status is complete. System will post request to this url when the merchant audit status is complete. Request method is POST. - * Different from Server APIs, sign parameters will be included in json entity. Partner system shall valid them to prevent fake requests. - * @apiHeader Accept application/json - * @apiHeader Content-Type application/json - * @apiSuccess {JSON} data Returns the parameter - * @apiSuccess {String} sign Returns the signature - * - * @apiSuccess (SUB_JSON) {String} partner_code Partner code - * @apiSuccess (SUB_JSON) {String='PASS','PROCESSING','REFUSED'} partner_status Merchant audit status:PASS,PROCESSING,REFUSED - * @apiSuccess (SUB_JSON) {String} company_name Company name - * @apiSuccess (SUB_JSON) {String} credential_code Credential code - * @apiSuccess (SUB_JSON) {String} short_name Company short name - * @apiSuccess (SUB_JSON) {String} sign_type=RSA2 Signature encryption - * @apiSuccess (SUB_JSON) {String} nonce_str nonce string - * @apiSuccess (SUB_JSON) {String} url notify_url - * - * @apiSuccess {String} return_code SUCCESS - */ function apis() { }