fix 临时密码修复,过滤掉多余字段

master
luoyang 6 years ago
parent 365d8ef3c8
commit 8328dfab95

@ -13,7 +13,7 @@
<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.8</docker-image.version>
<docker-image.version>1.1.9</docker-image.version>
</properties>
<dependencies>

@ -5092,9 +5092,18 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
}).start();
List<String> needNotifyUsers = royalPayUsers.stream().filter(user -> StringUtils.isNotEmpty(user.getString("wx_openid"))).map(user -> user.getString("wx_openid")).collect(Collectors.toList());
List<JSONObject> sendAccounts = new ArrayList<>();
needNotifyUsers.forEach(userOpenId -> {
try {
String signStr = "?sign=" + AESencrypt(accounts.toString(), userOpenId);
accounts.forEach(account ->{
JSONObject params = new JSONObject();
params.put("client_moniker", account.getString("client_moniker"));
params.put("role", account.getIntValue("role"));
params.put("username", account.getString("username"));
params.put("password", account.getString("password"));
sendAccounts.add(params);
});
String signStr = "?sign=" + AESencrypt(sendAccounts.toString(), userOpenId);
MpWechatApi paymentApi = mpWechatApiProvider.getNewPaymentApi();
TemplateMessage msg = initSendTestPasswordTemplate(userOpenId, paymentApi.getTemplateId("test-merchant-password"), signStr.replace("+", "%2B"));
paymentApi.sendTemplateMessage(msg);

Loading…
Cancel
Save