package com.sonic.lion.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sonic.lion.domain.entity.PayAccountFundThird;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

public interface PayAccountFundThirdDao extends BaseMapper<PayAccountFundThird> {

    PayAccountFundThird selectByAccountFundId(@Param("accountFundId") Long accountFundId);

    @Delete("delete from t_pay_account_fund_third where account_id =#{accountId} AND app_type=#{appType}")
    int deleteByAccountIdAndType(@Param("accountId") Long accountId,@Param("appType")Integer appType);


    @Update("update t_pay_account_fund_third set email = #{email}, extend = #{extend} where id = #{id}")
    void updateEmailAndExtend(@Param("id") Long id, @Param("email") String email, @Param("extend") String extend);

}