package com.xhpc.card.mapper;

import com.xhpc.card.domain.OperateCardsLogRequest;
import com.xhpc.card.domain.OperateDevicesLogRequest;
import com.xhpc.card.pojo.TIccardLog;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface TIccardLogMapper {

    int deleteByPrimaryKey(Integer id);

    int insert(TIccardLog record);

    int insertSelective(TIccardLog record);

    TIccardLog selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(TIccardLog record);

    int updateByPrimaryKey(TIccardLog record);

    /**
     * query list of log of operate card
     *
     * @author WH
     * @date 2022/2/13 22:43
     * @since version-1.0
     */
    List<TIccardLog> selectByCondition(OperateCardsLogRequest operateCardsLogRequest);

    /**
     * query count of list of log of operate card
     *
     * @author WH
     * @date 2022/2/13 23:11
     * @since version-1.0
     */
    Long selectCountByCondition(OperateCardsLogRequest operateCardsLogRequest);

    /**
     * query list of log of operate device
     *
     * @author WH
     * @date 2022/2/14 13:59
     * @since version-1.0
     */
    List<TIccardLog> selectDeviceLogListByCondition(OperateDevicesLogRequest operateDevicesLogRequest);

    /**
     * query count of log of operating device
     *
     * @author WH
     * @date 2022/2/14 14:22
     * @since version-1.0
     */
    Long selectCountOfDeviceLogListByCondition(OperateDevicesLogRequest operateDevicesLogRequest);

    /**
     * query log about recharge records by uniqueId of card
     *
     * @author WH
     * @date 2022/2/15 9:43
     * @since version-1.0
     */
    List<TIccardLog> selectRechargeLogByUniqueId(@Param("uniqueId") String uniqueId, @Param("currentPage") Long currentPage, @Param("items") Long items);

    /**
     * query log count about recharge records by uniqueId of card
     *
     * @author WH
     * @date 2022/2/15 9:43
     * @since version-1.0
     */
    Long selectCountRechargeLogByUniqueId(@Param("uniqueId") String uniqueId);

}
