package com.hfkj.dao;

import com.hfkj.entity.BsStore;
import com.hfkj.entity.BsStoreExample;
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 BsStoreMapper extends BsStoreMapperExt {
    @SelectProvider(type=BsStoreSqlProvider.class, method="countByExample")
    long countByExample(BsStoreExample example);

    @DeleteProvider(type=BsStoreSqlProvider.class, method="deleteByExample")
    int deleteByExample(BsStoreExample example);

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

    @Insert({
        "insert into bs_store (company_id, company_name, ",
        "agent_id, agent_name, ",
        "salesman_id, salesman_name, ",
        "mer_id, mer_name, store_no, ",
        "`name`, telephone, ",
        "door_head_img, duty_people_name, ",
        "duty_people_phone, duty_people_email, ",
        "cash_register_img, internal_img, ",
        "business_license_img, other_img, ",
        "longitude, latitude, ",
        "address, alone_settle, ",
        "store_type, blis_url, ",
        "blis_name, blis_no, ",
        "blis_reg_address, blis_period_type, ",
        "blis_period_start, blis_period_end, ",
        "lar_id_card, lar_name, ",
        "lar_id_card_portrait_img, lar_id_card_national_emblem_img, ",
        "lar_id_card_address, lar_id_card_period_type, ",
        "lar_id_card_period_start, lar_id_card_period_end, ",
        "`status`, create_salesman_id, ",
        "create_salesman_name, create_type, ",
        "create_time, update_time, ",
        "ext_1, ext_2, ext_3)",
        "values (#{companyId,jdbcType=BIGINT}, #{companyName,jdbcType=VARCHAR}, ",
        "#{agentId,jdbcType=BIGINT}, #{agentName,jdbcType=VARCHAR}, ",
        "#{salesmanId,jdbcType=BIGINT}, #{salesmanName,jdbcType=VARCHAR}, ",
        "#{merId,jdbcType=BIGINT}, #{merName,jdbcType=VARCHAR}, #{storeNo,jdbcType=BIGINT}, ",
        "#{name,jdbcType=VARCHAR}, #{telephone,jdbcType=VARCHAR}, ",
        "#{doorHeadImg,jdbcType=VARCHAR}, #{dutyPeopleName,jdbcType=VARCHAR}, ",
        "#{dutyPeoplePhone,jdbcType=VARCHAR}, #{dutyPeopleEmail,jdbcType=VARCHAR}, ",
        "#{cashRegisterImg,jdbcType=VARCHAR}, #{internalImg,jdbcType=VARCHAR}, ",
        "#{businessLicenseImg,jdbcType=VARCHAR}, #{otherImg,jdbcType=VARCHAR}, ",
        "#{longitude,jdbcType=VARCHAR}, #{latitude,jdbcType=VARCHAR}, ",
        "#{address,jdbcType=VARCHAR}, #{aloneSettle,jdbcType=BIT}, ",
        "#{storeType,jdbcType=INTEGER}, #{blisUrl,jdbcType=VARCHAR}, ",
        "#{blisName,jdbcType=VARCHAR}, #{blisNo,jdbcType=VARCHAR}, ",
        "#{blisRegAddress,jdbcType=VARCHAR}, #{blisPeriodType,jdbcType=INTEGER}, ",
        "#{blisPeriodStart,jdbcType=VARCHAR}, #{blisPeriodEnd,jdbcType=VARCHAR}, ",
        "#{larIdCard,jdbcType=VARCHAR}, #{larName,jdbcType=VARCHAR}, ",
        "#{larIdCardPortraitImg,jdbcType=VARCHAR}, #{larIdCardNationalEmblemImg,jdbcType=VARCHAR}, ",
        "#{larIdCardAddress,jdbcType=VARCHAR}, #{larIdCardPeriodType,jdbcType=INTEGER}, ",
        "#{larIdCardPeriodStart,jdbcType=VARCHAR}, #{larIdCardPeriodEnd,jdbcType=VARCHAR}, ",
        "#{status,jdbcType=INTEGER}, #{createSalesmanId,jdbcType=BIGINT}, ",
        "#{createSalesmanName,jdbcType=VARCHAR}, #{createType,jdbcType=INTEGER}, ",
        "#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, ",
        "#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})"
    })
    @Options(useGeneratedKeys=true,keyProperty="id")
    int insert(BsStore record);

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

    @SelectProvider(type=BsStoreSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
        @Result(column="company_id", property="companyId", jdbcType=JdbcType.BIGINT),
        @Result(column="company_name", property="companyName", jdbcType=JdbcType.VARCHAR),
        @Result(column="agent_id", property="agentId", jdbcType=JdbcType.BIGINT),
        @Result(column="agent_name", property="agentName", jdbcType=JdbcType.VARCHAR),
        @Result(column="salesman_id", property="salesmanId", jdbcType=JdbcType.BIGINT),
        @Result(column="salesman_name", property="salesmanName", jdbcType=JdbcType.VARCHAR),
        @Result(column="mer_id", property="merId", jdbcType=JdbcType.BIGINT),
        @Result(column="mer_name", property="merName", jdbcType=JdbcType.VARCHAR),
        @Result(column="store_no", property="storeNo", jdbcType=JdbcType.BIGINT),
        @Result(column="name", property="name", jdbcType=JdbcType.VARCHAR),
        @Result(column="telephone", property="telephone", jdbcType=JdbcType.VARCHAR),
        @Result(column="door_head_img", property="doorHeadImg", jdbcType=JdbcType.VARCHAR),
        @Result(column="duty_people_name", property="dutyPeopleName", jdbcType=JdbcType.VARCHAR),
        @Result(column="duty_people_phone", property="dutyPeoplePhone", jdbcType=JdbcType.VARCHAR),
        @Result(column="duty_people_email", property="dutyPeopleEmail", jdbcType=JdbcType.VARCHAR),
        @Result(column="cash_register_img", property="cashRegisterImg", jdbcType=JdbcType.VARCHAR),
        @Result(column="internal_img", property="internalImg", jdbcType=JdbcType.VARCHAR),
        @Result(column="business_license_img", property="businessLicenseImg", jdbcType=JdbcType.VARCHAR),
        @Result(column="other_img", property="otherImg", jdbcType=JdbcType.VARCHAR),
        @Result(column="longitude", property="longitude", jdbcType=JdbcType.VARCHAR),
        @Result(column="latitude", property="latitude", jdbcType=JdbcType.VARCHAR),
        @Result(column="address", property="address", jdbcType=JdbcType.VARCHAR),
        @Result(column="alone_settle", property="aloneSettle", jdbcType=JdbcType.BIT),
        @Result(column="store_type", property="storeType", jdbcType=JdbcType.INTEGER),
        @Result(column="blis_url", property="blisUrl", jdbcType=JdbcType.VARCHAR),
        @Result(column="blis_name", property="blisName", jdbcType=JdbcType.VARCHAR),
        @Result(column="blis_no", property="blisNo", jdbcType=JdbcType.VARCHAR),
        @Result(column="blis_reg_address", property="blisRegAddress", jdbcType=JdbcType.VARCHAR),
        @Result(column="blis_period_type", property="blisPeriodType", jdbcType=JdbcType.INTEGER),
        @Result(column="blis_period_start", property="blisPeriodStart", jdbcType=JdbcType.VARCHAR),
        @Result(column="blis_period_end", property="blisPeriodEnd", jdbcType=JdbcType.VARCHAR),
        @Result(column="lar_id_card", property="larIdCard", jdbcType=JdbcType.VARCHAR),
        @Result(column="lar_name", property="larName", jdbcType=JdbcType.VARCHAR),
        @Result(column="lar_id_card_portrait_img", property="larIdCardPortraitImg", jdbcType=JdbcType.VARCHAR),
        @Result(column="lar_id_card_national_emblem_img", property="larIdCardNationalEmblemImg", jdbcType=JdbcType.VARCHAR),
        @Result(column="lar_id_card_address", property="larIdCardAddress", jdbcType=JdbcType.VARCHAR),
        @Result(column="lar_id_card_period_type", property="larIdCardPeriodType", jdbcType=JdbcType.INTEGER),
        @Result(column="lar_id_card_period_start", property="larIdCardPeriodStart", jdbcType=JdbcType.VARCHAR),
        @Result(column="lar_id_card_period_end", property="larIdCardPeriodEnd", jdbcType=JdbcType.VARCHAR),
        @Result(column="status", property="status", jdbcType=JdbcType.INTEGER),
        @Result(column="create_salesman_id", property="createSalesmanId", jdbcType=JdbcType.BIGINT),
        @Result(column="create_salesman_name", property="createSalesmanName", jdbcType=JdbcType.VARCHAR),
        @Result(column="create_type", property="createType", jdbcType=JdbcType.INTEGER),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP),
        @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<BsStore> selectByExample(BsStoreExample example);

    @Select({
        "select",
        "id, company_id, company_name, agent_id, agent_name, salesman_id, salesman_name, ",
        "mer_id, mer_name, store_no, `name`, telephone, door_head_img, duty_people_name, ",
        "duty_people_phone, duty_people_email, cash_register_img, internal_img, business_license_img, ",
        "other_img, longitude, latitude, address, alone_settle, store_type, blis_url, ",
        "blis_name, blis_no, blis_reg_address, blis_period_type, blis_period_start, blis_period_end, ",
        "lar_id_card, lar_name, lar_id_card_portrait_img, lar_id_card_national_emblem_img, ",
        "lar_id_card_address, lar_id_card_period_type, lar_id_card_period_start, lar_id_card_period_end, ",
        "`status`, create_salesman_id, create_salesman_name, create_type, create_time, ",
        "update_time, ext_1, ext_2, ext_3",
        "from bs_store",
        "where id = #{id,jdbcType=BIGINT}"
    })
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
        @Result(column="company_id", property="companyId", jdbcType=JdbcType.BIGINT),
        @Result(column="company_name", property="companyName", jdbcType=JdbcType.VARCHAR),
        @Result(column="agent_id", property="agentId", jdbcType=JdbcType.BIGINT),
        @Result(column="agent_name", property="agentName", jdbcType=JdbcType.VARCHAR),
        @Result(column="salesman_id", property="salesmanId", jdbcType=JdbcType.BIGINT),
        @Result(column="salesman_name", property="salesmanName", jdbcType=JdbcType.VARCHAR),
        @Result(column="mer_id", property="merId", jdbcType=JdbcType.BIGINT),
        @Result(column="mer_name", property="merName", jdbcType=JdbcType.VARCHAR),
        @Result(column="store_no", property="storeNo", jdbcType=JdbcType.BIGINT),
        @Result(column="name", property="name", jdbcType=JdbcType.VARCHAR),
        @Result(column="telephone", property="telephone", jdbcType=JdbcType.VARCHAR),
        @Result(column="door_head_img", property="doorHeadImg", jdbcType=JdbcType.VARCHAR),
        @Result(column="duty_people_name", property="dutyPeopleName", jdbcType=JdbcType.VARCHAR),
        @Result(column="duty_people_phone", property="dutyPeoplePhone", jdbcType=JdbcType.VARCHAR),
        @Result(column="duty_people_email", property="dutyPeopleEmail", jdbcType=JdbcType.VARCHAR),
        @Result(column="cash_register_img", property="cashRegisterImg", jdbcType=JdbcType.VARCHAR),
        @Result(column="internal_img", property="internalImg", jdbcType=JdbcType.VARCHAR),
        @Result(column="business_license_img", property="businessLicenseImg", jdbcType=JdbcType.VARCHAR),
        @Result(column="other_img", property="otherImg", jdbcType=JdbcType.VARCHAR),
        @Result(column="longitude", property="longitude", jdbcType=JdbcType.VARCHAR),
        @Result(column="latitude", property="latitude", jdbcType=JdbcType.VARCHAR),
        @Result(column="address", property="address", jdbcType=JdbcType.VARCHAR),
        @Result(column="alone_settle", property="aloneSettle", jdbcType=JdbcType.BIT),
        @Result(column="store_type", property="storeType", jdbcType=JdbcType.INTEGER),
        @Result(column="blis_url", property="blisUrl", jdbcType=JdbcType.VARCHAR),
        @Result(column="blis_name", property="blisName", jdbcType=JdbcType.VARCHAR),
        @Result(column="blis_no", property="blisNo", jdbcType=JdbcType.VARCHAR),
        @Result(column="blis_reg_address", property="blisRegAddress", jdbcType=JdbcType.VARCHAR),
        @Result(column="blis_period_type", property="blisPeriodType", jdbcType=JdbcType.INTEGER),
        @Result(column="blis_period_start", property="blisPeriodStart", jdbcType=JdbcType.VARCHAR),
        @Result(column="blis_period_end", property="blisPeriodEnd", jdbcType=JdbcType.VARCHAR),
        @Result(column="lar_id_card", property="larIdCard", jdbcType=JdbcType.VARCHAR),
        @Result(column="lar_name", property="larName", jdbcType=JdbcType.VARCHAR),
        @Result(column="lar_id_card_portrait_img", property="larIdCardPortraitImg", jdbcType=JdbcType.VARCHAR),
        @Result(column="lar_id_card_national_emblem_img", property="larIdCardNationalEmblemImg", jdbcType=JdbcType.VARCHAR),
        @Result(column="lar_id_card_address", property="larIdCardAddress", jdbcType=JdbcType.VARCHAR),
        @Result(column="lar_id_card_period_type", property="larIdCardPeriodType", jdbcType=JdbcType.INTEGER),
        @Result(column="lar_id_card_period_start", property="larIdCardPeriodStart", jdbcType=JdbcType.VARCHAR),
        @Result(column="lar_id_card_period_end", property="larIdCardPeriodEnd", jdbcType=JdbcType.VARCHAR),
        @Result(column="status", property="status", jdbcType=JdbcType.INTEGER),
        @Result(column="create_salesman_id", property="createSalesmanId", jdbcType=JdbcType.BIGINT),
        @Result(column="create_salesman_name", property="createSalesmanName", jdbcType=JdbcType.VARCHAR),
        @Result(column="create_type", property="createType", jdbcType=JdbcType.INTEGER),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP),
        @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)
    })
    BsStore selectByPrimaryKey(Long id);

    @UpdateProvider(type=BsStoreSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") BsStore record, @Param("example") BsStoreExample example);

    @UpdateProvider(type=BsStoreSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") BsStore record, @Param("example") BsStoreExample example);

    @UpdateProvider(type=BsStoreSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(BsStore record);

    @Update({
        "update bs_store",
        "set company_id = #{companyId,jdbcType=BIGINT},",
          "company_name = #{companyName,jdbcType=VARCHAR},",
          "agent_id = #{agentId,jdbcType=BIGINT},",
          "agent_name = #{agentName,jdbcType=VARCHAR},",
          "salesman_id = #{salesmanId,jdbcType=BIGINT},",
          "salesman_name = #{salesmanName,jdbcType=VARCHAR},",
          "mer_id = #{merId,jdbcType=BIGINT},",
          "mer_name = #{merName,jdbcType=VARCHAR},",
          "store_no = #{storeNo,jdbcType=BIGINT},",
          "`name` = #{name,jdbcType=VARCHAR},",
          "telephone = #{telephone,jdbcType=VARCHAR},",
          "door_head_img = #{doorHeadImg,jdbcType=VARCHAR},",
          "duty_people_name = #{dutyPeopleName,jdbcType=VARCHAR},",
          "duty_people_phone = #{dutyPeoplePhone,jdbcType=VARCHAR},",
          "duty_people_email = #{dutyPeopleEmail,jdbcType=VARCHAR},",
          "cash_register_img = #{cashRegisterImg,jdbcType=VARCHAR},",
          "internal_img = #{internalImg,jdbcType=VARCHAR},",
          "business_license_img = #{businessLicenseImg,jdbcType=VARCHAR},",
          "other_img = #{otherImg,jdbcType=VARCHAR},",
          "longitude = #{longitude,jdbcType=VARCHAR},",
          "latitude = #{latitude,jdbcType=VARCHAR},",
          "address = #{address,jdbcType=VARCHAR},",
          "alone_settle = #{aloneSettle,jdbcType=BIT},",
          "store_type = #{storeType,jdbcType=INTEGER},",
          "blis_url = #{blisUrl,jdbcType=VARCHAR},",
          "blis_name = #{blisName,jdbcType=VARCHAR},",
          "blis_no = #{blisNo,jdbcType=VARCHAR},",
          "blis_reg_address = #{blisRegAddress,jdbcType=VARCHAR},",
          "blis_period_type = #{blisPeriodType,jdbcType=INTEGER},",
          "blis_period_start = #{blisPeriodStart,jdbcType=VARCHAR},",
          "blis_period_end = #{blisPeriodEnd,jdbcType=VARCHAR},",
          "lar_id_card = #{larIdCard,jdbcType=VARCHAR},",
          "lar_name = #{larName,jdbcType=VARCHAR},",
          "lar_id_card_portrait_img = #{larIdCardPortraitImg,jdbcType=VARCHAR},",
          "lar_id_card_national_emblem_img = #{larIdCardNationalEmblemImg,jdbcType=VARCHAR},",
          "lar_id_card_address = #{larIdCardAddress,jdbcType=VARCHAR},",
          "lar_id_card_period_type = #{larIdCardPeriodType,jdbcType=INTEGER},",
          "lar_id_card_period_start = #{larIdCardPeriodStart,jdbcType=VARCHAR},",
          "lar_id_card_period_end = #{larIdCardPeriodEnd,jdbcType=VARCHAR},",
          "`status` = #{status,jdbcType=INTEGER},",
          "create_salesman_id = #{createSalesmanId,jdbcType=BIGINT},",
          "create_salesman_name = #{createSalesmanName,jdbcType=VARCHAR},",
          "create_type = #{createType,jdbcType=INTEGER},",
          "create_time = #{createTime,jdbcType=TIMESTAMP},",
          "update_time = #{updateTime,jdbcType=TIMESTAMP},",
          "ext_1 = #{ext1,jdbcType=VARCHAR},",
          "ext_2 = #{ext2,jdbcType=VARCHAR},",
          "ext_3 = #{ext3,jdbcType=VARCHAR}",
        "where id = #{id,jdbcType=BIGINT}"
    })
    int updateByPrimaryKey(BsStore record);
}