195 lines
4.3 KiB
Java
195 lines
4.3 KiB
Java
package com.ruoyi.system.service;
|
|
|
|
import java.math.BigDecimal;
|
|
import java.util.List;
|
|
|
|
import com.ruoyi.system.domain.EtOrder;
|
|
import com.ruoyi.system.domain.EtRefund;
|
|
import com.ruoyi.system.domain.vo.EtOrderVo;
|
|
import com.ruoyi.system.domain.vo.OperatingDataVo;
|
|
import com.ruoyi.system.domain.vo.RechargeVo;
|
|
import com.ruoyi.system.domain.vo.ReconciliationVo;
|
|
import com.wechat.pay.java.service.payments.jsapi.model.PrepayWithRequestPaymentResponse;
|
|
import com.wechat.pay.java.service.refund.model.Refund;
|
|
|
|
/**
|
|
* 订单Service接口
|
|
*
|
|
* @author 邱贞招
|
|
* @date 2024-04-08
|
|
*/
|
|
public interface IEtOrderService
|
|
{
|
|
/**
|
|
* 根据id查询订单
|
|
*
|
|
* @param orderId 订单主键
|
|
* @return 订单
|
|
*/
|
|
public EtOrder selectEtOrderByOrderId(Long orderId);
|
|
|
|
/**
|
|
* 根据订单号查询订单
|
|
*
|
|
* @param orderNo 订单号
|
|
* @return 订单
|
|
*/
|
|
public EtOrder selectEtOrderByOrderNo(String orderNo);
|
|
|
|
/**
|
|
* 根据微信内部订单号查询订单
|
|
*
|
|
* @param outTradeNo 微信内部订单号
|
|
* @return 订单
|
|
*/
|
|
public EtOrder selectEtOrderByOutTradeNo(String outTradeNo);
|
|
|
|
/**
|
|
* 根据订单号查询订单(详细)
|
|
*
|
|
* @param orderNo 订单号
|
|
* @return 订单
|
|
*/
|
|
public EtOrder getOrderInfo(String orderNo);
|
|
|
|
/**
|
|
* 查询订单列表
|
|
*
|
|
* @param etOrder 订单
|
|
* @return 订单集合
|
|
*/
|
|
public List<EtOrder> selectEtOrderList(EtOrder etOrder);
|
|
|
|
/**
|
|
* 查询订单列表(带数据隔离)
|
|
*
|
|
* @param etOrder 订单
|
|
* @return 订单集合
|
|
*/
|
|
public List<EtOrder> selectEtOrderListWithIsolate(EtOrder etOrder);
|
|
|
|
/**
|
|
* 新增订单
|
|
*
|
|
* @param etOrder 订单
|
|
* @return 结果
|
|
*/
|
|
public int insertEtOrder(EtOrder etOrder);
|
|
|
|
/**
|
|
* 修改订单
|
|
*
|
|
* @param etOrder 订单
|
|
* @return 结果
|
|
*/
|
|
public int updateEtOrder(EtOrder etOrder);
|
|
|
|
/**
|
|
* 根据订单号修改订单
|
|
*
|
|
* @param etOrder 订单
|
|
* @return 结果
|
|
*/
|
|
public int updateEtOrderByOrderNo(EtOrder etOrder);
|
|
|
|
/**
|
|
* 批量删除订单
|
|
*
|
|
* @param orderIds 需要删除的订单主键集合
|
|
* @return 结果
|
|
*/
|
|
public int deleteEtOrderByOrderIds(Long[] orderIds);
|
|
|
|
/**
|
|
* 删除订单信息 开锁时间
|
|
*
|
|
* @param orderId 订单主键
|
|
* @return 结果
|
|
*/
|
|
public int deleteEtOrderByOrderId(Long orderId);
|
|
|
|
/**
|
|
* 预下单
|
|
*/
|
|
public PrepayWithRequestPaymentResponse preOrder(EtOrderVo order);
|
|
|
|
/**
|
|
* 查询当前用户是否有正在进行中的订单
|
|
*/
|
|
List<EtOrder> isInOrder(Long userId,String orderNo);
|
|
|
|
/**
|
|
* 查询当前车辆是否有正在进行中的订单
|
|
*/
|
|
Boolean isInOrderBySn(String sn);
|
|
|
|
/**
|
|
* 创建订单
|
|
* @param order 订单信息
|
|
* @return 订单信息
|
|
*/
|
|
public EtOrder createOrder(EtOrderVo order,String orderNo);
|
|
|
|
/**
|
|
* 检验预约订单只能有一个
|
|
* @param userId 用户id
|
|
* @return 订单信息
|
|
*/
|
|
Boolean checkIsUnique(Long userId);
|
|
|
|
/**
|
|
* 运营数据
|
|
*/
|
|
OperatingDataVo getOperatingData(String timeStart,String timeEnd,String areaId);
|
|
|
|
/**
|
|
* 收入对账
|
|
*/
|
|
ReconciliationVo reconciliation(String timeStart, String timeEnd, String type,String sn,String areaId);
|
|
|
|
/**
|
|
* 最近一笔订单
|
|
*/
|
|
EtOrder latestOrder(EtOrder etOrder);
|
|
|
|
/**
|
|
* 订单退款
|
|
*/
|
|
int refund(EtOrder etOrder);
|
|
|
|
/**
|
|
* 提现
|
|
*/
|
|
int withdraw(EtOrder order, BigDecimal deposit);
|
|
|
|
/**
|
|
* 订单支付
|
|
*/
|
|
public EtRefund createRefund(EtOrder etOrder, BigDecimal refundAmount, BigDecimal appointmentFee, BigDecimal dispatchFee, BigDecimal manageFee, BigDecimal ridingFee, Refund refund, String type);
|
|
|
|
|
|
/**
|
|
* 查询充值/退款订单列表
|
|
*/
|
|
List<RechargeVo> rechargeList(EtOrder etOrder);
|
|
|
|
/**
|
|
* 获取当前正在骑行中的订单
|
|
*/
|
|
EtOrder getCurrentOrder(String sn);
|
|
|
|
|
|
/**
|
|
* 删除订单信息
|
|
*
|
|
* @param orderNo 订单号
|
|
* @return 结果
|
|
*/
|
|
int deleteEtOrderByOrderNo(String orderNo);
|
|
|
|
/**
|
|
* 押金抵扣
|
|
*/
|
|
int deduction(EtOrder etOrder);
|
|
}
|