<?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.SpmkClrMapper">

    <resultMap id="BaseResultMap" type="cn.timer.api.bean.spmk.SpmkClr" >
                <result column="Id" property="id" />
                <result column="lcjd_id" property="lcjdId" />
                <result column="spcz_id" property="spczId" />
                <result column="emp_num" property="empNum" />
                <result column="type" property="type" />
                <result column="operation" property="operation" />
                <result column="sts" property="sts" />
                <result column="spyj" property="spyj" />
    </resultMap>

    <sql id="Base_Column_List">
                Id,
                lcjd_id,
                spcz_id,
                emp_num,
                type,
                operation,
                sts,
                spyj
    </sql>
    
    <sql id="Base_Column_List_Alias">
                Id SpmkClr_Id,
                lcjd_id SpmkClr_lcjd_id,
                spcz_id SpmkClr_spcz_id,
                emp_num SpmkClr_emp_num,
                type SpmkClr_type,
                operation SpmkClr_operation,
                sts SpmkClr_sts,
                spyj SpmkClr_spyj
    </sql>

	<!-- 

    <insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.spmk.SpmkClr">
        INSERT INTO spmk_clr
        <trim prefix="(" suffix=")" suffixOverrides=",">
                        <if test ='null != id'>
                        Id,
                        </if>
                        <if test ='null != lcjdId'>
                        lcjd_id,
                        </if>
                        <if test ='null != spczId'>
                        spcz_id,
                        </if>
                        <if test ='null != empNum'>
                        emp_num,
                        </if>
                        <if test ='null != type'>
                        type,
                        </if>
                        <if test ='null != operation'>
                        operation,
                        </if>
                        <if test ='null != sts'>
                        sts,
                        </if>
                        <if test ='null != spyj'>
                        spyj
                        </if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
                        <if test ='null != id'>
                        #{id},
                        </if>
                        <if test ='null != lcjdId'>
                        #{lcjdId},
                        </if>
                        <if test ='null != spczId'>
                        #{spczId},
                        </if>
                        <if test ='null != empNum'>
                        #{empNum},
                        </if>
                        <if test ='null != type'>
                        #{type},
                        </if>
                        <if test ='null != operation'>
                        #{operation},
                        </if>
                        <if test ='null != sts'>
                        #{sts},
                        </if>
                        <if test ='null != spyj'>
                        #{spyj}
                        </if>
        </trim>
    </insert>

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

    <update id="update" parameterType="cn.timer.api.bean.spmk.SpmkClr">
        UPDATE spmk_clr
        <set>
                    <if test ='null != id'>Id = #{id},</if>
                    <if test ='null != lcjdId'>lcjd_id = #{lcjdId},</if>
                    <if test ='null != spczId'>spcz_id = #{spczId},</if>
                    <if test ='null != empNum'>emp_num = #{empNum},</if>
                    <if test ='null != type'>type = #{type},</if>
                    <if test ='null != operation'>operation = #{operation},</if>
                    <if test ='null != sts'>sts = #{sts},</if>
                    <if test ='null != spyj'>spyj = #{spyj}</if>
        </set>
        WHERE id = #{id}
    </update>


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

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

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

	 -->

</mapper>