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