SpmkLcjdMapper.xml 5.73 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
<?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.SpmkLcjdMapper">

    <resultMap id="BaseResultMap" type="cn.timer.api.bean.spmk.SpmkLcjd" >
                <id column="id" property="id" />
                <result column="spgl_id" property="spglId" />
                <result column="name" property="name" />
                <result column="type" property="type" />
                <result column="up_id" property="upId" />
                <result column="dowm_id" property="dowmId" />
                <result column="yxj" property="yxj" />
                <result column="sprsz_type" property="sprszType" />
                <result column="is_dsp" property="isDsp" />
                <result column="spfs_type" property="spfsType" />
                <result column="sprwk_type" property="sprwkType" />
    </resultMap>

    <sql id="Base_Column_List">
                id,
                spgl_id,
                name,
                type,
                up_id,
                dowm_id,
                yxj,
                sprsz_type,
                is_dsp,
                spfs_type,
                sprwk_type
    </sql>
    
    <sql id="Base_Column_List_Alias">
                id SpmkLcjd_id,
                spgl_id SpmkLcjd_spgl_id,
                name SpmkLcjd_name,
                type SpmkLcjd_type,
                up_id SpmkLcjd_up_id,
                dowm_id SpmkLcjd_dowm_id,
                yxj SpmkLcjd_yxj,
                sprsz_type SpmkLcjd_sprsz_type,
                is_dsp SpmkLcjd_is_dsp,
                spfs_type SpmkLcjd_spfs_type,
                sprwk_type SpmkLcjd_sprwk_type
    </sql>

	<!-- 

    <insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.spmk.SpmkLcjd">
        INSERT INTO spmk_lcjd
        <trim prefix="(" suffix=")" suffixOverrides=",">
                        <if test ='null != spglId'>
                        spgl_id,
                        </if>
                        <if test ='null != name'>
                        name,
                        </if>
                        <if test ='null != type'>
                        type,
                        </if>
                        <if test ='null != upId'>
                        up_id,
                        </if>
                        <if test ='null != dowmId'>
                        dowm_id,
                        </if>
                        <if test ='null != yxj'>
                        yxj,
                        </if>
                        <if test ='null != sprszType'>
                        sprsz_type,
                        </if>
                        <if test ='null != isDsp'>
                        is_dsp,
                        </if>
                        <if test ='null != spfsType'>
                        spfs_type,
                        </if>
                        <if test ='null != sprwkType'>
                        sprwk_type
                        </if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
                        <if test ='null != spglId'>
                        #{spglId},
                        </if>
                        <if test ='null != name'>
                        #{name},
                        </if>
                        <if test ='null != type'>
                        #{type},
                        </if>
                        <if test ='null != upId'>
                        #{upId},
                        </if>
                        <if test ='null != dowmId'>
                        #{dowmId},
                        </if>
                        <if test ='null != yxj'>
                        #{yxj},
                        </if>
                        <if test ='null != sprszType'>
                        #{sprszType},
                        </if>
                        <if test ='null != isDsp'>
                        #{isDsp},
                        </if>
                        <if test ='null != spfsType'>
                        #{spfsType},
                        </if>
                        <if test ='null != sprwkType'>
                        #{sprwkType}
                        </if>
        </trim>
    </insert>

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

    <update id="update" parameterType="cn.timer.api.bean.spmk.SpmkLcjd">
        UPDATE spmk_lcjd
        <set>
                    <if test ='null != spglId'>spgl_id = #{spglId},</if>
                    <if test ='null != name'>name = #{name},</if>
                    <if test ='null != type'>type = #{type},</if>
                    <if test ='null != upId'>up_id = #{upId},</if>
                    <if test ='null != dowmId'>dowm_id = #{dowmId},</if>
                    <if test ='null != yxj'>yxj = #{yxj},</if>
                    <if test ='null != sprszType'>sprsz_type = #{sprszType},</if>
                    <if test ='null != isDsp'>is_dsp = #{isDsp},</if>
                    <if test ='null != spfsType'>spfs_type = #{spfsType},</if>
                    <if test ='null != sprwkType'>sprwk_type = #{sprwkType}</if>
        </set>
        WHERE id = #{id}
    </update>


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

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

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

	 -->

</mapper>