多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
## 一、概述 有时候,有些业务操作,两次针对同一个对象的相同操作需强制指定间隔时间; ## 二、方案 引入: ``` @Autowired private OperationConstrainedExecutor operationConstrainedExecutor; ``` ``` long operateEntityId =1; long periodMinutes =5; if (operationConstrainedExecutor.canExecuteThisRequestConstrainedActionNow(this, operateEntityId , periodMinutes , false)) { //间隔时间业务 } ```