<?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.htzz.HtzzAssoHtgxMapper">

    <resultMap id="BaseResultMap" type="cn.timer.api.bean.htzz.HtzzAssoHtgx" >
                <id column="id" property="id" />
                <result column="htid" property="htid" />
                <result column="org_code" property="orgCode" />
                <result column="tzrid" property="tzrid" />
                <result column="name" property="name" />
                <result column="phone" property="phone" />
    </resultMap>

    <sql id="Base_Column_List">
                id,
                htid,
                org_code,
                tzrid,
                name,
                phone
    </sql>
    
    <sql id="Base_Column_List_Alias">
                id HtzzAssoHtgx_id,
                htid HtzzAssoHtgx_htid,
                org_code HtzzAssoHtgx_org_code,
                tzrid HtzzAssoHtgx_tzrid,
                name HtzzAssoHtgx_name,
                phone HtzzAssoHtgx_phone
    </sql>

	<!-- 

    <insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.htzz.HtzzAssoHtgx">
        INSERT INTO htzz_asso_htgx
        <trim prefix="(" suffix=")" suffixOverrides=",">
                        <if test ='null != htid'>
                        htid,
                        </if>
                        <if test ='null != orgCode'>
                        org_code,
                        </if>
                        <if test ='null != tzrid'>
                        tzrid,
                        </if>
                        <if test ='null != name'>
                        name,
                        </if>
                        <if test ='null != phone'>
                        phone
                        </if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
                        <if test ='null != htid'>
                        #{htid},
                        </if>
                        <if test ='null != orgCode'>
                        #{orgCode},
                        </if>
                        <if test ='null != tzrid'>
                        #{tzrid},
                        </if>
                        <if test ='null != name'>
                        #{name},
                        </if>
                        <if test ='null != phone'>
                        #{phone}
                        </if>
        </trim>
    </insert>

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

    <update id="update" parameterType="cn.timer.api.bean.htzz.HtzzAssoHtgx">
        UPDATE htzz_asso_htgx
        <set>
                    <if test ='null != htid'>htid = #{htid},</if>
                    <if test ='null != orgCode'>org_code = #{orgCode},</if>
                    <if test ='null != tzrid'>tzrid = #{tzrid},</if>
                    <if test ='null != name'>name = #{name},</if>
                    <if test ='null != phone'>phone = #{phone}</if>
        </set>
        WHERE id = #{id}
    </update>


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

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

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

	 -->

</mapper>