|
@@ -6,6 +6,8 @@ import com.persagy.dmp.starter.alarm.feign.client.AlarmClient;
|
|
|
import feign.hystrix.FallbackFactory;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
|
|
|
/**
|
|
|
* @description: 降级处理
|
|
@@ -22,53 +24,64 @@ public class AlarmServerFallbackFactory implements FallbackFactory<AlarmClient>
|
|
|
private String errorMsg = "feign调用报警中心接口异常,接口名称:[{}], 请求体:[{}]";
|
|
|
|
|
|
@Override
|
|
|
- public DmpResult<JSONArray> queryAlarmConfig(AlarmUrlParam alarmUrlParam, JSONObject jsonObject) throws Exception {
|
|
|
- throw new Exception(String.format(errorMsg, "queryAlarmConfig", jsonObject.toString()));
|
|
|
+ public DmpResult<JSONArray> queryAlarmConfig(AlarmUrlParam alarmUrlParam, JSONObject jsonObject) {
|
|
|
+ throw new RuntimeException(String.format(errorMsg, "queryAlarmConfig", jsonObject.toString()));
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public DmpResult<JSONObject> createAlarmConfig(AlarmUrlParam alarmUrlParam, JSONObject jsonObject){
|
|
|
+ throw new RuntimeException(String.format(errorMsg, "createAlarmConfig", jsonObject.toString()));
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public DmpResult<JSONObject> createAlarmConfig(AlarmUrlParam alarmUrlParam, JSONObject jsonObject) throws Exception{
|
|
|
- throw new Exception(String.format(errorMsg, "createAlarmConfig", jsonObject.toString()));
|
|
|
+ public DmpResult<JSONObject> batchCreateAlarmConfig(AlarmUrlParam alarmUrlParam, JSONObject jsonObject) throws Exception {
|
|
|
+ throw new RuntimeException(String.format(errorMsg, "batchCreateAlarmConfig", jsonObject.toString()));
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public DmpResult<JSONObject> updateAlarmConfig(AlarmUrlParam alarmUrlParam, JSONObject jsonObject) throws Exception{
|
|
|
- throw new Exception(String.format(errorMsg, "updateAlarmConfig", jsonObject.toString()));
|
|
|
+ public DmpResult<JSONObject> updateAlarmConfig(AlarmUrlParam alarmUrlParam, JSONObject jsonObject){
|
|
|
+ throw new RuntimeException(String.format(errorMsg, "updateAlarmConfig", jsonObject.toString()));
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public DmpResult<JSONObject> batchUpdateAlarmConfig(AlarmUrlParam alarmUrlParam, JSONObject jsonObject) throws Exception {
|
|
|
+ throw new RuntimeException(String.format(errorMsg, "batchUpdateAlarmConfig", jsonObject.toString()));
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public DmpResult<JSONArray> queryAlarmRecord(AlarmUrlParam alarmUrlParam, JSONObject jsonObject) throws Exception{
|
|
|
- throw new Exception(String.format(errorMsg, "queryAlarmRecord", jsonObject.toString()));
|
|
|
+ public DmpResult<JSONArray> queryAlarmRecord(AlarmUrlParam alarmUrlParam, JSONObject jsonObject){
|
|
|
+ throw new RuntimeException(String.format(errorMsg, "queryAlarmRecord", jsonObject.toString()));
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public DmpResult<JSONObject> createAlarmRecord(AlarmUrlParam alarmUrlParam, JSONObject jsonObject) throws Exception{
|
|
|
- throw new Exception(String.format(errorMsg, "createAlarmRecord", jsonObject.toString()));
|
|
|
+ public DmpResult<JSONObject> createAlarmRecord(AlarmUrlParam alarmUrlParam, JSONObject jsonObject){
|
|
|
+ throw new RuntimeException(String.format(errorMsg, "createAlarmRecord", jsonObject.toString()));
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public DmpResult<JSONObject> updateAlarmRecord(AlarmUrlParam alarmUrlParam, JSONObject jsonObject) throws Exception{
|
|
|
- throw new Exception(String.format(errorMsg, "updateAlarmRecord", jsonObject.toString()));
|
|
|
+ public DmpResult<JSONObject> updateAlarmRecord(AlarmUrlParam alarmUrlParam, JSONObject jsonObject){
|
|
|
+ throw new RuntimeException(String.format(errorMsg, "updateAlarmRecord", jsonObject.toString()));
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public DmpResult<JSONArray> queryAlarmItem(AlarmUrlParam alarmUrlParam, JSONObject jsonObject) throws Exception{
|
|
|
- throw new Exception(String.format(errorMsg, "queryAlarmItem", jsonObject.toString()));
|
|
|
+ public DmpResult<JSONArray> queryAlarmItem(AlarmUrlParam alarmUrlParam, JSONObject jsonObject){
|
|
|
+ throw new RuntimeException(String.format(errorMsg, "queryAlarmItem", jsonObject.toString()));
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public DmpResult<JSONObject> createAlarmComment(AlarmUrlParam alarmUrlParam, JSONObject jsonObject) throws Exception{
|
|
|
- throw new Exception(String.format(errorMsg, "createAlarmComment", jsonObject.toString()));
|
|
|
+ public DmpResult<JSONObject> createAlarmComment(AlarmUrlParam alarmUrlParam, JSONObject jsonObject){
|
|
|
+ throw new RuntimeException(String.format(errorMsg, "createAlarmComment", jsonObject.toString()));
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public DmpResult<JSONArray> queryAlarmComment(AlarmUrlParam alarmUrlParam, JSONObject jsonObject) throws Exception{
|
|
|
- throw new Exception(String.format(errorMsg, "queryAlarmComment", jsonObject.toString()));
|
|
|
+ public DmpResult<JSONArray> queryAlarmComment(AlarmUrlParam alarmUrlParam, JSONObject jsonObject){
|
|
|
+ throw new RuntimeException(String.format(errorMsg, "queryAlarmComment", jsonObject.toString()));
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public DmpResult<JSONArray> queryAlarmDic(AlarmUrlParam alarmUrlParam, JSONObject jsonObject) throws Exception {
|
|
|
- throw new Exception(String.format(errorMsg, "queryAlarmDic", jsonObject.toString()));
|
|
|
+ public DmpResult<JSONArray> queryAlarmDic(AlarmUrlParam alarmUrlParam, JSONObject jsonObject) {
|
|
|
+ throw new RuntimeException(String.format(errorMsg, "queryAlarmDic", jsonObject.toString()));
|
|
|
}
|
|
|
};
|
|
|
}
|