Commit 1f802778 by weijiguang

catch订阅消息发送失败

parent 7887fd98
......@@ -13,7 +13,6 @@ import me.chanjar.weixin.common.error.WxErrorException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import javax.annotation.PostConstruct;
import java.util.ArrayList;
import java.util.HashMap;
......@@ -130,9 +129,10 @@ public class SendMessageUtils {
try {
wxMaService.getMsgService().sendSubscribeMsg(msg);
} catch (WxErrorException e) {
log.error("订阅消息发送失败,用户openId:{}, 错误码:{},错误信息:{}",
order.getUserId(), e.getError().getErrorCode(), e.getError().getErrorMsg());
//发送失败就发送短信
log.error("订阅消息发送失败,用户openId:{}, 错误码:{},错误信息:{}", order.getUserId(), e.getError().getErrorCode(), e.getError().getErrorMsg());
} catch (Exception e) {
log.error("订阅消息发送失败", e);
e.printStackTrace();
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment