代码调整

This commit is contained in:
Lee
2023-04-11 16:24:58 +08:00
parent e1a843d2a5
commit 3f7afc024b
6 changed files with 50 additions and 6 deletions

View File

@@ -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);
}

View File

@@ -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);
}