1.pqbug修改
This commit is contained in:
@@ -4,12 +4,15 @@ import com.njcn.common.pojo.constant.ServerInfo;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.event.api.fallback.EventDetailFeignClientFallbackFactory;
|
||||
import com.njcn.event.pojo.po.EventDetail;
|
||||
import com.njcn.event.pojo.vo.GeneralVO;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author denghuajun
|
||||
@@ -41,4 +44,11 @@ public interface EventDetailFeignClient {
|
||||
@PostMapping("/getEventDetailLimit")
|
||||
HttpResult<List<EventDetail>> getEventDetailLimit(@RequestBody List<String> lineIndexes, @RequestParam("startTime")String startTime, @RequestParam("endTime")String endTime,@RequestParam("pageSize") Integer pageSize,@RequestParam("pageNum") Integer pageNum);
|
||||
|
||||
/**
|
||||
* 根据监测点集合获取短时终端,电压暂升,电压暂降数量
|
||||
* @return 暂降事件信息
|
||||
*/
|
||||
@PostMapping("/getEventDetailCount")
|
||||
HttpResult<List<GeneralVO>> getEventDetailCount(@RequestBody Map<String, Object> condMap);
|
||||
|
||||
}
|
||||
|
||||
@@ -5,12 +5,14 @@ import com.njcn.common.pojo.exception.BusinessException;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.event.api.EventDetailFeignClient;
|
||||
import com.njcn.event.pojo.po.EventDetail;
|
||||
import com.njcn.event.pojo.vo.GeneralVO;
|
||||
import com.njcn.event.utils.EventlEnumUtil;
|
||||
import feign.hystrix.FallbackFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author denghuajun
|
||||
@@ -48,6 +50,12 @@ public class EventDetailFeignClientFallbackFactory implements FallbackFactory<Ev
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpResult<List<GeneralVO>> getEventDetailCount(Map<String, Object> condMap) {
|
||||
log.error("{}异常,降级处理,异常为:{}", "根据监测点集合获取短时终端,电压暂升,电压暂降数量", throwable.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user