package com.xhpc.activity.mapper;

import com.xhpc.activity.domain.XhpcClearingHistoryOrderDomain;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

public interface XhpcClearingHistoryOrderMapper {
    int deleteLogicByPrimaryKey(Long clearingOrderId);

    int deleteByPrimaryKey(Long clearingOrderId);

    int insertBatch(@Param("domainList") List<XhpcClearingHistoryOrderDomain> domainList);

    int insert(XhpcClearingHistoryOrderDomain record);

    XhpcClearingHistoryOrderDomain selectByPrimaryKey(Long clearingOrderId);

    int updateByPrimaryKey(XhpcClearingHistoryOrderDomain record);

    List<XhpcClearingHistoryOrderDomain> getListPage(@Param("params") Map params);

    List<XhpcClearingHistoryOrderDomain> getorderExportPage(@Param("params") Map params);

    String getClearingOrderIds(@Param("params") Map params);

    int updateStatusBatchByOrderIds(@Param("orderIds") String orderIds, @Param("status") Integer status, @Param("checkBy")String checkBy);

    BigDecimal selectCheckedAmount(@Param("operatorId")String operatorId);

    Map<String, Object> selectCashAmount(@Param("operatorId")String operatorId);

    //去除不参与清分的金额
    Map<String, Object> selectCashAmountYu(@Param("operatorId")String operatorId);

    List<Map<String, Object>> selectOrderPage(@Param("params") Map<String, Object> params);

    List<XhpcClearingHistoryOrderDomain> selectOrderListByOperator(@Param("operatorId")String operatorId);

    int updateCheckoutByOperator(@Param("operatorId")Long operatorId, @Param("checkoutId")Long checkoutId);

    int updateCheckoutByOrderId(@Param("orderIds")String orderIds, @Param("checkoutId")Long checkoutId);


    /**
     * 获取登陆用户信息
     */
    Map<String, Object> getLandUser(@Param("userId")Long userId);



    /**
     * 历史订单记录（PC）
     * @return
     */
    List<Map<String,Object>> getOrderListPage(@Param("phone")String phone,@Param("transactionNumber")String transactionNumber,@Param("status")Integer status,@Param("chargingStationName")String chargingStationName,@Param("operatorId")Long operatorId,@Param("source")Integer source,@Param("beginStartTime")String beginStartTime,@Param("beginEndTime")String beginEndTime,@Param("userId")Long userId,@Param("type")Integer type,@Param("number")Integer number,@Param("affiliationOrganization")String affiliationOrganization,@Param("evcsOrderNo")String evcsOrderNo,@Param("plateNum")String plateNum,@Param("internetId")Integer internetId,@Param("internetSerialNumber")String internetSerialNumber,@Param("terminalName")String terminalName,@Param("vinCode")String vinCode,@Param("overStartTime")String overStartTime,@Param("overEndTime")String overEndTime,@Param("personnelId")Long personnelId,@Param("confirmResult")Integer confirmResult,@Param("tenantId")String tenantId,@Param("isNotNull")Integer isNotNull, @Param("checkoutId")Integer checkoutId);

}
