1.国网上送代码调整
This commit is contained in:
@@ -3,6 +3,7 @@ package com.njcn.event.api;
|
||||
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.param.EventCountParam;
|
||||
import com.njcn.event.pojo.po.EventDetail;
|
||||
import com.njcn.event.pojo.po.RmpEventDetailPO;
|
||||
import com.njcn.event.pojo.vo.GeneralVO;
|
||||
@@ -56,4 +57,10 @@ public interface EventDetailFeignClient {
|
||||
*/
|
||||
@PostMapping("/getEventDetailByIdsList")
|
||||
HttpResult<List<RmpEventDetailPO>> getEventDetailByIdsList(@RequestBody List<String> ids);
|
||||
|
||||
/**
|
||||
* 根据监测点id集合获取暂降列表
|
||||
*/
|
||||
@PostMapping("/getEventDetailByLineCount")
|
||||
HttpResult<Integer> getEventDetailByLineCount(@RequestBody EventCountParam param);
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
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.param.EventCountParam;
|
||||
import com.njcn.event.pojo.po.EventDetail;
|
||||
import com.njcn.event.pojo.po.RmpEventDetailPO;
|
||||
import com.njcn.event.pojo.vo.GeneralVO;
|
||||
@@ -63,6 +64,12 @@ public class EventDetailFeignClientFallbackFactory implements FallbackFactory<Ev
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpResult<Integer> getEventDetailByLineCount(EventCountParam param) {
|
||||
log.error("{}异常,降级处理,异常为:{}", "根据监测点id集合获取暂降列表", throwable.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.njcn.event.pojo.param;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author wr
|
||||
* @description
|
||||
* @date 2023/12/22 10:38
|
||||
*/
|
||||
@Data
|
||||
public class EventCountParam implements Serializable {
|
||||
|
||||
@ApiModelProperty(value = "ids")
|
||||
List<String> ids;
|
||||
|
||||
@ApiModelProperty(name="startTime",value="统计起始日期(yyyy-MM-dd)")
|
||||
private String startTime;
|
||||
|
||||
@ApiModelProperty(name="endTime",value="统计截止日期(yyyy-MM-dd)")
|
||||
private String endTime;
|
||||
}
|
||||
Reference in New Issue
Block a user