update - 防重校验仍然抛出异常, 在yoke 服务中对该异常降级处理
This commit is contained in:
parent
b9234a8da7
commit
38b57a4448
@ -30,6 +30,7 @@ import java.util.Collection;
|
||||
import java.util.Map;
|
||||
import java.util.StringJoiner;
|
||||
|
||||
import static cn.axzo.workflow.core.common.code.OtherRespCode.REPEAT_SUBMIT_ERROR_TIPS;
|
||||
import static cn.axzo.workflow.core.common.code.OtherRespCode.REPEAT_SUBMIT_TIME_ERROR_TIPS;
|
||||
|
||||
/**
|
||||
@ -76,6 +77,7 @@ public class RepeatSubmitAspect implements Ordered {
|
||||
String paramsKey = SecureUtil.md5(nowParams);
|
||||
// 唯一标识(指定key + url + 消息头)
|
||||
String cacheRepeatKey = REPEAT_SUBMIT_KEY + url + ":" + paramsKey;
|
||||
log.info("repeatSubmit key: {}", cacheRepeatKey);
|
||||
|
||||
String key = RedisUtils.getCacheObject(cacheRepeatKey);
|
||||
if (key == null) {
|
||||
@ -83,7 +85,7 @@ public class RepeatSubmitAspect implements Ordered {
|
||||
KEY_CACHE.set(cacheRepeatKey);
|
||||
} else {
|
||||
log.warn("{}", repeatSubmit.message());
|
||||
// throw new WorkflowEngineException(REPEAT_SUBMIT_ERROR_TIPS, repeatSubmit.message());
|
||||
throw new WorkflowEngineException(REPEAT_SUBMIT_ERROR_TIPS, repeatSubmit.message());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -227,6 +227,7 @@ public class BpmnProcessInstanceController implements ProcessInstanceApi {
|
||||
@Operation(summary = "获取指定流程实例的协作单位")
|
||||
@GetMapping("/cooperation-org")
|
||||
@Override
|
||||
@RepeatSubmit
|
||||
public CommonResponse<CooperationOrgDTO> getCooperationOrg(@NotBlank(message = "流程实例 ID 不能为空") @RequestParam String processInstanceId,
|
||||
@Nullable String tenantId) {
|
||||
HistoricProcessInstance processInstance = bpmnProcessInstanceService.getProcessInstance(processInstanceId,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user