Commit 1dffd534 by qwmqiuwenmin

fix

parent c2cb8914
...@@ -518,6 +518,7 @@ public class WxEnterpriseController extends WebBaseController{ ...@@ -518,6 +518,7 @@ public class WxEnterpriseController extends WebBaseController{
String wxEnterpriseId = login.getWxEnterpriseId(); String wxEnterpriseId = login.getWxEnterpriseId();
String dayKey = "haoban_fresh-wx-friend-day" + wxEnterpriseId + DateUtil.dateToStr(new Date(), "yyyy-MM-dd"); String dayKey = "haoban_fresh-wx-friend-day" + wxEnterpriseId + DateUtil.dateToStr(new Date(), "yyyy-MM-dd");
String monthKey = "haoban_fresh-wx-friend-month" + wxEnterpriseId + DateUtil.dateToStr(new Date(), "yyyy-MM"); String monthKey = "haoban_fresh-wx-friend-month" + wxEnterpriseId + DateUtil.dateToStr(new Date(), "yyyy-MM");
String dateKey = "haoban_fresh-wx-friend-date" + wxEnterpriseId;
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){
...@@ -528,9 +529,26 @@ public class WxEnterpriseController extends WebBaseController{ ...@@ -528,9 +529,26 @@ public class WxEnterpriseController extends WebBaseController{
} }
String taskId = dealSyncOperationApiService.createWxFriendTask(wxEnterpriseId, "刷新企微好友", login.getStaffDTO().getStaffId(), "刷新企微好友"); String taskId = dealSyncOperationApiService.createWxFriendTask(wxEnterpriseId, "刷新企微好友", login.getStaffDTO().getStaffId(), "刷新企微好友");
dealSyncOperationApiService.dealWxFriendClerk(taskId, wxEnterpriseId); dealSyncOperationApiService.dealWxFriendClerk(taskId, wxEnterpriseId);
RedisUtil.setCache(dayKey, dayCount+1);
RedisUtil.setCache(monthKey, monthCount+1);
RedisUtil.setCache(dateKey, DateUtil.dateToStr(new Date(),DateUtil.FORMAT_DATETIME_19));
return resultResponse(HaoBanErrCode.ERR_1); return resultResponse(HaoBanErrCode.ERR_1);
} }
/**
* 获取企业微信好友刷新时间
* @return
*/
@RequestMapping("/get-fresh-detail")
public HaobanResponse getFreshDetail(){
LoginVO login = (LoginVO) AuthRequestUtil.getLoginUser();
String wxEnterpriseId = login.getWxEnterpriseId();
String dateKey = "haoban_fresh-wx-friend-date" + wxEnterpriseId;
RedisUtil.getCache(dateKey);
return resultResponse(HaoBanErrCode.ERR_1,RedisUtil.getCache(dateKey));
}
} }
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