离线数据上传

This commit is contained in:
hzj
2024-09-29 16:15:52 +08:00
parent d1574e43be
commit 4745b86085
19 changed files with 1045 additions and 840 deletions

View File

@@ -11,6 +11,9 @@ 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;
import org.springframework.web.bind.annotation.RequestParam;
import java.time.LocalDateTime;
import java.util.List;
/**
@@ -24,5 +27,8 @@ public interface EventFeignClient {
@PostMapping("/pageQueryByLineId")
HttpResult<Page<DataGroupEventVO>> pageQueryByLineId(@RequestBody CsEventUserQueryPage csEventUserQueryPage);
@PostMapping("/queryByIndex")
HttpResult<CsEventPO> queryByIndex(@RequestBody CsEventPO csEventPO);
}
}

View File

@@ -12,6 +12,9 @@ import com.njcn.csharmonic.pojo.vo.CsEventVO;
import feign.hystrix.FallbackFactory;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestBody;
import java.time.LocalDateTime;
import java.util.List;
/**
@@ -40,6 +43,12 @@ public class EventFeignClientFallbackFactory implements FallbackFactory<EventFei
log.error("{}异常,降级处理,异常为:{}","根据监测点分页查询暂降事件",cause.toString());
throw new BusinessException(finalExceptionEnum);
}
@Override
public HttpResult<CsEventPO> queryByIndex( CsEventPO csEventPO) {
log.error("{}异常,降级处理,异常为:{}","根据根据表唯一索引查询(用于校验是否存在该事件)s",cause.toString());
throw new BusinessException(finalExceptionEnum);
}
};
}
}