package com.sonic.lion.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sonic.lion.domain.entity.ProcessingCharge;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface ProcessingChargeDao extends BaseMapper<ProcessingCharge> {

    @Select("select * from t_processing_charge")
    List<ProcessingCharge> findAll();

    @Select("select * from t_processing_charge where pay_channel != 12")
    List<ProcessingCharge> findOtherChannelAll();

    @Select("select * from t_processing_charge where pay_channel = 12 and next_hand_time < now() limit 50")
    List<ProcessingCharge> findPayssionChannelAll();

    @Select("select * from t_processing_charge where call_channel_record_id =  #{id} limit 1")
    ProcessingCharge findByRecordId(@Param("id")Long id);
}
