Merge remote-tracking branch 'origin/develop' into develop

master
yixian 5 years ago
commit 1a9a653274

@ -9,7 +9,7 @@
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>manage</artifactId>
<version>1.3.93</version>
<version>1.3.96</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<jib-maven-plugin.version>1.8.0</jib-maven-plugin.version>

@ -48,7 +48,9 @@ public class RetailRSvcServiceImpl implements RetailRSvcService {
String clientType = device.getString("client_type");
deviceSupport.findRegister(clientType);
JSONObject clientConfig = clientConfigMapper.find(device.getIntValue("client_id"));
if (!debug && !clientConfig.getBooleanValue("geek_shop_status") && device.getIntValue("client_id") != 9) {
if (!debug && !clientConfig.getBooleanValue("geek_shop_status")
&& device.getIntValue("client_id") != 9
&& device.getIntValue("client_id") != 4181) {
throw new NotFoundException();
}
JSONObject svcInfo = commonIncrementalChannelMapper.findIncreamentalChannelBySourceCode(sourceCode);

@ -746,6 +746,8 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
checkOrgPermission(manager, superClient);
partner.put("parent_client_id", superClient.getIntValue("client_id"));
}
//如果level3商户为一级商户增加level3_mch_config=true
checkLevel3MchStatus(superClient);
}
partner.put("create_time", new Date());
partner.put("ali_sub_merchant_id", registery.getClientMoniker());
@ -2097,7 +2099,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
if(mchConfig.getBooleanValue("hide_sub_mch")){
return new ArrayList<>();
}
if (!mchConfig.getBooleanValue("disable_level3_mch") && listChildClients.size()<100) {
if (mchConfig.getBooleanValue("level3_mch_config")) {
for (JSONObject partner : listChildClients) {
List<JSONObject> clients = clientMapper.listChildClients(partner.getIntValue("client_id"));
if (clients.size() > 0) {
@ -2128,6 +2130,8 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
params.put("search_text", searchText);
}
PageList<JSONObject> childClients = clientMapper.listChildClientsByPage(params, pageBounds);
JSONObject mchConfig = merchantInfoProvider.getMchExtParams(client.getIntValue("client_id"));
if (mchConfig.getBooleanValue("level3_mch_config")) {
for (JSONObject partner : childClients) {
List<JSONObject> clients = clientMapper.listChildClients(partner.getIntValue("client_id"));
if (clients.size() > 0) {
@ -2137,6 +2141,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
});
}
}
}
return PageListUtils.buildPageListResult(childClients);
}
@ -2679,6 +2684,10 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
checkOrgPermission(manager, client);
JSONObject params = new JSONObject();
params.put("client_id", client.getIntValue("client_id"));
JSONObject mchConfig = merchantInfoProvider.getMchExtParams(client.getIntValue("client_id"));
if (mchConfig.getBooleanValue("hide_mch_device")) {
return new JSONObject();
}
if (remark != null) {
params.put("remark", remark);
}
@ -2702,6 +2711,10 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
throw new InvalidShortIdException();
}
checkOrgPermission(null, client);
JSONObject mchConfig = merchantInfoProvider.getMchExtParams(client.getIntValue("client_id"));
if (mchConfig.getBooleanValue("hide_mch_device")) {
return new JSONObject();
}
JSONObject params = new JSONObject();
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
sdf.setTimeZone(TimeZone.getTimeZone(client.getString("timezone") != null ? client.getString("timezone") : "Australia/Melbourne"));
@ -6650,11 +6663,20 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
}
private String[] getChildClientIds(int clientId) {
JSONObject mchConfig = merchantInfoProvider.getMchExtParams(clientId);
List<String> clientIds = new ArrayList<>();
List<JSONObject> childs = clientMapper.listChildClients(clientId);
clientIds.add(String.valueOf(clientId));
childs.forEach(p -> {
clientIds.add(p.getString("client_id"));
if (mchConfig.getBooleanValue("level3_mch_config")) {
List<JSONObject> clients = clientMapper.listChildClients(p.getIntValue("client_id"));
if (clients.size() > 0) {
clients.forEach(e -> {
clientIds.add(e.getString("client_id"));
});
}
}
});
return clientIds.toArray(new String[]{});
}
@ -6689,4 +6711,19 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
}
}
private void checkLevel3MchStatus(JSONObject superClient) {
if (superClient.containsKey("parent_client_id") && superClient.getIntValue("parent_client_id") != 0) {
JSONObject superParentClient = getClientInfo(superClient.getIntValue("parent_client_id"));
if (superParentClient == null) {
throw new InvalidShortIdException();
}
JSONObject mchConfig = merchantInfoProvider.getMchExtParams(superParentClient.getIntValue("client_id"));
if (!mchConfig.getBooleanValue("level3_mch_config")) {
mchConfig.put("level3_mch_config", true);
superParentClient.put("ext_params", mchConfig.toJSONString());
clientMapper.update(superParentClient);
}
}
}
}

@ -3301,6 +3301,8 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
$scope.$close();
}, function (resp) {
$scope.errmsg = resp.data.message;
$scope.partner.client_pay_type = $scope.partner.client_pay_type.split(",");
$scope.partner.client_pay_desc = $scope.partner.client_pay_desc.split(",");
})
}
$scope.uploadLogo = function (file) {
@ -3550,16 +3552,6 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
}
$scope.clients.push(client);
});
$scope.clientIds = [];
$scope.clients.forEach(function (client) {
$scope.clientIds.push(client.client_id);
if (client.level3Clients) {
client.level3Clients.forEach(function (level3Client) {
$scope.clientIds.push(level3Client.client_id);
});
}
});
$scope.params.client_ids = angular.copy($scope.clientIds);
});
};
@ -4417,16 +4409,6 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
}
$scope.clients.push(client);
});
$scope.clientIds = [];
$scope.clients.forEach(function (client) {
$scope.clientIds.push(client.client_id);
if (client.level3Clients) {
client.level3Clients.forEach(function (level3Client) {
$scope.clientIds.push(level3Client.client_id);
});
}
});
$scope.params.client_ids = angular.copy($scope.clientIds);
});
};
$scope.initClientInfo = function(){

@ -50,16 +50,6 @@ define(['angular', 'uiBootstrap', 'uiRouter'], function (angular) {
}
$scope.clients.push(client);
});
$scope.clientIds = [];
$scope.clients.forEach(function (client) {
$scope.clientIds.push(client.client_id);
if (client.level3Clients) {
client.level3Clients.forEach(function (level3Client) {
$scope.clientIds.push(level3Client.client_id);
});
}
});
$scope.params.client_ids = angular.copy($scope.clientIds);
});
};
$scope.today = new Date();

@ -489,6 +489,8 @@
<table class="table table-bordered table-hover table-striped">
<thead>
<tr>
<th>Client Moniker</th>
<th>Short Name</th>
<th>Date/Time</th>
<th>Description</th>
<th>Currency</th>
@ -507,6 +509,8 @@
<tbody>
<tr ng-repeat="trade in tradeLogs"
ng-class="{'tr_refund':trade.trans_type=='refund','tr_clearing':trade.trans_type=='clearing',warning:trade.clearing_status==2}">
<td ng-bind="trade.client_moniker"></td>
<td ng-bind="trade.short_name"></td>
<td ng-bind="trade.transaction_time||'NOT PROVIDED'"></td>
<td>
<img src="/static/images/royalpay_sign_s.png"

@ -591,6 +591,8 @@
<table class="table table-bordered table-hover table-striped">
<thead>
<tr>
<th>Client Moniker</th>
<th>Short Name</th>
<th>Client Order ID</th>
<th>Order ID</th>
<th>Amount</th>
@ -607,6 +609,8 @@
</thead>
<tbody>
<tr ng-repeat="trade in tradeLogs" ng-class="{warning:trade.clearing_status==2}">
<td ng-bind="trade.client_moniker"></td>
<td ng-bind="trade.short_name"></td>
<td ng-bind="trade.client_order_id||'NOT PROVIDED'"></td>
<td>
<img src="/static/images/clearing-icon.png" uib-tooltip="clearing"

@ -313,16 +313,6 @@ define(['angular', 'uiBootstrap', 'uiRouter'], function (angular) {
}
$scope.clients.push(client);
});
$scope.clientIds = [];
$scope.clients.forEach(function (client) {
$scope.clientIds.push(client.client_id);
if (client.level3Clients) {
client.level3Clients.forEach(function (level3Client) {
$scope.clientIds.push(level3Client.client_id);
});
}
});
$scope.params.client_ids = angular.copy($scope.clientIds);
});
};

@ -138,16 +138,6 @@ define(['angular', 'uiBootstrap', 'uiRouter'], function (angular) {
}
$scope.clients.push(client);
});
$scope.clientIds = [];
$scope.clients.forEach(function (client) {
$scope.clientIds.push(client.client_id);
if (client.level3Clients) {
client.level3Clients.forEach(function (level3Client) {
$scope.clientIds.push(level3Client.client_id);
});
}
});
$scope.params.client_ids = angular.copy($scope.clientIds);
});
};

Loading…
Cancel
Save