package com.brilliance.isc.mda.dao;

import com.brilliance.isc.bo.Fcd;
import com.brilliance.isc.vo.lg.CshVo;
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 FcdMapper {

    int insert(Fcd record);

    int insertSelective(Fcd record);

    int updateByPrimaryKeySelective(Fcd record);

    int updateByPrimaryKey(Fcd record);

    int deleteByPrimaryKey(Fcd record);

    int deleteByIds(Collection<Object> collection);

    Fcd selectByPrimaryKey(Fcd record);

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

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

    List<Fcd> getFcdByPtyinr(@Param("ptyinr") String ptyinr, @Param("bussec") String bussec);

    int lockFcd(String inr);

    int updateFcdUseflgAndRegref(@Param("useflg") String useflg,
                                 @Param("regref") String regref,
                                 @Param("inr") String inr,
                                 @Param("oriUseflg") String oriUseflg);

    List<CshVo> getCshVoList1(@Param("ptyinr") String ptainr);

    List<CshVo> getCshVoList2(@Param("ptyinr") String ptainr);

    List<CshVo> getCshVoList3(@Param("ptyinr") String ptainr);
	
	int updateFcdPnttypAndinrByOwnref(@Param("pnttyp") String pnytyp,
                                      @Param("pntinr") String pntinr,
                                      @Param("ownref") String ownref);

    Fcd getFcdByInr(@Param("inr") String inr);

    Fcd getFcdByOwnref(@Param("ownref") String ownref);

    List<Fcd> getFcdByMarginAccount(@Param("ptyinr") String ptyinr, @Param("extact") String extact, @Param("engact") String engact);

    Fcd selectByPnttypAndPntinr(@Param("pnttyp") String pnttyp, @Param("pntinr") String pntinr);
}