<?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.spmk.SpmkLcjdEmpAssoMapper">

    <resultMap id="BaseResultMap" type="cn.timer.api.bean.spmk.SpmkLcjdEmpAsso" >
                <id column="id" property="id" />
                <result column="lcjd_id" property="lcjdId" />
                <result column="emp_num" property="empNum" />
                <result column="bmgw_id" property="bmgwId" />
                <result column="is_editable" property="isEditable" />
    </resultMap>

    <sql id="Base_Column_List">
                id,
                lcjd_id,
                emp_num,
                bmgw_id,
                is_editable
    </sql>
    
    <sql id="Base_Column_List_Alias">
                id SpmkLcjdEmpAsso_id,
                lcjd_id SpmkLcjdEmpAsso_lcjd_id,
                emp_num SpmkLcjdEmpAsso_emp_num,
                bmgw_id SpmkLcjdEmpAsso_bmgw_id,
                is_editable SpmkLcjdEmpAsso_is_editable
    </sql>

	<!-- 

    <insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.spmk.SpmkLcjdEmpAsso">
        INSERT INTO spmk_lcjd_emp_asso
        <trim prefix="(" suffix=")" suffixOverrides=",">
                        <if test ='null != lcjdId'>
                        lcjd_id,
                        </if>
                        <if test ='null != empNum'>
                        emp_num,
                        </if>
                        <if test ='null != bmgwId'>
                        bmgw_id,
                        </if>
                        <if test ='null != isEditable'>
                        is_editable
                        </if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
                        <if test ='null != lcjdId'>
                        #{lcjdId},
                        </if>
                        <if test ='null != empNum'>
                        #{empNum},
                        </if>
                        <if test ='null != bmgwId'>
                        #{bmgwId},
                        </if>
                        <if test ='null != isEditable'>
                        #{isEditable}
                        </if>
        </trim>
    </insert>

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

    <update id="update" parameterType="cn.timer.api.bean.spmk.SpmkLcjdEmpAsso">
        UPDATE spmk_lcjd_emp_asso
        <set>
                    <if test ='null != lcjdId'>lcjd_id = #{lcjdId},</if>
                    <if test ='null != empNum'>emp_num = #{empNum},</if>
                    <if test ='null != bmgwId'>bmgw_id = #{bmgwId},</if>
                    <if test ='null != isEditable'>is_editable = #{isEditable}</if>
        </set>
        WHERE id = #{id}
    </update>


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

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

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

	 -->

</mapper>