Commit 7df5e79b by qwmqiuwenmin

fix

parent 76c49cde
...@@ -522,14 +522,14 @@ public class WxEnterpriseController extends WebBaseController{ ...@@ -522,14 +522,14 @@ public class WxEnterpriseController extends WebBaseController{
Integer dayCount = RedisUtil.getCache(dayKey) == null?0:Integer.parseInt(RedisUtil.getCache(dayKey).toString()); Integer dayCount = RedisUtil.getCache(dayKey) == null?0:Integer.parseInt(RedisUtil.getCache(dayKey).toString());
Integer monthCount = RedisUtil.getCache(monthKey) == null?0:Integer.parseInt(RedisUtil.getCache(monthKey).toString()); Integer monthCount = RedisUtil.getCache(monthKey) == null?0:Integer.parseInt(RedisUtil.getCache(monthKey).toString());
if(dayCount >= 1){ if(dayCount >= 1){
return resultResponse(HaoBanErrCode.ERR_0,"一天只能刷新1次"); return resultResponse(HaoBanErrCode.ERR_100019);
} }
if(monthCount >= 3){ if(monthCount >= 3){
return resultResponse(HaoBanErrCode.ERR_0,"一个月只能刷新3次"); return resultResponse(HaoBanErrCode.ERR_100020);
} }
String taskId = dealSyncOperationApiService.createWxFriendTask(wxEnterpriseId, "刷新企微好友", login.getStaffDTO().getStaffId(), "刷新企微好友"); String taskId = dealSyncOperationApiService.createWxFriendTask(wxEnterpriseId, "刷新企微好友", login.getStaffDTO().getStaffId(), "刷新企微好友");
if(StringUtils.isEmpty(taskId)){ if(StringUtils.isEmpty(taskId)){
return resultResponse(HaoBanErrCode.ERR_0,"创建任务失败"); return resultResponse(HaoBanErrCode.ERR_100021);
} }
dealSyncOperationApiService.dealWxFriendClerk(taskId, wxEnterpriseId); dealSyncOperationApiService.dealWxFriendClerk(taskId, wxEnterpriseId);
RedisUtil.setCache(dayKey, dayCount+1); RedisUtil.setCache(dayKey, dayCount+1);
......
...@@ -106,6 +106,10 @@ public enum HaoBanErrCode { ...@@ -106,6 +106,10 @@ public enum HaoBanErrCode {
ERR_100016(100016,"审核失败"), ERR_100016(100016,"审核失败"),
ERR_100017(100017,"secret已经设置过"), ERR_100017(100017,"secret已经设置过"),
ERR_100018(100018,"企业不存在"), ERR_100018(100018,"企业不存在"),
ERR_100019(100019,"一天只能刷新1次"),
ERR_100020(100020,"一个月只能刷新3次"),
ERR_100021(100021,"创建任务失败"),
ERR_DEFINE(-888, "自定义错误"), ERR_DEFINE(-888, "自定义错误"),
ERR_OTHER(-999, "未知错误code"); ERR_OTHER(-999, "未知错误code");
......
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