1.无线设备bug修改

This commit is contained in:
2024-09-24 16:40:32 +08:00
parent 35e521365d
commit d3f32fd396
11 changed files with 164 additions and 24 deletions

View File

@@ -1,9 +1,13 @@
package com.njcn.csharmonic.api;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.njcn.common.pojo.constant.ServerInfo;
import com.njcn.common.pojo.response.HttpResult;
import com.njcn.csdevice.pojo.vo.DataGroupEventVO;
import com.njcn.csharmonic.api.fallback.EventFeignClientFallbackFactory;
import com.njcn.csharmonic.param.CsEventUserQueryPage;
import com.njcn.csharmonic.pojo.po.CsEventPO;
import com.njcn.csharmonic.pojo.vo.CsEventVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
@@ -18,4 +22,7 @@ public interface EventFeignClient {
@PostMapping("/saveBatchEventList")
HttpResult<String> saveBatchEventList(@RequestBody List<CsEventPO> csEventPOS);
@PostMapping("/pageQueryByLineId")
HttpResult<Page<DataGroupEventVO>> pageQueryByLineId(@RequestBody CsEventUserQueryPage csEventUserQueryPage);
}

View File

@@ -1,10 +1,14 @@
package com.njcn.csharmonic.api.fallback;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
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.csdevice.pojo.vo.DataGroupEventVO;
import com.njcn.csharmonic.api.EventFeignClient;
import com.njcn.csharmonic.param.CsEventUserQueryPage;
import com.njcn.csharmonic.pojo.po.CsEventPO;
import com.njcn.csharmonic.pojo.vo.CsEventVO;
import feign.hystrix.FallbackFactory;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
@@ -30,6 +34,12 @@ public class EventFeignClientFallbackFactory implements FallbackFactory<EventFei
log.error("{}异常,降级处理,异常为:{}","获取当天事件未读消息未读消息",cause.toString());
throw new BusinessException(finalExceptionEnum);
}
@Override
public HttpResult<Page<DataGroupEventVO>> pageQueryByLineId(CsEventUserQueryPage csEventUserQueryPage) {
log.error("{}异常,降级处理,异常为:{}","根据监测点分页查询暂降事件",cause.toString());
throw new BusinessException(finalExceptionEnum);
}
};
}
}

View File

@@ -40,6 +40,9 @@ public class CsEventUserQueryPage extends CsEventUserQueryParam{
*/
private String deviceId;
@ApiModelProperty(value = "测点id")
private String lineId;
}