代码调整
This commit is contained in:
@@ -16,11 +16,21 @@ import org.springframework.web.bind.annotation.RequestBody;
|
||||
)
|
||||
public interface ThsSuperviseClient {
|
||||
/**
|
||||
* 预警/告警事务的生成
|
||||
* 预警/告警事务的初始化
|
||||
*
|
||||
* @param superviseParam
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/initSupervise")
|
||||
HttpResult<String> initSupervise(@RequestBody @Validated SuperviseParam superviseParam);
|
||||
|
||||
|
||||
/**
|
||||
* 预警/告警事务的生成
|
||||
*
|
||||
* @param superviseParam
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/creatSupervise")
|
||||
HttpResult<String> creatSupervise(@RequestBody @Validated SuperviseParam superviseParam);
|
||||
}
|
||||
|
||||
@@ -26,6 +26,12 @@ public class ThsSuperviseClientFallbackFactory implements FallbackFactory<ThsSup
|
||||
return new ThsSuperviseClient() {
|
||||
@Override
|
||||
public HttpResult<String> initSupervise(@RequestBody @Validated SuperviseParam superviseParam) {
|
||||
log.error("{}异常,降级处理,异常为:{}", "预警/告警事务的初始化: ", throwable.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpResult<String> creatSupervise(SuperviseParam superviseParam) {
|
||||
log.error("{}异常,降级处理,异常为:{}", "预警/告警事务的生成: ", throwable.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user