add 商户自定义配置 hide_mch_device 隐藏设备

master
luoyang 5 years ago
parent 674ae4b1f8
commit 6efe8ce301

@ -9,7 +9,7 @@
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>manage</artifactId>
<version>1.3.95</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>

@ -2684,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);
}
@ -2707,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"));

Loading…
Cancel
Save