异常数据功能代码优化

This commit is contained in:
2023-08-23 16:01:50 +08:00
parent 39c910a33d
commit ef0ab5eac4
10 changed files with 268 additions and 667 deletions

View File

@@ -11,6 +11,7 @@ import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import java.util.List;
import java.util.Map;
/**
* 监测点数据完整性
@@ -29,4 +30,12 @@ public interface OverLimitClient {
*/
@PostMapping("/getOverLimitByLineIds")
HttpResult<List<Overlimit>> getOverLimitByLineIds(@RequestBody List<String> lineIds);
/**
*
* @author cdf
* @date 2023/6/7
*/
@PostMapping("/getLimitMapsByLineIds")
HttpResult<List<Map<String, Object>>> getLimitMapsByLineIds(@RequestBody List<String> lineIds);
}

View File

@@ -13,6 +13,7 @@ import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import java.util.List;
import java.util.Map;
/**
* 告警管理熔断降级
@@ -38,6 +39,12 @@ public class OverLimitFallbackFactory implements FallbackFactory<OverLimitClient
throw new BusinessException(finalExceptionEnum);
}
@Override
public HttpResult<List<Map<String, Object>>> getLimitMapsByLineIds(List<String> lineIds) {
log.error("{}异常,降级处理,异常为:{}", "获取监测点限值map", throwable.toString());
throw new BusinessException(finalExceptionEnum);
}
};
}
}