package com.jsowell.pile.mapper; import com.jsowell.pile.domain.OrderBasicInfo; import com.jsowell.pile.domain.OrderDetail; import com.jsowell.pile.dto.*; import com.jsowell.pile.dto.nanrui.NRQueryOrderDTO; import com.jsowell.pile.dto.ningxiajiaotou.NXJTQueryOrdersInfoDTO; import com.jsowell.pile.vo.uniapp.business.BusinessOrderDetailInfoVO; import com.jsowell.pile.vo.SupStationStatsVO; import com.jsowell.pile.vo.base.MerchantOrderInfoVO; import com.jsowell.pile.vo.lianlian.AccumulativeInfoVO; import com.jsowell.pile.vo.nanrui.JiangSuOrderInfoVO; import com.jsowell.pile.vo.uniapp.customer.OrderVO; import com.jsowell.pile.vo.uniapp.customer.PersonPileConnectorSumInfoVO; import com.jsowell.pile.vo.uniapp.customer.SendMessageVO; import com.jsowell.pile.vo.web.*; import org.apache.ibatis.annotations.Param; import org.springframework.stereotype.Repository; import java.time.LocalDateTime; import java.util.List; @Repository public interface OrderBasicInfoMapper { /** * delete by primary key * * @param id primaryKey * @return deleteCount */ int deleteByPrimaryKey(Integer id); /** * insert record to table * * @param record the record * @return insert count */ int insert(OrderBasicInfo record); int insertOrUpdate(OrderBasicInfo record); int insertOrUpdateSelective(OrderBasicInfo record); /** * insert record to table selective * * @param record the record * @return insert count */ int insertSelective(OrderBasicInfo record); /** * select by primary key * * @param id primary key * @return object by primary key */ OrderBasicInfo selectByPrimaryKey(Integer id); /** * update record selective * * @param record the updated record * @return update count */ int updateByPrimaryKeySelective(OrderBasicInfo record); /** * update record * * @param record the updated record * @return update count */ int updateByPrimaryKey(OrderBasicInfo record); int updateBatch(List list); int updateBatchSelective(List list); int batchInsert(@Param("list") List list); /** * 查询订单 * * @param id 订单主键 * @return 订单 */ OrderBasicInfo selectOrderBasicInfoById(Long id); /** * 条件查询订单基础信息 * * @param info * @return */ OrderBasicInfo getOrderBasicInfo(OrderBasicInfo info); /** * 查询订单列表 * * @param orderBasicInfo 订单 * @return 订单集合 */ List selectOrderBasicInfoList(QueryOrderDTO orderBasicInfo); /** * 新增订单 * * @param orderBasicInfo 订单 * @return 结果 */ int insertOrderBasicInfo(OrderBasicInfo orderBasicInfo); /** * 修改订单 * * @param orderBasicInfo 订单 * @return 结果 */ int updateOrderBasicInfo(OrderBasicInfo orderBasicInfo); /** * 批量删除订单 * * @param ids 需要删除的数据主键集合 * @return 结果 */ int deleteOrderBasicInfoByIds(Long[] ids); /** * 批量删除订单详情 * * @param ids 需要删除的数据主键集合 * @return 结果 */ int deleteOrderDetailByOrderCodes(Long[] ids); /** * 批量新增订单详情 * * @param orderDetailList 订单详情列表 * @return 结果 */ int batchOrderDetail(List orderDetailList); /** * 通过订单主键删除订单详情信息 * * @param id 订单ID * @return 结果 */ int deleteOrderDetailByOrderCode(Long id); /** * 修改订单详情 * * @param orderDetail 订单详情 */ int updateOrderDetail(OrderDetail orderDetail); /** * 通过订单号查询订单基本信息 * * @param orderCode 订单号 * @return */ OrderBasicInfo getOrderInfoByOrderCode(String orderCode); OrderBasicInfo getOrderInfoByTransactionCode(String transactionCode); /** * 根据桩编号和枪口号查询某状态订单 * * @param pileSn 桩编号 * @param connectorCode 枪口号 * @param orderStatus 订单状态 * @return 订单 */ OrderBasicInfo queryOrderBasicInfo(@Param("pileSn") String pileSn, @Param("connectorCode") String connectorCode, @Param("orderStatus") String orderStatus); /** * 通过订单号查询订单详情 * * @param orderCode 订单号 * @return 订单详情 */ OrderDetail getOrderDetailByOrderCode(@Param("orderCode") String orderCode); /** * 通过会员Id和订单状态查询订单信息 * * @param memberId 会员id * @param orderStatusList 订单状态集合 * @param dateTime * @return */ List getListByMemberIdAndOrderStatus(@Param("memberId") String memberId, @Param("orderStatusList") List orderStatusList, @Param("dateTime") LocalDateTime dateTime, @Param("stationId") String stationId); /** * 将某订单修改为某状态 * * @param orderCode 订单号 * @param orderStatus 修改为某状态 */ void updateOrderStatusByOrderCode(@Param("orderCode") String orderCode, @Param("orderStatus") String orderStatus); /** * 首页订单数据展示 * * @param dto 首页信息查询dto * @return */ List getIndexOrderInfo(@Param("dto") IndexQueryDTO dto); /** * 首页订单数据展示 V2 * * @param dto 首页信息查询dto * @return */ List getIndexOrderInfoV2(@Param("dto") IndexQueryDTO dto); /** * 获取超过15分钟的待支付状态订单 * * @return */ List getUnpaidOrderListOver15Min(@Param("createTime") String createTime); /** * 根据orderId批量修改订单状态 * * @param orderIds * @param orderStatus */ void updateOrderStatusById(@Param("orderIds") List orderIds, @Param("orderStatus") String orderStatus); /** * 通过订单号查询订单信息(小程序发送消息用) * * @param orderCode * @return */ SendMessageVO selectOrderInfoByOrderCode(@Param("orderCode") String orderCode); List selectOrderListByTimeRangeAndStatus(@Param("startTime") String startTime, @Param("endTime") String endTime, @Param("orderStatus") String orderStatus, @Param("payStatus") String payStatus); /** * 个人桩查询充电数据 * * @param dto * @return */ List getAccumulativeInfo(QueryPersonPileDTO dto); List getReservedOrder(LocalDateTime dateTime); List getListByOrderCodes(@Param("orderCodes") List orderCodes); /** * 联联平台 获取累计数据用 * * @param dto * @return */ List getAccumulativeInfoForLianLian(QueryStationInfoDTO dto); List queryElecAmountNullList(); int batchUpdateOrderDetail(@Param("list") List orderDetailList); List getOrderDetailList(List orderCodes); List tempQueryWeChatRefundOrders(@Param("startTime") String startTime, @Param("endTime") String endTime); /** * 获取运营商订单列表 * * @param dto * @return */ List getMerchantOrderInfoList(@Param("dto") QueryMerchantOrderDTO dto); List batchRefundQuery(List orderCodeList); /** * 根据订单编号 * * @param orderCodeList 订单编号列表 * @return */ List queryOrderList(@Param("orderCodeList") List orderCodeList); /** * 获取首页订单详情 * * @param orderCodeList * @return */ IndexOrderInfoVO getIndexOrderDetail(@Param("list") List orderCodeList); /** * 通过站点id修改运营商id * * @param stationId * @return */ int updateMerchantByStationId(@Param("stationId") Long stationId, @Param("newMerchantId") String newMerchantId); /** * 通过订单编号获取南瑞平台所需要的订单数据信息 * * @param dto * @return */ List getNROrderInfoByOrderCode(@Param("dto") NRQueryOrderDTO dto); List queryOrderPayDetail(@Param("startTime") String startTime, @Param("endTime") String endTime); /** * 根据车牌号查询订单信息(宁夏交投 用) * * @param dto * @return */ List getOrderInfoByNXJT(NXJTQueryOrdersInfoDTO dto); OrderTotalDataVO getOrderTotalData(QueryOrderDTO dto); List queryRepayOrder(String memberId); /** * 根据集团编号查询订单列表 * 条件:订单完成状态;余额支付;有集团优惠 * @param groupCode 集团编号 * @return 订单列表 */ List queryOrderListByGroupCode(String groupCode); /** * 查询新电途订单列表 * @param merchantId * @param stationId * @param startDate * @param endDate * @return */ List queryXDTOrderList(String merchantId, String stationId, String startDate, String endDate); /** * 根据订单编号查询订单详细信息(包括充电计费明细) * @param orderCode * @return */ OrderVO getChargeOrderInfoByOrderCode(String orderCode); /** * 通过站点id查询订单信息 * @param stationId * @return */ List queryOrderListByStationId(String stationId); List queryOrderByOccupyTime(QueryOrderDTO dto); /** * 通过站点id查询订单详情 * @param stationIds * @param startTime * @param endTime * @return */ List getOrderDetailByStationIds(@Param("stationIds") List stationIds, @Param("startTime") String startTime, @Param("endTime") String endTime); }