|
|
|
@ -430,13 +430,12 @@ public class RiskBusinessServiceImpl implements RiskBusinessService, ManagerTodo
|
|
|
|
|
List<JSONObject> accounts = clientAccountMapper.listRiskNoticeAccounts(client.getIntValue("client_id"));
|
|
|
|
|
if (accounts != null) {
|
|
|
|
|
for (JSONObject account : accounts) {
|
|
|
|
|
if (account.get("wx_openid")!=null){
|
|
|
|
|
if (StringUtils.isNotBlank(account.getString("wx_openid"))) {
|
|
|
|
|
if (account.get("wechat_openid")!=null){
|
|
|
|
|
if (StringUtils.isNotBlank(account.getString("wechat_openid"))) {
|
|
|
|
|
try {
|
|
|
|
|
MpWechatApi paymentApi = mpWechatApiProvider.getNewPaymentApi();
|
|
|
|
|
TemplateMessage msg = initSendPartnerCloseChannelAndPartnerTemplate(account.getString("wx_openid"), paymentApi.getTemplateId("risk-forbidden-channelAndPartner"),client);
|
|
|
|
|
TemplateMessage msg = initSendPartnerCloseChannelAndPartnerTemplate(account.getString("wechat_openid"), paymentApi.getTemplateId("risk-forbidden-channelAndPartner"),client);
|
|
|
|
|
paymentApi.sendTemplateMessage(msg);
|
|
|
|
|
logger.info("I'm send now to partner accounts : " + account.getString("wx_openid"));
|
|
|
|
|
} catch (WechatException e) {
|
|
|
|
|
logger.error("Wechat Message Error,风控关闭通道" + e.getMessage());
|
|
|
|
|
publisher.publishEvent(new WechatExceptionEvent(this, e, "风控关闭通道"));
|
|
|
|
|