parent
3e4411e133
commit
24852e5b2e
|
|
@ -2,7 +2,6 @@ package com.bonus.sgzb.system.aspect;
|
|||
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.bonus.sgzb.common.core.enums.HttpCodeEnum;
|
||||
import com.bonus.sgzb.common.core.exception.ServiceException;
|
||||
import com.bonus.sgzb.system.annotation.PreventRepeatSubmit;
|
||||
import com.bonus.sgzb.system.util.RedisCache;
|
||||
import org.aspectj.lang.ProceedingJoinPoint;
|
||||
|
|
@ -62,7 +61,7 @@ public class PreventRepeatSubmitAspect {
|
|||
Boolean aBoolean = redisCache.setNxCacheObject(cacheRepeatKey, 1, preventRepeatSubmit.interval(), TimeUnit.SECONDS);
|
||||
//aBoolean为true则证明没有重复提交
|
||||
if(!aBoolean){
|
||||
throw new ServiceException(HttpCodeEnum.REPEATE_ERROR);
|
||||
throw new BusinessException(HttpCodeEnum.REPEATE_ERROR);
|
||||
}
|
||||
return pjp.proceed();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue