提交 6f75a6ca authored 作者: 000516's avatar 000516

限制单号每小时只能查询5次

...@@ -20,6 +20,7 @@ import org.springframework.web.bind.annotation.RestController; ...@@ -20,6 +20,7 @@ import org.springframework.web.bind.annotation.RestController;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.concurrent.TimeUnit;
/** /**
...@@ -48,7 +49,7 @@ public class SentQueryController { ...@@ -48,7 +49,7 @@ public class SentQueryController {
throw new ServiceException(ECode.SENT_NO_QUERY_COUNT_ERROR); throw new ServiceException(ECode.SENT_NO_QUERY_COUNT_ERROR);
} }
Object sent = queryBySentNode(sentNo); Object sent = queryBySentNode(sentNo);
redisService.setCacheObject(rKey, cacheObject == null ? 1 : Integer.parseInt(cacheObject.toString()) + 1); redisService.setCacheObject(rKey, cacheObject == null ? 1 : Integer.parseInt(cacheObject.toString()) + 1,1L, TimeUnit.HOURS);
return sent; return sent;
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论