Commit 2b73742f by 徐高华

加好友限制重试次数

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