Commit 2b73742f by 徐高华

加好友限制重试次数

parent 28324b54
......@@ -52,8 +52,18 @@ public class MemberUnionidRelatedDTO implements Serializable{
private String wxUserId ;
private int retryTimes ;
private boolean isFlush = false ;
public int getRetryTimes() {
return retryTimes;
}
public void setRetryTimes(int retryTimes) {
this.retryTimes = retryTimes;
}
public String getWxUserId() {
return wxUserId;
}
......
......@@ -51,6 +51,16 @@ public class QwFrientNoticeDTO implements Serializable {
// 是否从自建应用下的回调
private int selfCallback = 0;
private int retryTimes ;
public int getRetryTimes() {
return retryTimes;
}
public void setRetryTimes(int retryTimes) {
this.retryTimes = retryTimes;
}
public int getSelfCallback() {
return selfCallback;
}
......
......@@ -926,7 +926,10 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
} else if ("1".equals(unionIdJson)) {
log.info("接口调用被限制");
dto.setWxUserId(wxUserId);
this.qywxErrorLogService.addFriendErrLog(wxEnterpriseId,JSONObject.toJSONString(dto),4,dto.getExternalUserid());
dto.setRetryTimes(dto.getRetryTimes()+1);
if(dto.getRetryTimes()<=3) {
this.qywxErrorLogService.addFriendErrLog(wxEnterpriseId, JSONObject.toJSONString(dto), 4, dto.getExternalUserid());
}
HBQwMonitorUtils.addForFriend(1);
throw new WxApiLimitException("getCorpSelfExternalUseridInfo接口调用被限制");
}
......
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