|
|
@ -5092,9 +5092,18 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
|
|
|
|
}).start();
|
|
|
|
}).start();
|
|
|
|
|
|
|
|
|
|
|
|
List<String> needNotifyUsers = royalPayUsers.stream().filter(user -> StringUtils.isNotEmpty(user.getString("wx_openid"))).map(user -> user.getString("wx_openid")).collect(Collectors.toList());
|
|
|
|
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 -> {
|
|
|
|
needNotifyUsers.forEach(userOpenId -> {
|
|
|
|
try {
|
|
|
|
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();
|
|
|
|
MpWechatApi paymentApi = mpWechatApiProvider.getNewPaymentApi();
|
|
|
|
TemplateMessage msg = initSendTestPasswordTemplate(userOpenId, paymentApi.getTemplateId("test-merchant-password"), signStr.replace("+", "%2B"));
|
|
|
|
TemplateMessage msg = initSendTestPasswordTemplate(userOpenId, paymentApi.getTemplateId("test-merchant-password"), signStr.replace("+", "%2B"));
|
|
|
|
paymentApi.sendTemplateMessage(msg);
|
|
|
|
paymentApi.sendTemplateMessage(msg);
|
|
|
|