<?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.yggl.YgglAttaZszjbMapper"> <resultMap id="BaseResultMap" type="cn.timer.api.bean.yggl.YgglAttaZszjb" > <id column="id" property="id" /> <id column="id" property="id" /> <result column="emp_num" property="empNum" /> <result column="zs_name" property="zsName" /> <result column="type" property="type" /> <result column="level" property="level" /> <result column="zy" property="zy" /> <result column="fzjg" property="fzjg" /> <result column="fz_time" property="fzTime" /> <result column="start_time" property="startTime" /> <result column="end_time" property="endTime" /> <result column="zs_id" property="zsId" /> <result column="zs_remark" property="zsRemark" /> <result column="org_code" property="orgCode" /> </resultMap> <sql id="Base_Column_List"> id, emp_num, zs_name, type, level, zy, fzjg, fz_time, start_time, end_time, zs_id, zs_remark, org_code </sql> <sql id="Base_Column_List_Alias"> id YgglAttaZszjb_id, emp_num YgglAttaZszjb_emp_num, zs_name YgglAttaZszjb_zs_name, type YgglAttaZszjb_type, level YgglAttaZszjb_level, zy YgglAttaZszjb_zy, fzjg YgglAttaZszjb_fzjg, fz_time YgglAttaZszjb_fz_time, start_time YgglAttaZszjb_start_time, end_time YgglAttaZszjb_end_time, zs_id YgglAttaZszjb_zs_id, zs_remark YgglAttaZszjb_zs_remark, org_code YgglAttaZszjb_org_code </sql> <!-- <insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.yggl.YgglAttaZszjb"> INSERT INTO yggl_atta_zszjb <trim prefix="(" suffix=")" suffixOverrides=","> <if test ='null != empNum'> emp_num, </if> <if test ='null != zsName'> zs_name, </if> <if test ='null != type'> type, </if> <if test ='null != level'> level, </if> <if test ='null != zy'> zy, </if> <if test ='null != fzjg'> fzjg, </if> <if test ='null != fzTime'> fz_time, </if> <if test ='null != startTime'> start_time, </if> <if test ='null != endTime'> end_time, </if> <if test ='null != zsId'> zs_id, </if> <if test ='null != zsRemark'> zs_remark, </if> <if test ='null != orgCode'> org_code </if> </trim> <trim prefix="values (" suffix=")" suffixOverrides=","> <if test ='null != empNum'> #{empNum}, </if> <if test ='null != zsName'> #{zsName}, </if> <if test ='null != type'> #{type}, </if> <if test ='null != level'> #{level}, </if> <if test ='null != zy'> #{zy}, </if> <if test ='null != fzjg'> #{fzjg}, </if> <if test ='null != fzTime'> #{fzTime}, </if> <if test ='null != startTime'> #{startTime}, </if> <if test ='null != endTime'> #{endTime}, </if> <if test ='null != zsId'> #{zsId}, </if> <if test ='null != zsRemark'> #{zsRemark}, </if> <if test ='null != orgCode'> #{orgCode} </if> </trim> </insert> <delete id="delete" > DELETE FROM yggl_atta_zszjb WHERE id = #{id} </delete> <update id="update" parameterType="cn.timer.api.bean.yggl.YgglAttaZszjb"> UPDATE yggl_atta_zszjb <set> <if test ='null != empNum'>emp_num = #{empNum},</if> <if test ='null != zsName'>zs_name = #{zsName},</if> <if test ='null != type'>type = #{type},</if> <if test ='null != level'>level = #{level},</if> <if test ='null != zy'>zy = #{zy},</if> <if test ='null != fzjg'>fzjg = #{fzjg},</if> <if test ='null != fzTime'>fz_time = #{fzTime},</if> <if test ='null != startTime'>start_time = #{startTime},</if> <if test ='null != endTime'>end_time = #{endTime},</if> <if test ='null != zsId'>zs_id = #{zsId},</if> <if test ='null != zsRemark'>zs_remark = #{zsRemark},</if> <if test ='null != orgCode'>org_code = #{orgCode}</if> </set> WHERE id = #{id} </update> <select id="load" resultMap="BaseResultMap"> SELECT <include refid="Base_Column_List" /> FROM yggl_atta_zszjb WHERE id = #{id} </select> <select id="pageList" resultMap="BaseResultMap"> SELECT <include refid="Base_Column_List" /> FROM yggl_atta_zszjb LIMIT #{offset}, #{pageSize} </select> <select id="pageListCount" resultType="java.lang.Integer"> SELECT count(1) FROM yggl_atta_zszjb </select> --> </mapper>