<?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>