fix 优化商户新增增值服务

master
luoyang 5 years ago
parent c0944f4bd3
commit 3af3762cc3

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

@ -6592,15 +6592,8 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
saveIncrementalService.put("title", incrementalService.getString("title"));
if (existIncrementalService == null) {
clientIncrementalMapper.save(saveIncrementalService);
if (incrementalService.getBigDecimal("total_incremental_amount").compareTo(new BigDecimal(0)) > 0) {
saveIncrementalService.put("amount", incrementalService.getString("total_incremental_amount"));
saveIncrementalService.put("service_code", "RYCBSM");
String title = incrementalService.getString("title");
if (StringUtils.isBlank(title)) {
title = "RP跨境商城开通费用";
}
saveIncrementalService.put("title", title);
rServicesApplyService.saveDebitDetail(saveIncrementalService, client);
if (StringUtils.equalsIgnoreCase("RP跨境商城", saveIncrementalService.getString("channel"))) {
afterGeekShopSave(saveIncrementalService, client);
}
} else {
clientIncrementalMapper.update(saveIncrementalService);
@ -6678,6 +6671,22 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
}
}
private void afterGeekShopSave(JSONObject serviceInfo, JSONObject client) {
JSONObject clientConfig = clientConfigMapper.find(client.getIntValue("client_id"));
clientConfig.put("geek_shop_status", 1);
clientConfigMapper.update(clientConfig);
if (serviceInfo.getBigDecimal("total_incremental_amount").compareTo(new BigDecimal(0)) > 0) {
serviceInfo.put("amount", serviceInfo.getString("total_incremental_amount"));
serviceInfo.put("service_code", "RYCBSM");
String title = serviceInfo.getString("title");
if (StringUtils.isBlank(title)) {
title = "RP跨境商城开通费用";
}
serviceInfo.put("title", title);
rServicesApplyService.saveDebitDetail(serviceInfo, client);
}
}
private String[] getChildClientIds(int clientId) {
JSONObject mchConfig = merchantInfoProvider.getMchExtParams(clientId);
List<String> clientIds = new ArrayList<>();

Loading…
Cancel
Save