fix 优化商户新增增值服务

master
luoyang 5 years ago
parent c0944f4bd3
commit 3af3762cc3

@ -9,7 +9,7 @@
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>manage</artifactId> <artifactId>manage</artifactId>
<version>1.4.17</version> <version>1.4.18</version>
<properties> <properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<jib-maven-plugin.version>1.8.0</jib-maven-plugin.version> <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")); saveIncrementalService.put("title", incrementalService.getString("title"));
if (existIncrementalService == null) { if (existIncrementalService == null) {
clientIncrementalMapper.save(saveIncrementalService); clientIncrementalMapper.save(saveIncrementalService);
if (incrementalService.getBigDecimal("total_incremental_amount").compareTo(new BigDecimal(0)) > 0) { if (StringUtils.equalsIgnoreCase("RP跨境商城", saveIncrementalService.getString("channel"))) {
saveIncrementalService.put("amount", incrementalService.getString("total_incremental_amount")); afterGeekShopSave(saveIncrementalService, client);
saveIncrementalService.put("service_code", "RYCBSM");
String title = incrementalService.getString("title");
if (StringUtils.isBlank(title)) {
title = "RP跨境商城开通费用";
}
saveIncrementalService.put("title", title);
rServicesApplyService.saveDebitDetail(saveIncrementalService, client);
} }
} else { } else {
clientIncrementalMapper.update(saveIncrementalService); 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) { private String[] getChildClientIds(int clientId) {
JSONObject mchConfig = merchantInfoProvider.getMchExtParams(clientId); JSONObject mchConfig = merchantInfoProvider.getMchExtParams(clientId);
List<String> clientIds = new ArrayList<>(); List<String> clientIds = new ArrayList<>();

Loading…
Cancel
Save