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

    <resultMap id="BaseResultMap" type="cn.timer.api.bean.spmk.SpmkKjpz" >
                <id column="id" property="id" />
                <result column="kj_id" property="kjId" />
                <result column="title" property="title" />
                <result column="titletwo" property="titletwo" />
                <result column="type" property="type" />
                <result column="tswz" property="tswz" />
                <result column="dzmc" property="dzmc" />
                <result column="is_yz" property="isYz" />
                <result column="is_dy" property="isDy" />
                <result column="time_type" property="timeType" />
                <result column="is_syzp" property="isSyzp" />
                <result column="dygs_type" property="dygsType" />
                <result column="is_show" property="isShow" />
                <result column="ljtz_url" property="ljtzUrl" />
                <result column="is_showup" property="isShowup" />
                <result column="xx_type" property="xxType" />
                <result column="jsgs" property="jsgs" />
                <result column="glspd_id" property="glspdId" />
                <result column="description" property="description" />
    </resultMap>

    <sql id="Base_Column_List">
                id,
                kj_id,
                title,
                titletwo,
                type,
                tswz,
                dzmc,
                is_yz,
                is_dy,
                time_type,
                is_syzp,
                dygs_type,
                is_show,
                ljtz_url,
                is_showup,
                xx_type,
                jsgs,
                glspd_id,
                description
    </sql>
    
    <sql id="Base_Column_List_Alias">
                id SpmkKjpz_id,
                kj_id SpmkKjpz_kj_id,
                title SpmkKjpz_title,
                titletwo SpmkKjpz_titletwo,
                type SpmkKjpz_type,
                tswz SpmkKjpz_tswz,
                dzmc SpmkKjpz_dzmc,
                is_yz SpmkKjpz_is_yz,
                is_dy SpmkKjpz_is_dy,
                time_type SpmkKjpz_time_type,
                is_syzp SpmkKjpz_is_syzp,
                dygs_type SpmkKjpz_dygs_type,
                is_show SpmkKjpz_is_show,
                ljtz_url SpmkKjpz_ljtz_url,
                is_showup SpmkKjpz_is_showup,
                xx_type SpmkKjpz_xx_type,
                jsgs SpmkKjpz_jsgs,
                glspd_id SpmkKjpz_glspd_id,
                description SpmkKjpz_description
    </sql>

	<!-- 

    <insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.spmk.SpmkKjpz">
        INSERT INTO spmk_kjpz
        <trim prefix="(" suffix=")" suffixOverrides=",">
                        <if test ='null != kjId'>
                        kj_id,
                        </if>
                        <if test ='null != title'>
                        title,
                        </if>
                        <if test ='null != titletwo'>
                        titletwo,
                        </if>
                        <if test ='null != type'>
                        type,
                        </if>
                        <if test ='null != tswz'>
                        tswz,
                        </if>
                        <if test ='null != dzmc'>
                        dzmc,
                        </if>
                        <if test ='null != isYz'>
                        is_yz,
                        </if>
                        <if test ='null != isDy'>
                        is_dy,
                        </if>
                        <if test ='null != timeType'>
                        time_type,
                        </if>
                        <if test ='null != isSyzp'>
                        is_syzp,
                        </if>
                        <if test ='null != dygsType'>
                        dygs_type,
                        </if>
                        <if test ='null != isShow'>
                        is_show,
                        </if>
                        <if test ='null != ljtzUrl'>
                        ljtz_url,
                        </if>
                        <if test ='null != isShowup'>
                        is_showup,
                        </if>
                        <if test ='null != xxType'>
                        xx_type,
                        </if>
                        <if test ='null != jsgs'>
                        jsgs,
                        </if>
                        <if test ='null != glspdId'>
                        glspd_id,
                        </if>
                        <if test ='null != description'>
                        description
                        </if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
                        <if test ='null != kjId'>
                        #{kjId},
                        </if>
                        <if test ='null != title'>
                        #{title},
                        </if>
                        <if test ='null != titletwo'>
                        #{titletwo},
                        </if>
                        <if test ='null != type'>
                        #{type},
                        </if>
                        <if test ='null != tswz'>
                        #{tswz},
                        </if>
                        <if test ='null != dzmc'>
                        #{dzmc},
                        </if>
                        <if test ='null != isYz'>
                        #{isYz},
                        </if>
                        <if test ='null != isDy'>
                        #{isDy},
                        </if>
                        <if test ='null != timeType'>
                        #{timeType},
                        </if>
                        <if test ='null != isSyzp'>
                        #{isSyzp},
                        </if>
                        <if test ='null != dygsType'>
                        #{dygsType},
                        </if>
                        <if test ='null != isShow'>
                        #{isShow},
                        </if>
                        <if test ='null != ljtzUrl'>
                        #{ljtzUrl},
                        </if>
                        <if test ='null != isShowup'>
                        #{isShowup},
                        </if>
                        <if test ='null != xxType'>
                        #{xxType},
                        </if>
                        <if test ='null != jsgs'>
                        #{jsgs},
                        </if>
                        <if test ='null != glspdId'>
                        #{glspdId},
                        </if>
                        <if test ='null != description'>
                        #{description}
                        </if>
        </trim>
    </insert>

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

    <update id="update" parameterType="cn.timer.api.bean.spmk.SpmkKjpz">
        UPDATE spmk_kjpz
        <set>
                    <if test ='null != kjId'>kj_id = #{kjId},</if>
                    <if test ='null != title'>title = #{title},</if>
                    <if test ='null != titletwo'>titletwo = #{titletwo},</if>
                    <if test ='null != type'>type = #{type},</if>
                    <if test ='null != tswz'>tswz = #{tswz},</if>
                    <if test ='null != dzmc'>dzmc = #{dzmc},</if>
                    <if test ='null != isYz'>is_yz = #{isYz},</if>
                    <if test ='null != isDy'>is_dy = #{isDy},</if>
                    <if test ='null != timeType'>time_type = #{timeType},</if>
                    <if test ='null != isSyzp'>is_syzp = #{isSyzp},</if>
                    <if test ='null != dygsType'>dygs_type = #{dygsType},</if>
                    <if test ='null != isShow'>is_show = #{isShow},</if>
                    <if test ='null != ljtzUrl'>ljtz_url = #{ljtzUrl},</if>
                    <if test ='null != isShowup'>is_showup = #{isShowup},</if>
                    <if test ='null != xxType'>xx_type = #{xxType},</if>
                    <if test ='null != jsgs'>jsgs = #{jsgs},</if>
                    <if test ='null != glspdId'>glspd_id = #{glspdId},</if>
                    <if test ='null != description'>description = #{description}</if>
        </set>
        WHERE id = #{id}
    </update>


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

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

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

	 -->

</mapper>