package com.brilliance.isc.mda.dao;

import com.brilliance.isc.bo.Trd;
import com.brilliance.isc.vo.finance.TrdQueryVo;
import com.brilliance.isc.vo.finance.TrdWithPtsCbbResponseVo;
import com.brilliance.isc.vo.lg.RptselRequestVo;
import com.brilliance.isc.vo.report.DfdReportVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Collection;
import java.util.List;
import java.util.Map;

@Mapper
public interface TrdMapper {

    int insert(Trd record);

    int insertSelective(Trd record);

    int updateByPrimaryKeySelective(Trd record);

    int updateByPrimaryKey(Trd record);

    int deleteByPrimaryKey(Trd record);

    int deleteByIds(Collection<Object> collection);

    Trd selectByPrimaryKey(Trd record);

    int dyncDelete(Map<String,Object> dyncMap);

    List<Trd> dyncRead(Map<String,Object> dyncMap);

    Trd getTrdByInr(String inr);

    Trd getTrdByParentInrAndType(@Param("pnttyp") String pnttyp, @Param("pntinr") String pntinr);

    int getCountByRef(String ref);

    int getBddCountByPntinr(String ref);

    int getCpdCountByRef(String ref);

    int getCpdCountByRefBchkeyinr(@Param("ref") String ref,@Param("bchinr") String bchinr);

    String selectByownref(String ownref);

    List<TrdWithPtsCbbResponseVo> queryTrd(TrdQueryVo trdQueryVo);

    Trd selectByfincod(String fincod);

    Trd selectByPnttypAndPntinr(@Param("pnttyp") String pnttyp, @Param("pntinr") String pntinr);


    List<TrdWithPtsCbbResponseVo> queryTrdInfo(TrdQueryVo trdQueryVo);

    /**
     * 海外代付余额明细报表（旧）
     */
    List<DfdReportVo> getReportX(RptselRequestVo rptselRequestVo);

    Trd selectByOwnref(String ownref);

    Trd selectBchByFincod(@Param("fincod") String fincod);

    int getTrdCntByPnttypAndPntinr(@Param("pntinr") String pntinr, @Param("pnttyp") String pnttyp);

}
