update(REQ-2516) - 将受限访问的接口,都设置为同步调用,这些接口大多数都是要同步得到返回结果的

This commit is contained in:
wangli 2024-06-18 14:09:10 +08:00
parent c49519fe8d
commit ed32d6020c
2 changed files with 4 additions and 3 deletions

View File

@ -455,7 +455,7 @@ public class BpmnProcessModelServiceImpl implements BpmnProcessModelService {
if (CollectionUtils.isEmpty(list)) {
return Collections.emptyList();
}
return list.stream().map(Model::getTenantId).collect(Collectors.toList());
return list.stream().map(Model::getTenantId).distinct().collect(Collectors.toList());
}
private void updateProcessDefinitionSuspended(String deploymentId) {

View File

@ -12,6 +12,7 @@ import sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl;
import java.io.IOException;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.Objects;
@ -61,7 +62,7 @@ final class WorkflowEngineStarterDecoder implements Decoder {
*/
Object convert(Response response, Type type) throws IOException {
ParameterizedTypeImpl wrappedType;
List<Class<?>> cls = Lists.newArrayList(List.class, Map.class);
List<Class<?>> cls = Lists.newArrayList(Collection.class, List.class, Map.class);
if (type instanceof ParameterizedType && !cls.contains(((ParameterizedType) type).getRawType())) {
wrappedType = (ParameterizedTypeImpl) type;
} else {
@ -71,7 +72,7 @@ final class WorkflowEngineStarterDecoder implements Decoder {
if (decode instanceof CommonResponse) {
CommonResponse<?> commonResponse = (CommonResponse<?>) decode;
if (response.status() == 202) {
log.warn("workflow engine starter rpc invoke return msg: {}", commonResponse.getMsg());
log.error("workflow engine starter rpc invoke return msg: {}", commonResponse.getMsg());
}
return commonResponse.getData();
}