package com.hfkj.dao;

import com.hfkj.entity.BsTransferAccounts;
import com.hfkj.entity.BsTransferAccountsExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;
import org.springframework.stereotype.Repository;

/**
 * 
 * 代码由工具生成,请勿修改!!!
 * 如果需要扩展请在其父类进行扩展
 * 
 **/
@Repository
public interface BsTransferAccountsMapper extends BsTransferAccountsMapperExt {
    @SelectProvider(type=BsTransferAccountsSqlProvider.class, method="countByExample")
    long countByExample(BsTransferAccountsExample example);

    @DeleteProvider(type=BsTransferAccountsSqlProvider.class, method="deleteByExample")
    int deleteByExample(BsTransferAccountsExample example);

    @Delete({
        "delete from bs_transfer_accounts",
        "where id = #{id,jdbcType=BIGINT}"
    })
    int deleteByPrimaryKey(Long id);

    @Insert({
        "insert into bs_transfer_accounts (mer_id, mer_no, ",
        "mer_name, mer_abbreviate, ",
        "order_no, platform_order_no, ",
        "receiver_platform_type, receiver_platform_no, ",
        "amount, shd_fee_amt, ",
        "settle_date, content, ",
        "`status`, transfer_time, ",
        "create_time, create_type, ",
        "update_time, rebate_transfer_cycle_identifier, ",
        "ext_1, ext_2, ext_3)",
        "values (#{merId,jdbcType=BIGINT}, #{merNo,jdbcType=VARCHAR}, ",
        "#{merName,jdbcType=VARCHAR}, #{merAbbreviate,jdbcType=VARCHAR}, ",
        "#{orderNo,jdbcType=VARCHAR}, #{platformOrderNo,jdbcType=VARCHAR}, ",
        "#{receiverPlatformType,jdbcType=INTEGER}, #{receiverPlatformNo,jdbcType=VARCHAR}, ",
        "#{amount,jdbcType=DECIMAL}, #{shdFeeAmt,jdbcType=DECIMAL}, ",
        "#{settleDate,jdbcType=DATE}, #{content,jdbcType=VARCHAR}, ",
        "#{status,jdbcType=INTEGER}, #{transferTime,jdbcType=TIMESTAMP}, ",
        "#{createTime,jdbcType=TIMESTAMP}, #{createType,jdbcType=INTEGER}, ",
        "#{updateTime,jdbcType=TIMESTAMP}, #{rebateTransferCycleIdentifier,jdbcType=BIGINT}, ",
        "#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})"
    })
    @Options(useGeneratedKeys=true,keyProperty="id")
    int insert(BsTransferAccounts record);

    @InsertProvider(type=BsTransferAccountsSqlProvider.class, method="insertSelective")
    @Options(useGeneratedKeys=true,keyProperty="id")
    int insertSelective(BsTransferAccounts record);

    @SelectProvider(type=BsTransferAccountsSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
        @Result(column="mer_id", property="merId", jdbcType=JdbcType.BIGINT),
        @Result(column="mer_no", property="merNo", jdbcType=JdbcType.VARCHAR),
        @Result(column="mer_name", property="merName", jdbcType=JdbcType.VARCHAR),
        @Result(column="mer_abbreviate", property="merAbbreviate", jdbcType=JdbcType.VARCHAR),
        @Result(column="order_no", property="orderNo", jdbcType=JdbcType.VARCHAR),
        @Result(column="platform_order_no", property="platformOrderNo", jdbcType=JdbcType.VARCHAR),
        @Result(column="receiver_platform_type", property="receiverPlatformType", jdbcType=JdbcType.INTEGER),
        @Result(column="receiver_platform_no", property="receiverPlatformNo", jdbcType=JdbcType.VARCHAR),
        @Result(column="amount", property="amount", jdbcType=JdbcType.DECIMAL),
        @Result(column="shd_fee_amt", property="shdFeeAmt", jdbcType=JdbcType.DECIMAL),
        @Result(column="settle_date", property="settleDate", jdbcType=JdbcType.DATE),
        @Result(column="content", property="content", jdbcType=JdbcType.VARCHAR),
        @Result(column="status", property="status", jdbcType=JdbcType.INTEGER),
        @Result(column="transfer_time", property="transferTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="create_type", property="createType", jdbcType=JdbcType.INTEGER),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="rebate_transfer_cycle_identifier", property="rebateTransferCycleIdentifier", jdbcType=JdbcType.BIGINT),
        @Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR),
        @Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR),
        @Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR)
    })
    List<BsTransferAccounts> selectByExample(BsTransferAccountsExample example);

    @Select({
        "select",
        "id, mer_id, mer_no, mer_name, mer_abbreviate, order_no, platform_order_no, receiver_platform_type, ",
        "receiver_platform_no, amount, shd_fee_amt, settle_date, content, `status`, transfer_time, ",
        "create_time, create_type, update_time, rebate_transfer_cycle_identifier, ext_1, ",
        "ext_2, ext_3",
        "from bs_transfer_accounts",
        "where id = #{id,jdbcType=BIGINT}"
    })
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
        @Result(column="mer_id", property="merId", jdbcType=JdbcType.BIGINT),
        @Result(column="mer_no", property="merNo", jdbcType=JdbcType.VARCHAR),
        @Result(column="mer_name", property="merName", jdbcType=JdbcType.VARCHAR),
        @Result(column="mer_abbreviate", property="merAbbreviate", jdbcType=JdbcType.VARCHAR),
        @Result(column="order_no", property="orderNo", jdbcType=JdbcType.VARCHAR),
        @Result(column="platform_order_no", property="platformOrderNo", jdbcType=JdbcType.VARCHAR),
        @Result(column="receiver_platform_type", property="receiverPlatformType", jdbcType=JdbcType.INTEGER),
        @Result(column="receiver_platform_no", property="receiverPlatformNo", jdbcType=JdbcType.VARCHAR),
        @Result(column="amount", property="amount", jdbcType=JdbcType.DECIMAL),
        @Result(column="shd_fee_amt", property="shdFeeAmt", jdbcType=JdbcType.DECIMAL),
        @Result(column="settle_date", property="settleDate", jdbcType=JdbcType.DATE),
        @Result(column="content", property="content", jdbcType=JdbcType.VARCHAR),
        @Result(column="status", property="status", jdbcType=JdbcType.INTEGER),
        @Result(column="transfer_time", property="transferTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="create_type", property="createType", jdbcType=JdbcType.INTEGER),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="rebate_transfer_cycle_identifier", property="rebateTransferCycleIdentifier", jdbcType=JdbcType.BIGINT),
        @Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR),
        @Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR),
        @Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR)
    })
    BsTransferAccounts selectByPrimaryKey(Long id);

    @UpdateProvider(type=BsTransferAccountsSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") BsTransferAccounts record, @Param("example") BsTransferAccountsExample example);

    @UpdateProvider(type=BsTransferAccountsSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") BsTransferAccounts record, @Param("example") BsTransferAccountsExample example);

    @UpdateProvider(type=BsTransferAccountsSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(BsTransferAccounts record);

    @Update({
        "update bs_transfer_accounts",
        "set mer_id = #{merId,jdbcType=BIGINT},",
          "mer_no = #{merNo,jdbcType=VARCHAR},",
          "mer_name = #{merName,jdbcType=VARCHAR},",
          "mer_abbreviate = #{merAbbreviate,jdbcType=VARCHAR},",
          "order_no = #{orderNo,jdbcType=VARCHAR},",
          "platform_order_no = #{platformOrderNo,jdbcType=VARCHAR},",
          "receiver_platform_type = #{receiverPlatformType,jdbcType=INTEGER},",
          "receiver_platform_no = #{receiverPlatformNo,jdbcType=VARCHAR},",
          "amount = #{amount,jdbcType=DECIMAL},",
          "shd_fee_amt = #{shdFeeAmt,jdbcType=DECIMAL},",
          "settle_date = #{settleDate,jdbcType=DATE},",
          "content = #{content,jdbcType=VARCHAR},",
          "`status` = #{status,jdbcType=INTEGER},",
          "transfer_time = #{transferTime,jdbcType=TIMESTAMP},",
          "create_time = #{createTime,jdbcType=TIMESTAMP},",
          "create_type = #{createType,jdbcType=INTEGER},",
          "update_time = #{updateTime,jdbcType=TIMESTAMP},",
          "rebate_transfer_cycle_identifier = #{rebateTransferCycleIdentifier,jdbcType=BIGINT},",
          "ext_1 = #{ext1,jdbcType=VARCHAR},",
          "ext_2 = #{ext2,jdbcType=VARCHAR},",
          "ext_3 = #{ext3,jdbcType=VARCHAR}",
        "where id = #{id,jdbcType=BIGINT}"
    })
    int updateByPrimaryKey(BsTransferAccounts record);
}