ebike-plus/ebike-user/src/main/java/com/cdzy/user/service/EbikeOrderService.java

131 lines
2.9 KiB
Java
Raw Normal View History

2025-10-15 17:38:13 +08:00
package com.cdzy.user.service;
2025-11-17 16:03:28 +08:00
import com.cdzy.common.model.request.PageParam;
2025-10-31 17:02:53 +08:00
import com.cdzy.user.model.dto.EbikeUserCyclingDto;
2025-11-11 15:59:49 +08:00
import com.cdzy.user.model.dto.EbikeUserCyclingEndDto;
2025-10-29 17:01:46 +08:00
import com.cdzy.user.model.entity.EbikeOrder;
2025-11-28 14:28:42 +08:00
import com.cdzy.user.model.vo.EbikeRevenueStatisticsVo;
import com.cdzy.user.model.vo.EbikeUserAllOrdersVo;
2025-11-07 17:41:57 +08:00
import com.ebike.feign.model.dto.FeignEbikeDto;
2025-11-11 10:19:30 +08:00
import com.ebike.feign.model.dto.FeignEbikeUserBikeInfo;
2025-10-29 16:10:00 +08:00
import com.ebike.feign.model.dto.FeignOrderPaymentDto;
2025-11-07 17:41:57 +08:00
import com.ebike.feign.model.vo.FeignEbikeBikeRadiusVo;
2025-11-17 16:03:28 +08:00
import com.mybatisflex.core.paginate.Page;
2025-10-15 17:38:13 +08:00
import com.mybatisflex.core.service.IService;
2025-11-07 17:41:57 +08:00
import java.util.List;
2025-10-15 17:38:13 +08:00
/**
* 用户订单 服务层
*
2025-11-14 16:24:04 +08:00
* @author yanglei
* @since 2025-10-15 17:06
2025-10-15 17:38:13 +08:00
*/
2025-10-29 17:01:46 +08:00
public interface EbikeOrderService extends IService<EbikeOrder> {
2025-10-16 11:39:47 +08:00
2025-10-28 09:40:32 +08:00
/**
* 生成骑行订单
*
* @param orderDto 用户骑行信息
* @return 骑行订单
*/
2025-11-11 15:59:49 +08:00
EbikeOrder saveRide(EbikeUserCyclingDto orderDto);
2025-10-28 09:40:32 +08:00
2025-10-16 11:39:47 +08:00
/**
* 检查历史订单
*
* @param userId 用户id
*/
2025-10-29 17:01:46 +08:00
EbikeOrder checkHistoryOrder(Long userId);
2025-10-28 09:40:32 +08:00
2025-10-29 16:10:00 +08:00
/**
* 订单支付
2025-11-07 17:41:57 +08:00
*
2025-10-29 16:10:00 +08:00
* @param orderPaymentDto 订单支付信息
*/
void payment(FeignOrderPaymentDto orderPaymentDto);
/**
* 订单发起退款
2025-11-07 17:41:57 +08:00
*
2025-10-29 16:10:00 +08:00
* @param orderId 订单ID
*/
2025-10-29 17:01:46 +08:00
void refundApply(Long orderId);
2025-10-29 16:10:00 +08:00
2025-10-29 14:06:51 +08:00
/**
* 订单退款
2025-11-07 17:41:57 +08:00
*
2025-10-29 14:06:51 +08:00
* @param orderId 订单ID
*/
2025-10-29 17:01:46 +08:00
void refund(Long orderId);
2025-10-28 09:40:32 +08:00
2025-10-29 14:06:51 +08:00
/**
* 订单退款完成
2025-11-07 17:41:57 +08:00
*
2025-10-29 14:06:51 +08:00
* @param orderId 订单ID
*/
2025-10-29 17:01:46 +08:00
void doneRefund(Long orderId);
2025-10-29 14:06:51 +08:00
/**
* 订单退款失败
2025-11-07 17:41:57 +08:00
*
2025-10-29 14:06:51 +08:00
* @param orderId 订单ID
*/
2025-10-29 17:01:46 +08:00
void failRefund(Long orderId);
2025-10-29 16:10:00 +08:00
/**
* 订单退款驳回
2025-11-07 17:41:57 +08:00
*
2025-10-29 16:10:00 +08:00
* @param orderId 订单ID
*/
2025-10-29 17:01:46 +08:00
void rejectRefund(Long orderId);
2025-10-29 16:10:00 +08:00
2025-11-07 17:41:57 +08:00
/**
* 获取半径内车辆信息
*
* @param feignEbikeBikeRadiusVo 半径内查询参数
* @return 所有车辆信息
*/
List<FeignEbikeDto> userRadiusList(FeignEbikeBikeRadiusVo feignEbikeBikeRadiusVo);
2025-11-11 10:19:30 +08:00
/**
* 获取车辆基本信息
2025-11-11 17:31:14 +08:00
*
2025-11-11 10:19:30 +08:00
* @param bikeCode 车辆编码
* @return 车辆基本信息
*/
FeignEbikeUserBikeInfo queryBikeInfo(String bikeCode);
2025-11-11 15:59:49 +08:00
2025-11-11 17:31:14 +08:00
/**
* 结束骑行
*
* @param endDto 结束骑行参数
* @return 订单id
*/
Long doneRide(EbikeUserCyclingEndDto endDto);
/**
* 根据订单Id查询订单状态
*
* @param orderId 订单ID
* @return 订单状态
*/
Integer getOrderStatus(Long orderId);
/**
* 根据用户id获取用户所有订单
*
* @param userId 用户id
* @return 用户订单
*/
Page<EbikeUserAllOrdersVo> getUserAllOrder(Long userId, Integer orderStatus, PageParam page);
2025-11-28 14:28:42 +08:00
/**
* 获取营收统计
*
* @return 营收统计
*/
List<EbikeRevenueStatisticsVo> getRevenueStatistics();
2025-10-15 17:38:13 +08:00
}