Files
ruoyi-java/ruoyi-system/src/main/java/com/ruoyi/jarvis/service/ILogisticsService.java
2026-01-05 22:02:15 +08:00

79 lines
2.0 KiB
Java
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package com.ruoyi.jarvis.service;
import com.ruoyi.jarvis.domain.JDOrder;
/**
* 物流信息服务接口
*/
public interface ILogisticsService {
/**
* 获取物流信息并推送(如果获取到运单号)
* @param order 订单信息
* @return 是否成功获取并推送
*/
boolean fetchLogisticsAndPush(JDOrder order);
/**
* 检查订单是否已处理过Redis中是否有运单号
* @param orderId 订单ID
* @return 如果已处理返回true否则返回false
*/
boolean isOrderProcessed(Long orderId);
/**
* 检查物流服务健康状态
* @return 健康状态信息,包含是否健康、状态描述等
*/
HealthCheckResult checkHealth();
/**
* 健康检测结果
*/
class HealthCheckResult {
private boolean healthy;
private String status;
private String message;
private String serviceUrl;
public HealthCheckResult(boolean healthy, String status, String message, String serviceUrl) {
this.healthy = healthy;
this.status = status;
this.message = message;
this.serviceUrl = serviceUrl;
}
public boolean isHealthy() {
return healthy;
}
public void setHealthy(boolean healthy) {
this.healthy = healthy;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
public String getServiceUrl() {
return serviceUrl;
}
public void setServiceUrl(String serviceUrl) {
this.serviceUrl = serviceUrl;
}
}
}