代码提交

This commit is contained in:
huangzj
2023-09-28 11:41:47 +08:00
parent 7b9f456a4d
commit d670713a01
5 changed files with 200 additions and 69 deletions

View File

@@ -7,6 +7,7 @@ import com.njcn.csdevice.pojo.dto.DevDetailDTO;
import com.njcn.csdevice.pojo.dto.LineParamDTO;
import com.njcn.csdevice.pojo.param.CsLedgerParam;
import com.njcn.csdevice.pojo.po.CsLedger;
import com.njcn.csdevice.pojo.vo.CsLedgerVO;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
@@ -34,4 +35,8 @@ public interface CsLedgerFeignClient {
@PostMapping("/queryDevDetail")
HttpResult<DevDetailDTO> queryDevDetail(@RequestParam("devId") String devId);
@PostMapping("/deviceTree")
@ApiOperation("三层设备树(装置层)")
HttpResult<List<CsLedgerVO>> getDeviceTree();
}

View File

@@ -8,6 +8,7 @@ import com.njcn.csdevice.pojo.dto.DevDetailDTO;
import com.njcn.csdevice.pojo.dto.LineParamDTO;
import com.njcn.csdevice.pojo.param.CsLedgerParam;
import com.njcn.csdevice.pojo.po.CsLedger;
import com.njcn.csdevice.pojo.vo.CsLedgerVO;
import com.njcn.csdevice.utils.CsDeviceEnumUtil;
import feign.hystrix.FallbackFactory;
import lombok.extern.slf4j.Slf4j;
@@ -55,6 +56,12 @@ public class CsLedgerFeignClientFallbackFactory implements FallbackFactory<CsLed
log.error("{}异常,降级处理,异常为:{}","查询设备详情",cause.toString());
throw new BusinessException(finalExceptionEnum);
}
@Override
public HttpResult<List<CsLedgerVO>> getDeviceTree() {
log.error("{}异常,降级处理,异常为:{}","查询设备树",cause.toString());
throw new BusinessException(finalExceptionEnum);
}
};
}
}