<?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="cn.timer.api.dao.xcgl.XcglAssoTaxFormulaMapper">

    <resultMap id="BaseResultMap" type="cn.timer.api.bean.xcgl.XcglAssoTaxFormula" >
                <id column="id" property="id" />
                <result column="taxablestart" property="taxablestart" />
                <result column="taxableend" property="taxableend" />
                <result column="taxrate" property="taxrate" />
                <result column="deductions" property="deductions" />
                <result column="qyid" property="qyid" />
    </resultMap>

    <sql id="Base_Column_List">
                id,
                taxablestart,
                taxableend,
                taxrate,
                deductions,
                qyid
    </sql>
    
    <sql id="Base_Column_List_Alias">
                id XcglAssoTaxFormula_id,
                taxablestart XcglAssoTaxFormula_taxablestart,
                taxableend XcglAssoTaxFormula_taxableend,
                taxrate XcglAssoTaxFormula_taxrate,
                deductions XcglAssoTaxFormula_deductions,
                qyid XcglAssoTaxFormula_qyid
    </sql>

	<!-- 

    <insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.xcgl.XcglAssoTaxFormula">
        INSERT INTO xcgl_asso_tax_formula
        <trim prefix="(" suffix=")" suffixOverrides=",">
                        <if test ='null != taxablestart'>
                        taxablestart,
                        </if>
                        <if test ='null != taxableend'>
                        taxableend,
                        </if>
                        <if test ='null != taxrate'>
                        taxrate,
                        </if>
                        <if test ='null != deductions'>
                        deductions,
                        </if>
                        <if test ='null != qyid'>
                        qyid
                        </if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
                        <if test ='null != taxablestart'>
                        #{taxablestart},
                        </if>
                        <if test ='null != taxableend'>
                        #{taxableend},
                        </if>
                        <if test ='null != taxrate'>
                        #{taxrate},
                        </if>
                        <if test ='null != deductions'>
                        #{deductions},
                        </if>
                        <if test ='null != qyid'>
                        #{qyid}
                        </if>
        </trim>
    </insert>

    <delete id="delete" >
        DELETE FROM xcgl_asso_tax_formula
        WHERE id = #{id}
    </delete>

    <update id="update" parameterType="cn.timer.api.bean.xcgl.XcglAssoTaxFormula">
        UPDATE xcgl_asso_tax_formula
        <set>
                    <if test ='null != taxablestart'>taxablestart = #{taxablestart},</if>
                    <if test ='null != taxableend'>taxableend = #{taxableend},</if>
                    <if test ='null != taxrate'>taxrate = #{taxrate},</if>
                    <if test ='null != deductions'>deductions = #{deductions},</if>
                    <if test ='null != qyid'>qyid = #{qyid}</if>
        </set>
        WHERE id = #{id}
    </update>


    <select id="load" resultMap="BaseResultMap">
        SELECT <include refid="Base_Column_List" />
        FROM xcgl_asso_tax_formula
        WHERE id = #{id}
    </select>

    <select id="pageList" resultMap="BaseResultMap">
        SELECT <include refid="Base_Column_List" />
        FROM xcgl_asso_tax_formula
        LIMIT #{offset}, #{pageSize}
    </select>

    <select id="pageListCount" resultType="java.lang.Integer">
        SELECT count(1)
        FROM xcgl_asso_tax_formula
    </select>

	 -->

</mapper>