REQ-3578: 处理重复请求
This commit is contained in:
parent
b245ea6e05
commit
ffe0e88f52
@ -1,5 +1,6 @@
|
||||
package cn.axzo.msg.center.message.service.replay;
|
||||
|
||||
import cn.axzo.basics.common.exception.ServiceException;
|
||||
import cn.axzo.msg.center.common.utils.BizAssertions;
|
||||
import cn.axzo.msg.center.common.utils.MD5;
|
||||
import cn.axzo.msg.center.dal.RequestReplayDao;
|
||||
@ -30,7 +31,7 @@ public class RequestReplayService {
|
||||
if (!isWindowEnabled(requestInfo))
|
||||
return supplier.get();
|
||||
if (acquire(requestInfo) == RequestAcquireResult.DUPLICATE_REQUEST)
|
||||
return fallbackValue;
|
||||
throw new ServiceException("重复请求!");
|
||||
try {
|
||||
return supplier.get();
|
||||
} catch (Exception e) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user