Commit 1f328c23 by 徐高华

log

parent 06cd8a31
......@@ -62,7 +62,7 @@ public class QwTimesUtils {
public static boolean isLimit(String wxEnterpriseId, String enterpriseId, QwInterfaceLimitEnum qwInterface) {
QwLimitTimesBO setTimeBO = getSettingTimes(wxEnterpriseId, qwInterface);
logger.info("获取配置次数={},wxEnterpriseId={}", JSON.toJSONString(setTimeBO), wxEnterpriseId);
logger.info("获取配置次数={},wxEnterpriseId={},{}", JSON.toJSONString(setTimeBO), wxEnterpriseId,enterpriseId);
// 先判断月
String interfaceName = qwInterface.getName();
Date now = new Date();
......@@ -70,21 +70,21 @@ public class QwTimesUtils {
String keyMonth = getCacheKey(wxEnterpriseId, interfaceName, dateStr.substring(0, 6));
boolean monthResult = timesCheck(1, keyMonth, qwInterface, wxEnterpriseId, enterpriseId, now, setTimeBO);
if (monthResult) {
logger.info("月达到限制={}", keyMonth);
logger.info("月达到限制={},{}", keyMonth,enterpriseId);
return true;
}
// 天
String keyDay = getCacheKey(wxEnterpriseId, interfaceName, dateStr.substring(0, 8));
boolean dayResult = timesCheck(2, keyDay, qwInterface, wxEnterpriseId, enterpriseId, now, setTimeBO);
if (dayResult) {
logger.info("天达到限制={}", keyDay);
logger.info("天达到限制={},{}", keyDay,enterpriseId);
return true;
}
// 小时
String keyHour = getCacheKey(wxEnterpriseId, interfaceName, dateStr.substring(0, 10));
boolean hourResult = timesCheck(3, keyHour, qwInterface, wxEnterpriseId, enterpriseId, now, setTimeBO);
if (hourResult) {
logger.info("小时达到限制={}", keyHour);
logger.info("小时达到限制={},{}", keyHour,enterpriseId);
return true;
}
return false;
......
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