提交 a3a8d192 authored 作者: 000516's avatar 000516

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

......@@ -20,6 +20,7 @@ import org.springframework.web.bind.annotation.RestController;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.concurrent.TimeUnit;
/**
......@@ -48,7 +49,7 @@ public class SentQueryController {
throw new ServiceException(ECode.SENT_NO_QUERY_COUNT_ERROR);
}
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;
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论