Merge branch 'develop'

# Conflicts:
#	pom.xml
#	src/main/resources/au/com/royalpay/payment/manage/mappers/system/ClientMapper.xml
#	src/main/ui/static/payment/partner/partner.js
master
yixian 6 years ago
commit 4c6e537b96

@ -5,15 +5,17 @@
<parent>
<groupId>au.com.royalpay.payment</groupId>
<artifactId>payment-parent</artifactId>
<version>0.2.0</version>
<version>1.0.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>manage</artifactId>
<version>1.0.19</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<jib-maven-plugin.version>1.1.2</jib-maven-plugin.version>
<docker-image.version>1.1.18</docker-image.version>
<docker-image.version>${project.version}</docker-image.version>
</properties>
<dependencies>

@ -67,6 +67,8 @@ import java.net.URISyntaxException;
import java.util.Date;
import java.util.List;
import static au.com.royalpay.payment.manage.permission.utils.OrgCheckUtils.checkOrgPermission;
/**
* Created by yixian on 2016-07-06.
*/

@ -528,7 +528,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
int authDays = PlatformEnvironment.getEnv().authDays();// 快速自助开通申请有效期
for (JSONObject partner : partners) {
String subMerchantId = partner.getString("sub_merchant_id");
if (subMerchantId != null ) {
if (subMerchantId != null) {
partner.put("temp_sub_merchant", checkSubMerchantIdInCommonPool(subMerchantId));
}
if (partner.getIntValue("approve_result") == 2) {
@ -1823,7 +1823,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
List<JSONObject> clients = clientMapper.listChildClients(partner.getIntValue("client_id"));
if (clients.size() > 0) {
partner.put("level3Clients", clients);
clients.forEach(e->{
clients.forEach(e -> {
e.put("parent_client_moniker", partner.getString("client_moniker"));
});
}
@ -1908,7 +1908,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
JSONObject clientInfo = getClientInfo(Integer.parseInt(currentClientId));
if (clientInfo.containsKey("parent_client_id")) {
int parentClientId = clientInfo.getIntValue("parent_client_id");
if (parentClientId != client_id && client_id!= Integer.parseInt(currentClientId) && !listLevel3Client(client_id).contains(parentClientId)) {
if (parentClientId != client_id && client_id != Integer.parseInt(currentClientId) && !listLevel3Client(client_id).contains(parentClientId)) {
throw new Exception("partner has no permission");
}
}
@ -3277,7 +3277,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
gatewaySignInfo.put("last_update_date", new Date());
merchantSignInfoMapper.insert(gatewaySignInfo);
}
clientModifySupport.processClientGatewaySignModify(new SwitchGatewaySignPermissionModify(account, client.getString("client_moniker"),"is_valid" ,enable_gateway_v2));
clientModifySupport.processClientGatewaySignModify(new SwitchGatewaySignPermissionModify(account, client.getString("client_moniker"), "is_valid", enable_gateway_v2));
}
@Override
@ -3287,7 +3287,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
if (client == null) {
throw new InvalidShortIdException();
}
clientModifySupport.processClientGatewaySignModify(new SwitchGatewaySignPermissionModify(account, client.getString("client_moniker"),"verify_ip" ,verify_ip));
clientModifySupport.processClientGatewaySignModify(new SwitchGatewaySignPermissionModify(account, client.getString("client_moniker"), "verify_ip", verify_ip));
}
@Override
@ -3298,7 +3298,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
throw new InvalidShortIdException();
}
if (StringUtils.isNotBlank(ipWhitelistConfig)) {
clientModifySupport.processClientGatewaySignModify(new GatewayInfoModify(account, client.getString("client_moniker"),"ip_whitelist", ipWhitelistConfig, "重新设置IP白名单"));
clientModifySupport.processClientGatewaySignModify(new GatewayInfoModify(account, client.getString("client_moniker"), "ip_whitelist", ipWhitelistConfig, "重新设置IP白名单"));
}
}
@ -3311,8 +3311,8 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
throw new InvalidShortIdException();
}
JSONObject key = getRsaKey();
clientModifySupport.processClientGatewaySignModify(new GatewayInfoModify(account, client.getString("client_moniker"),"platform_public_key",key.getString("public_key"),"重新生成平台公钥"));
clientModifySupport.processClientGatewaySignModify(new GatewayInfoModify(account, client.getString("client_moniker"),"platform_private_key",key.getString("private_key"),"重新生成平台私钥"));
clientModifySupport.processClientGatewaySignModify(new GatewayInfoModify(account, client.getString("client_moniker"), "platform_public_key", key.getString("public_key"), "重新生成平台公钥"));
clientModifySupport.processClientGatewaySignModify(new GatewayInfoModify(account, client.getString("client_moniker"), "platform_private_key", key.getString("private_key"), "重新生成平台私钥"));
}
@Override
@ -3653,7 +3653,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
if (client == null) {
throw new InvalidShortIdException();
}
return clearingDistributedSurchargeMapper.findSurchargeTransactionsByDetailId(client.getIntValue("client_id"),detailId);
return clearingDistributedSurchargeMapper.findSurchargeTransactionsByDetailId(client.getIntValue("client_id"), detailId);
}
@Override
@ -4182,27 +4182,27 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
queryGMSJson.put("partner", mch.getPid());
queryGMSJson.put("sign_type", "MD5");
queryGMSJson.put("_input_charset", "utf-8");
queryGMSJson.put("timestamp", DateFormatUtils.format(System.currentTimeMillis(),"yyyy-MM-dd HH:mm:ss"));
queryGMSJson.put("timestamp", DateFormatUtils.format(System.currentTimeMillis(), "yyyy-MM-dd HH:mm:ss"));
queryGMSJson.put("secondary_merchant_name", client.getString("company_name"));
queryGMSJson.put("secondary_merchant_id", client.getString("client_moniker"));
queryGMSJson.put("store_id", client.getString("client_moniker"));
queryGMSJson.put("store_name", client.getString("short_name"));
queryGMSJson.put("store_country", client.getString("country").substring(0,2));
queryGMSJson.put("store_address", client.getString("country") + " "+client.getString("state") + " "+client.getString("suburb") + " "+client.getString("address"));
queryGMSJson.put("store_country", client.getString("country").substring(0, 2));
queryGMSJson.put("store_address", client.getString("country") + " " + client.getString("state") + " " + client.getString("suburb") + " " + client.getString("address"));
queryGMSJson.put("store_industry", client.getString("alipayindustry"));
queryGMSJson.put("internal_store_photo", client.getString("company_photo"));
queryGMSJson.put("external_storefront_photo", client.getString("store_photo"));
queryGMSJson.put("register_country", client.getString("country").substring(0,2));
queryGMSJson.put("register_address", client.getString("country") + " "+client.getString("state") + " "+client.getString("suburb") + " "+client.getString("address"));
queryGMSJson.put("register_country", client.getString("country").substring(0, 2));
queryGMSJson.put("register_address", client.getString("country") + " " + client.getString("state") + " " + client.getString("suburb") + " " + client.getString("address"));
if ("Company".equals(client.getString("business_structure"))) {
queryGMSJson.put("secondary_merchant_type", "ENTERPRISE");
queryGMSJson.put("registration_no", client.getString("acn"));
}else {
} else {
queryGMSJson.put("secondary_merchant_type", "INDIVIDUAL");
queryGMSJson.put("representative_name", client.getString("contact_person"));
}
queryGMSJson.put("contact_no",client.getString("contact_phone"));
queryGMSJson.put("contact_email",client.getString("contact_email"));
queryGMSJson.put("contact_no", client.getString("contact_phone"));
queryGMSJson.put("contact_email", client.getString("contact_email"));
return queryGMSJson;
}
@ -4219,12 +4219,12 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
queryGMSJson.put("partner", mch.getPid());
queryGMSJson.put("sign_type", "MD5");
queryGMSJson.put("_input_charset", "utf-8");
queryGMSJson.put("timestamp", DateFormatUtils.format(System.currentTimeMillis(),"yyyy-MM-dd HH:mm:ss"));
queryGMSJson.put("timestamp", DateFormatUtils.format(System.currentTimeMillis(), "yyyy-MM-dd HH:mm:ss"));
queryGMSJson.put("secondary_merchant_name", client.getString("company_name"));
queryGMSJson.put("secondary_merchant_id", client.getString("client_moniker"));
queryGMSJson.put("secondary_merchant_industry", client.getString("alipayindustry"));
queryGMSJson.put("register_country", client.getString("country").substring(0,2));
queryGMSJson.put("register_address", client.getString("country") + " "+client.getString("state") + " "+client.getString("suburb") + " "+client.getString("address"));
queryGMSJson.put("register_country", client.getString("country").substring(0, 2));
queryGMSJson.put("register_address", client.getString("country") + " " + client.getString("state") + " " + client.getString("suburb") + " " + client.getString("address"));
JSONObject website = new JSONObject();
List<JSONObject> websites = new ArrayList<>();
website.put("site_type", "WEB");
@ -4236,12 +4236,12 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
queryGMSJson.put("secondary_merchant_type", "ENTERPRISE");
queryGMSJson.put("registration_no", client.getString("acn"));
queryGMSJson.put("shareholder_name", client.getString("contact_person"));
}else {
} else {
queryGMSJson.put("secondary_merchant_type", "INDIVIDUAL");
queryGMSJson.put("representative_name", client.getString("contact_person"));
}
queryGMSJson.put("contact_no",client.getString("contact_phone"));
queryGMSJson.put("contact_email",client.getString("contact_email"));
queryGMSJson.put("contact_no", client.getString("contact_phone"));
queryGMSJson.put("contact_email", client.getString("contact_email"));
return queryGMSJson;
}
@ -4859,7 +4859,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
needCheckParams.put("bank_account_no", bankAccount.getString("account_no"));
}
List<JSONObject> listRiskySimilarMerchants = riskAttentionMerchantsMapper.listRiskySimilarMerchants(needCheckParams);
if (listRiskySimilarMerchants.size() > 0) {
if (!listRiskySimilarMerchants.isEmpty()) {
StringBuilder appendStr = new StringBuilder();
StringBuilder infoStr = new StringBuilder();

@ -689,8 +689,8 @@
COUNT(DISTINCT o.customer_id) AS customers,
o.channel AS channel,
ifnull(SUM(if(t.transaction_type = 'Credit', t.clearing_amount, 0)), 0) AS total,
ifnull(SUM(if(t.refund_id>0, t.clearing_amount, 0)), 0) AS refund_amount,
SUM(if(t.refund_id>0, 1, 0)) AS refund_orders,
ifnull(SUM(if(t.transaction_type = 'Debit', t.clearing_amount, 0)), 0) AS refund_amount,
SUM(if(t.transaction_type = 'Debit', 1, 0)) AS refund_orders,
round(SUM(if(t.transaction_type='Credit',t.clearing_amount,0))/COUNT(DISTINCT o.customer_id),2) single_amount
FROM pmt_transactions t
INNER JOIN pmt_orders o ON o.order_id = t.order_id

@ -659,7 +659,7 @@
WHERE scr.rate_name = 'CB_BankPay'
AND (scr.expiry_time IS NULL
OR scr.expiry_time >= NOW()))
AND cb_bankpay_url IS NULL;
AND cb_bankpay_url IS NULL
</select>
</mapper>

@ -146,6 +146,9 @@
<p>我司风控系统检测到您短期内后台交易存在异常行为(<span th:if="${warning_order_type==0}" style="background: #FCE824">单人多次大金额交易</span><span th:if="${warning_order_type==1}" style="background: #FCE824">退款频繁</span>),触发平台风控预警,特此提醒:请勿使用平台进行违规交易,一经核查将关闭支付权限。请知悉。<br>
RoyalPay's risk management system has identified abnormal transactions from your records in a short time(<span th:if="${warning_order_type==0}" style="background: #FCE824">Single person pays large sums several times</span><span th:if="${warning_order_type==1}" style="background: #FCE824">frequent refund transactions</span>),which triggered the platform risk control warning. Here reminds: Do not use the platform for illegal transactions. Once verified, the payment authority will be closed. </p>
</div>
<br>
<a href="https://royalpay-1256684202.cos.ap-chengdu.myqcloud.com/%E9%A3%8E%E6%8E%A7%E6%8C%87%E5%BC%95-%E5%95%86%E6%88%B7.pdf">
<p>了解更多关于我司风控事宜。Click into the link to see more about our risk management work.</p></a>
<p>顺颂商祺<br>
Sincerely
</p>

@ -390,6 +390,9 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload','uiBoot
};
$scope.toggleClientPayType = function (type) {
if (!$scope.partner.client_pay_type) {
$scope.partner.client_pay_type = [];
}
var $idx = $scope.partner.client_pay_type.indexOf(type);
if ($idx >= 0) {
$scope.partner.client_pay_type.splice($idx, 1);
@ -410,6 +413,9 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload','uiBoot
};
$scope.toggleClientPayDesc = function (type) {
if (!$scope.partner.client_pay_desc) {
$scope.partner.client_pay_desc = [];
}
var $idx = $scope.partner.client_pay_desc.indexOf(type);
if ($idx >= 0) {
if (type == '203') {

Loading…
Cancel
Save