核心信息提取
This commit is contained in:
@@ -1,11 +1,16 @@
|
||||
package com.njcn.supervision.api;
|
||||
|
||||
import com.njcn.bpm.pojo.dto.BpmInstanceInfo;
|
||||
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||
import com.njcn.common.pojo.constant.ServerInfo;
|
||||
import com.njcn.common.pojo.enums.common.LogEnum;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.supervision.api.fallback.BusinessCommonFeignClientFallbackFactory;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import springfox.documentation.annotations.ApiIgnore;
|
||||
|
||||
|
||||
/**
|
||||
@@ -25,4 +30,12 @@ public interface BusinessCommonFeignClient {
|
||||
@GetMapping("/updateProcessStatus")
|
||||
HttpResult<Object> updateProcessStatus(@RequestParam("processKey") String processKey,@RequestParam("businessId") String businessId, @RequestParam("status")Integer status);
|
||||
|
||||
|
||||
/**
|
||||
* 根据流程key,业务id去实时更新流程状态
|
||||
* @param processKey 流程定义key
|
||||
* @param businessId 业务id
|
||||
*/
|
||||
@GetMapping("/getInstanceInfo")
|
||||
HttpResult<BpmInstanceInfo> getInstanceInfo(@RequestParam("processKey") String processKey, @RequestParam("businessId")String businessId);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.njcn.supervision.api.fallback;
|
||||
|
||||
import com.njcn.bpm.pojo.dto.BpmInstanceInfo;
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.exception.BusinessException;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
@@ -28,6 +29,12 @@ public class BusinessCommonFeignClientFallbackFactory implements FallbackFactory
|
||||
log.error("{}异常,降级处理,异常为:{}", "更新流程状态", throwable.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpResult<BpmInstanceInfo> getInstanceInfo(String processKey, String businessId) {
|
||||
log.error("{}异常,降级处理,异常为:{}", "获取流程额外信息", throwable.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user