SpmkSxpzMapper.xml 4.82 KB
Newer Older
yuquan.zhu committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140
<?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.SpmkSxpzMapper">

    <resultMap id="BaseResultMap" type="cn.timer.api.bean.spmk.SpmkSxpz" >
                <id column="id" property="id" />
                <result column="lcjd_id" property="lcjdId" />
                <result column="kjpz_id" property="kjpzId" />
                <result column="keyz" property="keyz" />
                <result column="ysf_type" property="ysfType" />
                <result column="val" property="val" />
                <result column="name" property="name" />
                <result column="is_valid" property="isValid" />
                <result column="type" property="type" />
    </resultMap>

    <sql id="Base_Column_List">
                id,
                lcjd_id,
                kjpz_id,
                keyz,
                ysf_type,
                val,
                name,
                is_valid,
                type
    </sql>
    
    <sql id="Base_Column_List_Alias">
                id SpmkSxpz_id,
                lcjd_id SpmkSxpz_lcjd_id,
                kjpz_id SpmkSxpz_kjpz_id,
                keyz SpmkSxpz_keyz,
                ysf_type SpmkSxpz_ysf_type,
                val SpmkSxpz_val,
                name SpmkSxpz_name,
                is_valid SpmkSxpz_is_valid,
                type SpmkSxpz_type
    </sql>

	<!-- 

    <insert id="insert" useGeneratedkeyss="true" keysColumn="id" parameterType="cn.timer.api.bean.spmk.SpmkSxpz">
        INSERT INTO spmk_sxpz
        <trim prefix="(" suffix=")" suffixOverrides=",">
                        <if test ='null != lcjdId'>
                        lcjd_id,
                        </if>
                        <if test ='null != kjpzId'>
                        kjpz_id,
                        </if>
                        <if test ='null != keyz'>
                        keyz,
                        </if>
                        <if test ='null != ysfType'>
                        ysf_type,
                        </if>
                        <if test ='null != val'>
                        val,
                        </if>
                        <if test ='null != name'>
                        name,
                        </if>
                        <if test ='null != isValid'>
                        is_valid,
                        </if>
                        <if test ='null != type'>
                        type
                        </if>
        </trim>
        <trim prefix="vals (" suffix=")" suffixOverrides=",">
                        <if test ='null != lcjdId'>
                        #{lcjdId},
                        </if>
                        <if test ='null != kjpzId'>
                        #{kjpzId},
                        </if>
                        <if test ='null != keyz'>
                        #{keyz},
                        </if>
                        <if test ='null != ysfType'>
                        #{ysfType},
                        </if>
                        <if test ='null != val'>
                        #{val},
                        </if>
                        <if test ='null != name'>
                        #{name},
                        </if>
                        <if test ='null != isValid'>
                        #{isValid},
                        </if>
                        <if test ='null != type'>
                        #{type}
                        </if>
        </trim>
    </insert>

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

    <update id="update" parameterType="cn.timer.api.bean.spmk.SpmkSxpz">
        UPDATE spmk_sxpz
        <set>
                    <if test ='null != lcjdId'>lcjd_id = #{lcjdId},</if>
                    <if test ='null != kjpzId'>kjpz_id = #{kjpzId},</if>
                    <if test ='null != keyz'>keyz = #{keyz},</if>
                    <if test ='null != ysfType'>ysf_type = #{ysfType},</if>
                    <if test ='null != val'>val = #{val},</if>
                    <if test ='null != name'>name = #{name},</if>
                    <if test ='null != isValid'>is_valid = #{isValid},</if>
                    <if test ='null != type'>type = #{type}</if>
        </set>
        WHERE id = #{id}
    </update>


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

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

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

	 -->

</mapper>