package com.xiaopeng.order.service;
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.xiaopeng.api.dto.order.GetOrderNumDto;
|
import com.xiaopeng.api.dto.statistics.OrderStatisticsDTO;
|
import com.xiaopeng.api.dto.statistics.StatisticsQueryDTO;
|
import com.xiaopeng.api.model.order.XpOrder;
|
import com.xiaopeng.api.vo.order.FareBreakdownVo;
|
import com.xiaopeng.api.vo.order.XpHistoryEndPointsVo;
|
import com.xiaopeng.api.vo.order.XpHistoryStartPointsVo;
|
import com.xiaopeng.api.vo.order.XpPointInfoVo;
|
import com.xiaopeng.common.core.domain.R;
|
import com.xiaopeng.common.core.web.page.PageInfo;
|
import com.xiaopeng.order.model.dto.XpOrderCommentDto;
|
import com.xiaopeng.order.model.dto.XpOrderPayDto;
|
import com.xiaopeng.order.model.query.XpHistoryOrderListQuery;
|
import com.xiaopeng.order.model.query.XpOrderPageQuery;
|
import com.xiaopeng.order.model.vo.XpOrderDetailVO;
|
import com.xiaopeng.order.model.vo.XpOrderHistoryVO;
|
import com.xiaopeng.order.model.vo.XpOrderPageVO;
|
|
import java.util.List;
|
|
/**
|
* <p>
|
* 订单 服务类
|
* </p>
|
*
|
* @author mitao
|
* @since 2026-02-03
|
*/
|
public interface IXpOrderService extends IService<XpOrder> {
|
|
/**
|
* 获取订单统计数据
|
*
|
* @param query 查询参数
|
* @return 订单统计数据
|
*/
|
OrderStatisticsDTO getOrderStatistics(StatisticsQueryDTO query);
|
|
/**
|
* 订单分页列表
|
*
|
* @param query 分页查询参数
|
* @return 分页结果
|
*/
|
PageInfo<XpOrderPageVO> pageList(XpOrderPageQuery query);
|
|
/**
|
* 获取订单详情
|
*
|
* @param id 订单ID
|
* @return 订单详情
|
*/
|
XpOrderDetailVO getOrderDetail(Long id);
|
|
/**
|
* 删除订单(逻辑删除)
|
*
|
* @param id 订单ID
|
*/
|
void deleteOrder(Long id);
|
|
/**
|
* 导出订单列表
|
*
|
* @param query 查询参数
|
* @return 订单列表
|
*/
|
List<XpOrderPageVO> exportList(XpOrderPageQuery query);
|
|
/**
|
* 取消或关闭订单
|
*
|
* @param orderId 订单ID
|
* @param type 操作类型:1=取消订单,2=关闭订单
|
*/
|
void cancelOrCloseOrder(Long orderId, Integer type);
|
|
/**
|
* 改派订单
|
*
|
* @param orderId 订单ID
|
* @param newVehicleId 新车辆ID
|
* @param reassignReason 改派原因(可选)
|
*/
|
void reassignOrder(Long orderId, Long newVehicleId, String reassignReason);
|
|
/**
|
* 获取用户快捷胶囊
|
* @param uid
|
* @return
|
*/
|
XpPointInfoVo getUserQuickCapsule(String uid);
|
|
/**
|
* 获取历史下单成功起点10条数据列表
|
* @param uid
|
* @return
|
*/
|
List<XpHistoryStartPointsVo> getHistoryStartPoints(String uid,double lon,double lat);
|
|
|
/**
|
* 获取正在进行中的订单
|
* @param uid
|
* @return
|
*/
|
XpOrderDetailVO getActiveOrder(String uid);
|
|
/**
|
* 获取历史下单成功终点10条数据列表
|
* @param uid
|
* @return
|
*/
|
List<XpHistoryEndPointsVo> getHistoryEndPoints(String uid, double lon, double lat);
|
|
/**
|
* 获取历史订单列表
|
* @param query
|
* @param uid
|
* @return
|
*/
|
XpOrderHistoryVO getHistoryOrderList(XpHistoryOrderListQuery query, String uid);
|
|
/**
|
* 取消订单
|
* @param orderId
|
* @param uid
|
*/
|
void cancelOrder(Long orderId,String uid);
|
|
/**
|
* 取消订单
|
* @param orderId
|
*/
|
void cancelOrder(String orderId);
|
|
/**
|
* 评价订单
|
* @param dto
|
* @param uid
|
*/
|
void comment(XpOrderCommentDto dto, String uid);
|
|
/**
|
* 修改订单状态
|
* @param orderId 订单id
|
* @param status 状态 0=已取消,1=待接单,2=待出发,3=接驾中,4=待客上车,5=乘客已上车,6=服务中,7=待客下车,8=待付款,9=待评价,10=已完成
|
* @return 修改结果
|
*/
|
R<String> updateOrderStatus(Long orderId, Integer status);
|
|
void endTrip(Long orderId, String uid);
|
|
R<FareBreakdownVo> fareBreakdown(Long orderId, String uid);
|
|
R payment(XpOrderPayDto dto, String uid);
|
|
/**
|
* 添加订单
|
* @param xpOrder
|
* @return
|
*/
|
boolean addOrder(XpOrder xpOrder);
|
|
/**
|
* 获取订单数量
|
* @return
|
*/
|
Integer getOrderNum(GetOrderNumDto dto);
|
|
}
|