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

    <resultMap id="BaseResultMap" type="cn.timer.api.bean.spmk.SpmkJqgz" >
                <id column="id" property="id" />
                <result column="org_code" property="orgCode" />
                <result column="name" property="name" />
                <result column="ygztqjgz" property="ygztqjgz" />
                <result column="zxqjdw_type" property="zxqjdwType" />
                <result column="qjschsfs_type" property="qjschsfsType" />
                <result column="syfw" property="syfw" />
                <result column="is_jrxc" property="isJrxc" />
                <result column="create_time" property="createTime" />
    </resultMap>

    <sql id="Base_Column_List">
                id,
                org_code,
                name,
                ygztqjgz,
                zxqjdw_type,
                qjschsfs_type,
                syfw,
                is_jrxc,
                create_time
    </sql>
    
    <sql id="Base_Column_List_Alias">
                id SpmkJqgz_id,
                org_code SpmkJqgz_org_code,
                name SpmkJqgz_name,
                ygztqjgz SpmkJqgz_ygztqjgz,
                zxqjdw_type SpmkJqgz_zxqjdw_type,
                qjschsfs_type SpmkJqgz_qjschsfs_type,
                syfw SpmkJqgz_syfw,
                is_jrxc SpmkJqgz_is_jrxc,
                create_time SpmkJqgz_create_time
    </sql>

	<!-- 

    <insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.spmk.SpmkJqgz">
        INSERT INTO spmk_jqgz
        <trim prefix="(" suffix=")" suffixOverrides=",">
                        <if test ='null != orgCode'>
                        org_code,
                        </if>
                        <if test ='null != name'>
                        name,
                        </if>
                        <if test ='null != ygztqjgz'>
                        ygztqjgz,
                        </if>
                        <if test ='null != zxqjdwType'>
                        zxqjdw_type,
                        </if>
                        <if test ='null != qjschsfsType'>
                        qjschsfs_type,
                        </if>
                        <if test ='null != syfw'>
                        syfw,
                        </if>
                        <if test ='null != isJrxc'>
                        is_jrxc,
                        </if>
                        <if test ='null != createTime'>
                        create_time
                        </if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
                        <if test ='null != orgCode'>
                        #{orgCode},
                        </if>
                        <if test ='null != name'>
                        #{name},
                        </if>
                        <if test ='null != ygztqjgz'>
                        #{ygztqjgz},
                        </if>
                        <if test ='null != zxqjdwType'>
                        #{zxqjdwType},
                        </if>
                        <if test ='null != qjschsfsType'>
                        #{qjschsfsType},
                        </if>
                        <if test ='null != syfw'>
                        #{syfw},
                        </if>
                        <if test ='null != isJrxc'>
                        #{isJrxc},
                        </if>
                        <if test ='null != createTime'>
                        #{createTime}
                        </if>
        </trim>
    </insert>

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

    <update id="update" parameterType="cn.timer.api.bean.spmk.SpmkJqgz">
        UPDATE spmk_jqgz
        <set>
                    <if test ='null != orgCode'>org_code = #{orgCode},</if>
                    <if test ='null != name'>name = #{name},</if>
                    <if test ='null != ygztqjgz'>ygztqjgz = #{ygztqjgz},</if>
                    <if test ='null != zxqjdwType'>zxqjdw_type = #{zxqjdwType},</if>
                    <if test ='null != qjschsfsType'>qjschsfs_type = #{qjschsfsType},</if>
                    <if test ='null != syfw'>syfw = #{syfw},</if>
                    <if test ='null != isJrxc'>is_jrxc = #{isJrxc},</if>
                    <if test ='null != createTime'>create_time = #{createTime}</if>
        </set>
        WHERE id = #{id}
    </update>


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

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

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

	 -->

</mapper>