<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ssm.manage.mapper.StoreMemberClassMapper">

    <resultMap type="com.ssm.manage.entity.StoreMemberClass" id="StoreMemberClassMap">
        <result property="id" column="id" jdbcType="INTEGER"/>
        <result property="storeId" column="store_id" jdbcType="INTEGER"/>
        <result property="storeName" column="store_name" jdbcType="VARCHAR"/>
        <result property="classNum" column="class_num" jdbcType="VARCHAR"/>
        <result property="className" column="class_name" jdbcType="VARCHAR"/>
        <result property="rechargeStandard" column="recharge_standard" jdbcType="NUMERIC"/>
        <result property="courseStandard" column="course_standard" jdbcType="NUMERIC"/>
        <result property="cashDecimal" column="cash_decimal" jdbcType="NUMERIC"/>
        <result property="inputId" column="input_id" jdbcType="INTEGER"/>
        <result property="inputBy" column="input_by" jdbcType="VARCHAR"/>
        <result property="inputDate" column="input_date" jdbcType="TIMESTAMP"/>
        <result property="updateId" column="update_id" jdbcType="INTEGER"/>
        <result property="updateBy" column="update_by" jdbcType="VARCHAR"/>
        <result property="updateDate" column="update_date" jdbcType="TIMESTAMP"/>
        <result property="statisticsQuarter" column="statistics_quarter" jdbcType="INTEGER"/>
    </resultMap>

<!--    &lt;!&ndash;查询单个&ndash;&gt;-->
<!--    <select id="queryById" resultMap="StoreMemberClassMap">-->
<!--        select-->
<!--          id, store_id, store_name, class_num, class_name, recharge_standard, course_standard, cash_decimal, input_id, input_by, input_date, update_id, update_by, update_date, statistics_quarter-->
<!--        from store_member_class-->
<!--        where id = #{id}-->
<!--    </select>-->

<!--    &lt;!&ndash;查询指定行数据&ndash;&gt;-->
<!--    <select id="queryAllByLimit" resultMap="StoreMemberClassMap">-->
<!--        select-->
<!--          id, store_id, store_name, class_num, class_name, recharge_standard, course_standard, cash_decimal, input_id, input_by, input_date, update_id, update_by, update_date, statistics_quarter-->
<!--        from store_member_class-->
<!--        <where>-->
<!--            <if test="id != null">-->
<!--                and id = #{id}-->
<!--            </if>-->
<!--            <if test="storeId != null">-->
<!--                and store_id = #{storeId}-->
<!--            </if>-->
<!--            <if test="storeName != null and storeName != ''">-->
<!--                and store_name = #{storeName}-->
<!--            </if>-->
<!--            <if test="classNum != null and classNum != ''">-->
<!--                and class_num = #{classNum}-->
<!--            </if>-->
<!--            <if test="className != null and className != ''">-->
<!--                and class_name = #{className}-->
<!--            </if>-->
<!--            <if test="rechargeStandard != null">-->
<!--                and recharge_standard = #{rechargeStandard}-->
<!--            </if>-->
<!--            <if test="courseStandard != null">-->
<!--                and course_standard = #{courseStandard}-->
<!--            </if>-->
<!--            <if test="cashDecimal != null">-->
<!--                and cash_decimal = #{cashDecimal}-->
<!--            </if>-->
<!--            <if test="inputId != null">-->
<!--                and input_id = #{inputId}-->
<!--            </if>-->
<!--            <if test="inputBy != null and inputBy != ''">-->
<!--                and input_by = #{inputBy}-->
<!--            </if>-->
<!--            <if test="inputDate != null">-->
<!--                and input_date = #{inputDate}-->
<!--            </if>-->
<!--            <if test="updateId != null">-->
<!--                and update_id = #{updateId}-->
<!--            </if>-->
<!--            <if test="updateBy != null and updateBy != ''">-->
<!--                and update_by = #{updateBy}-->
<!--            </if>-->
<!--            <if test="updateDate != null">-->
<!--                and update_date = #{updateDate}-->
<!--            </if>-->
<!--            <if test="statisticsQuarter != null">-->
<!--                and statistics_quarter = #{statisticsQuarter}-->
<!--            </if>-->
<!--        </where>-->
<!--        limit #{pageable.offset}, #{pageable.pageSize}-->
<!--    </select>-->

<!--    &lt;!&ndash;统计总行数&ndash;&gt;-->
<!--    <select id="count" resultType="java.lang.Long">-->
<!--        select count(1)-->
<!--        from store_member_class-->
<!--        <where>-->
<!--            <if test="id != null">-->
<!--                and id = #{id}-->
<!--            </if>-->
<!--            <if test="storeId != null">-->
<!--                and store_id = #{storeId}-->
<!--            </if>-->
<!--            <if test="storeName != null and storeName != ''">-->
<!--                and store_name = #{storeName}-->
<!--            </if>-->
<!--            <if test="classNum != null and classNum != ''">-->
<!--                and class_num = #{classNum}-->
<!--            </if>-->
<!--            <if test="className != null and className != ''">-->
<!--                and class_name = #{className}-->
<!--            </if>-->
<!--            <if test="rechargeStandard != null">-->
<!--                and recharge_standard = #{rechargeStandard}-->
<!--            </if>-->
<!--            <if test="courseStandard != null">-->
<!--                and course_standard = #{courseStandard}-->
<!--            </if>-->
<!--            <if test="cashDecimal != null">-->
<!--                and cash_decimal = #{cashDecimal}-->
<!--            </if>-->
<!--            <if test="inputId != null">-->
<!--                and input_id = #{inputId}-->
<!--            </if>-->
<!--            <if test="inputBy != null and inputBy != ''">-->
<!--                and input_by = #{inputBy}-->
<!--            </if>-->
<!--            <if test="inputDate != null">-->
<!--                and input_date = #{inputDate}-->
<!--            </if>-->
<!--            <if test="updateId != null">-->
<!--                and update_id = #{updateId}-->
<!--            </if>-->
<!--            <if test="updateBy != null and updateBy != ''">-->
<!--                and update_by = #{updateBy}-->
<!--            </if>-->
<!--            <if test="updateDate != null">-->
<!--                and update_date = #{updateDate}-->
<!--            </if>-->
<!--            <if test="statisticsQuarter != null">-->
<!--                and statistics_quarter = #{statisticsQuarter}-->
<!--            </if>-->
<!--        </where>-->
<!--    </select>-->

<!--    &lt;!&ndash;新增所有列&ndash;&gt;-->
<!--    <insert id="insert" keyProperty="id" useGeneratedKeys="true">-->
<!--        insert into store_member_class(store_id, store_name, class_num, class_name, recharge_standard, course_standard, cash_decimal, input_id, input_by, input_date, update_id, update_by, update_date, statistics_quarter)-->
<!--        values (#{storeId}, #{storeName}, #{classNum}, #{className}, #{rechargeStandard}, #{courseStandard}, #{cashDecimal}, #{inputId}, #{inputBy}, #{inputDate}, #{updateId}, #{updateBy}, #{updateDate}, #{statisticsQuarter})-->
<!--    </insert>-->

<!--    <insert id="insertBatch" keyProperty="id" useGeneratedKeys="true">-->
<!--        insert into store_member_class(store_id, store_name, class_num, class_name, recharge_standard, course_standard, cash_decimal, input_id, input_by, input_date, update_id, update_by, update_date, statistics_quarter)-->
<!--        values-->
<!--        <foreach collection="entities" item="entity" separator=",">-->
<!--        (#{entity.storeId}, #{entity.storeName}, #{entity.classNum}, #{entity.className}, #{entity.rechargeStandard}, #{entity.courseStandard}, #{entity.cashDecimal}, #{entity.inputId}, #{entity.inputBy}, #{entity.inputDate}, #{entity.updateId}, #{entity.updateBy}, #{entity.updateDate}, #{entity.statisticsQuarter})-->
<!--        </foreach>-->
<!--    </insert>-->

<!--    <insert id="insertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">-->
<!--        insert into store_member_class(store_id, store_name, class_num, class_name, recharge_standard, course_standard, cash_decimal, input_id, input_by, input_date, update_id, update_by, update_date, statistics_quarter)-->
<!--        values-->
<!--        <foreach collection="entities" item="entity" separator=",">-->
<!--            (#{entity.storeId}, #{entity.storeName}, #{entity.classNum}, #{entity.className}, #{entity.rechargeStandard}, #{entity.courseStandard}, #{entity.cashDecimal}, #{entity.inputId}, #{entity.inputBy}, #{entity.inputDate}, #{entity.updateId}, #{entity.updateBy}, #{entity.updateDate}, #{entity.statisticsQuarter})-->
<!--        </foreach>-->
<!--        on duplicate key update-->
<!--        store_id = values(store_id),-->
<!--        store_name = values(store_name),-->
<!--        class_num = values(class_num),-->
<!--        class_name = values(class_name),-->
<!--        recharge_standard = values(recharge_standard),-->
<!--        course_standard = values(course_standard),-->
<!--        cash_decimal = values(cash_decimal),-->
<!--        input_id = values(input_id),-->
<!--        input_by = values(input_by),-->
<!--        input_date = values(input_date),-->
<!--        update_id = values(update_id),-->
<!--        update_by = values(update_by),-->
<!--        update_date = values(update_date),-->
<!--        statistics_quarter = values(statistics_quarter)-->
<!--    </insert>-->

<!--    &lt;!&ndash;通过主键修改数据&ndash;&gt;-->
<!--    <update id="update">-->
<!--        update store_member_class-->
<!--        <set>-->
<!--            <if test="storeId != null">-->
<!--                store_id = #{storeId},-->
<!--            </if>-->
<!--            <if test="storeName != null and storeName != ''">-->
<!--                store_name = #{storeName},-->
<!--            </if>-->
<!--            <if test="classNum != null and classNum != ''">-->
<!--                class_num = #{classNum},-->
<!--            </if>-->
<!--            <if test="className != null and className != ''">-->
<!--                class_name = #{className},-->
<!--            </if>-->
<!--            <if test="rechargeStandard != null">-->
<!--                recharge_standard = #{rechargeStandard},-->
<!--            </if>-->
<!--            <if test="courseStandard != null">-->
<!--                course_standard = #{courseStandard},-->
<!--            </if>-->
<!--            <if test="cashDecimal != null">-->
<!--                cash_decimal = #{cashDecimal},-->
<!--            </if>-->
<!--            <if test="inputId != null">-->
<!--                input_id = #{inputId},-->
<!--            </if>-->
<!--            <if test="inputBy != null and inputBy != ''">-->
<!--                input_by = #{inputBy},-->
<!--            </if>-->
<!--            <if test="inputDate != null">-->
<!--                input_date = #{inputDate},-->
<!--            </if>-->
<!--            <if test="updateId != null">-->
<!--                update_id = #{updateId},-->
<!--            </if>-->
<!--            <if test="updateBy != null and updateBy != ''">-->
<!--                update_by = #{updateBy},-->
<!--            </if>-->
<!--            <if test="updateDate != null">-->
<!--                update_date = #{updateDate},-->
<!--            </if>-->
<!--            <if test="statisticsQuarter != null">-->
<!--                statistics_quarter = #{statisticsQuarter},-->
<!--            </if>-->
<!--        </set>-->
<!--        where id = #{id}-->
<!--    </update>-->

<!--    &lt;!&ndash;通过主键删除&ndash;&gt;-->
<!--    <delete id="deleteById">-->
<!--        delete from store_member_class where id = #{id}-->
<!--    </delete>-->

</mapper>

