SpmkKjpzMapper.xml 9.12 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 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240
<?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>