package com.oqpo.api.mapper.loanmng;


import com.oqpo.api.entity.loanmng.LoanMgntBaseInfoEntity;
import com.oqpo.api.entity.settmng.PgKiccBaseInfoEntity;
import com.oqpo.api.entity.settmng.PgKiccPayPtclEntity;
import com.oqpo.api.entity.settmng.StlMgntBaseInfoEntity;
import com.oqpo.api.entity.settmng.StlMgntDtlPtclEntity;
import com.oqpo.api.web.dto.request.GridRequest;
import com.oqpo.api.web.dto.request.loanmng.EasypayPaymentRequest;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface UnpaidMngMapper {

    List<StlMgntBaseInfoEntity> selectUnpaidMngGridList(@Param("sBrandId") String sBrandId, @Param("sStoreId") String sStoreId,
                                                        @Param("fromDt") String fromDt, @Param("toDt") String toDt, GridRequest gridRequest) throws Exception;

    int selectUnpaidMngGridCnt(@Param("sBrandId") String sBrandId, @Param("sStoreId") String sStoreId,
                               @Param("fromDt") String fromDt, @Param("toDt") String toDt) throws Exception;

    StlMgntBaseInfoEntity selectStlMgntBaseInfo(@Param("sttlMgntUnqNo") String sttlMgntUnqNo) throws Exception;

    List<StlMgntDtlPtclEntity> selectStlMgntDtlPtclList(@Param("sttlMgntUnqNo") String sttlMgntUnqNo) throws Exception;

    PgKiccBaseInfoEntity selectPgKiccBaseInfo(@Param("brandId") String brandId) throws Exception;

    int insertPgKiccPayPtcl(@Param("userId") String userId, PgKiccPayPtclEntity entity) throws Exception;

    int updateStlMgntBaseInfo4Rcpt(@Param("userId") String userId, StlMgntBaseInfoEntity entity) throws Exception;

    int updateLoanMgntBaseInfo4UnpaidPay(@Param("userId") String userId, LoanMgntBaseInfoEntity entity) throws Exception;

    int selectTotalUnpaidAmt(EasypayPaymentRequest easypayPaymentRequest) throws Exception;

}
