XcglAssoOptionMapper.xml 3.17 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
<?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.xcgl.XcglAssoOptionMapper">

    <resultMap id="BaseResultMap" type="cn.timer.api.bean.xcgl.XcglAssoOption" >
                <id column="id" property="id" />
                <result column="optionname" property="optionname" />
                <result column="itemid" property="itemid" />
                <result column="type" property="type" />
                <result column="tablename" property="tablename" />
                <result column="fieldname" property="fieldname" />
    </resultMap>

    <sql id="Base_Column_List">
                id,
                optionname,
                itemid,
                type,
                tablename,
                fieldname
    </sql>
    
    <sql id="Base_Column_List_Alias">
                id XcglAssoOption_id,
                optionname XcglAssoOption_optionname,
                itemid XcglAssoOption_itemid,
                type XcglAssoOption_type
                tablename tablename
                fieldname XcglAssoOption_fieldname
    </sql>

	<!-- 

    <insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.xcgl.XcglAssoOption">
        INSERT INTO xcgl_asso_option
        <trim prefix="(" suffix=")" suffixOverrides=",">
                        <if test ='null != optionname'>
                        optionname,
                        </if>
                        <if test ='null != itemid'>
                        itemid,
                        </if>
                        <if test ='null != type'>
                        type
                        </if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
                        <if test ='null != optionname'>
                        #{optionname},
                        </if>
                        <if test ='null != itemid'>
                        #{itemid},
                        </if>
                        <if test ='null != type'>
                        #{type}
                        </if>
        </trim>
    </insert>

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

    <update id="update" parameterType="cn.timer.api.bean.xcgl.XcglAssoOption">
        UPDATE xcgl_asso_option
        <set>
                    <if test ='null != optionname'>optionname = #{optionname},</if>
                    <if test ='null != itemid'>itemid = #{itemid},</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 xcgl_asso_option
        WHERE id = #{id}
    </select>

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

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

	 -->

</mapper>