package com.yonge.cooleshow.biz.dal.dao;

import java.util.List;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.ibatis.annotations.Param;
import com.yonge.cooleshow.biz.dal.entity.UserBankCard;
import com.yonge.cooleshow.biz.dal.vo.UserBankCardVo;
import com.yonge.cooleshow.biz.dal.dto.search.UserBankCardSearch;


public interface UserBankCardDao extends BaseMapper<UserBankCard>{
	/**
	 * 查询详情
     * @author liweifan
     * @date 2022-03-30 13:53:51
     * @return: com.yonge.cooleshow.biz.dal.vo.UserBankCardVo
	 */
	UserBankCardVo detail(@Param("id") Long id);

	/**
	 * 分页查询
     * @author liweifan
     * @date 2022-03-30 13:53:51
     * @return: com.yonge.cooleshow.biz.dal.vo.UserBankCardVo
	 */
	List<UserBankCardVo> selectPage(@Param("page") IPage page, @Param("param") UserBankCardSearch userBankCard);
	/***
	 * 查询用户默认银行卡
	 * @author liweifan
	 * @param: userId
	 * @updateTime 2022/4/7 14:37
	 * @return: com.yonge.cooleshow.biz.dal.vo.UserBankCardVo
	 */
	UserBankCardVo getDefaultBankByUserId(@Param("userId") Long userId);
	/***
	 * 获取用户银行卡
	 * @author liweifan
	 * @param: userId
	 * @param: bankCardId
	 * @updateTime 2022/4/7 15:36
	 * @return: com.yonge.cooleshow.biz.dal.vo.UserBankCardVo
	 */
    UserBankCardVo getBankByUserIdAndCardId(@Param("userId") Long userId,@Param("bankCardId")  Long bankCardId);
	/***
	 * 删除用户所有银行卡
	 * @author liweifan
	 * @param: userId
	 * @updateTime 2022/4/14 16:36
	 * @return: java.lang.Integer
	 */
	Integer deleteById(@Param("id") Long id);
	/***
	 * 删除用户所有银行卡
	 * @author liweifan
	 * @param: userId
	 * @updateTime 2022/4/14 16:36
	 * @return: java.lang.Integer
	 */
    Integer deleteByUserId(@Param("userId") Long userId);
}