<?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.sbgjj.SbgjjAssoCbfzmxMapper"> <resultMap id="BaseResultMap" type="cn.timer.api.bean.sbgjj.SbgjjAssoCbfzmx" > <id column="id" property="id" /> <result column="xz" property="xz" /> <result column="jsxx" property="jsxx" /> <result column="jssx" property="jssx" /> <result column="gjbl" property="gjbl" /> <result column="gsgdje" property="gsgdje" /> <result column="gsqzgz" property="gsqzgz" /> <result column="grbl" property="grbl" /> <result column="grgdje" property="grgdje" /> <result column="grqzgz" property="grqzgz" /> <result column="type" property="type" /> <result column="tjsj_time" property="tjsjTime" /> <result column="tjry_num" property="tjryNum" /> <result column="gssbhj" property="gssbhj" /> <result column="grsbhj" property="grsbhj" /> <result column="gsgjjhj" property="gsgjjhj" /> <result column="grgjjhj" property="grgjjhj" /> <result column="cbfaid" property="cbfaid" /> </resultMap> <sql id="Base_Column_List"> id, xz, jsxx, jssx, gjbl, gsgdje, gsqzgz, grbl, grgdje, grqzgz, type, tjsj_time, tjry_num, gssbhj, grsbhj, gsgjjhj, grgjjhj, cbfaid </sql> <sql id="Base_Column_List_Alias"> id SbgjjAssoCbfzmx_id, xz SbgjjAssoCbfzmx_xz, jsxx SbgjjAssoCbfzmx_jsxx, jssx SbgjjAssoCbfzmx_jssx, gjbl SbgjjAssoCbfzmx_gjbl, gsgdje SbgjjAssoCbfzmx_gsgdje, gsqzgz SbgjjAssoCbfzmx_gsqzgz, grbl SbgjjAssoCbfzmx_grbl, grgdje SbgjjAssoCbfzmx_grgdje, grqzgz SbgjjAssoCbfzmx_grqzgz, type SbgjjAssoCbfzmx_type, tjsj_time SbgjjAssoCbfzmx_tjsj_time, tjry_num SbgjjAssoCbfzmx_tjry_num, gssbhj SbgjjAssoCbfzmx_gssbhj, grsbhj SbgjjAssoCbfzmx_grsbhj, gsgjjhj SbgjjAssoCbfzmx_gsgjjhj, grgjjhj SbgjjAssoCbfzmx_grgjjhj, cbfaid SbgjjAssoCbfzmx_cbfaid </sql> <insert id="insertsbgjjassocbfzmxList" parameterType="java.util.List" useGeneratedKeys="true" keyProperty="id" > insert into sbgjj_asso_cbfzmx (xz,jsxx,jssx,gjbl,gsgdje,gsqzgz,grbl,grgdje,grqzgz,type,tjsj_time,tjry_num,gssbhj,grsbhj,gsgjjhj,grgjjhj,cbfaid) <foreach collection="list" item="item" index="index" open="values " close="" separator=","> ( <if test="item.xz != null" > #{item.xz,jdbcType=VARCHAR}, </if> <if test="item.jsxx != null" > #{item.jsxx,jdbcType=VARCHAR}, </if> <if test="item.jssx != null" > #{item.jssx,jdbcType=VARCHAR}, </if> <if test="item.gjbl != null" > #{item.gjbl,jdbcType=INTEGER}, </if> <if test="item.gsgdje != null" > #{item.gsgdje,jdbcType=BIGINT}, </if> <if test="item.gsqzgz != null" > #{item.gsqzgz,jdbcType=INTEGER}, </if> <if test="item.grbl != null" > #{item.grbl,jdbcType=INTEGER}, </if> <if test="item.grgdje != null" > #{item.grgdje,jdbcType=VARCHAR}, </if> <if test="item.grqzgz != null" > #{item.grqzgz,jdbcType=INTEGER}, </if> <if test="item.type != null" > #{item.type,jdbcType=VARCHAR}, </if> <if test="item.tjsjTime != null" > #{item.tjsjTime,jdbcType=INTEGER}, </if> <if test="item.tjryNum != null" > #{item.tjryNum,jdbcType=INTEGER}, </if> <if test="item.gssbhj != null" > #{item.gssbhj,jdbcType=INTEGER}, </if> <if test="item.grsbhj != null" > #{item.grsbhj,jdbcType=INTEGER}, </if> <if test="item.gsgjjhj != null" > #{item.gsgjjhj,jdbcType=INTEGER}, </if> <if test="item.grgjjhj != null" > #{item.grgjjhj,jdbcType=INTEGER}, </if> <if test="item.cbfaid != null" > #{item.cbfaid,jdbcType=INTEGER} </if> ) </foreach> </insert> <delete id="deleteBycbfaid" > DELETE FROM sbgjj_asso_cbfzmx WHERE cbfaid = #{cbfaid} </delete> <!-- <insert id="insert" parameterType="cn.timer.api.bean.sbgjj.SbgjjAssoCbfzmx" useGeneratedKeys="true" keyProperty="id"> INSERT INTO sbgjj_asso_cbfzmx <trim prefix="(" suffix=")" suffixOverrides=","> <if test ='null != xz'> xz, </if> <if test ='null != jsxx'> jsxx, </if> <if test ='null != jssx'> jssx, </if> <if test ='null != gjbl'> gjbl, </if> <if test ='null != gsgdje'> gsgdje, </if> <if test ='null != gsqzgz'> gsqzgz, </if> <if test ='null != grbl'> grbl, </if> <if test ='null != grgdje'> grgdje, </if> <if test ='null != grqzgz'> grqzgz, </if> <if test ='null != type'> type, </if> <if test ='null != tjsjTime'> tjsj_time, </if> <if test ='null != tjryNum'> tjry_num, </if> <if test ='null != gssbhj'> gssbhj, </if> <if test ='null != grsbhj'> grsbhj, </if> <if test ='null != gsgjjhj'> gsgjjhj, </if> <if test ='null != grgjjhj'> grgjjhj, </if> <if test ='null != cbfaid'> cbfaid </if> </trim> <trim prefix="values (" suffix=")" suffixOverrides=","> <if test ='null != xz'> #{xz}, </if> <if test ='null != jsxx'> #{jsxx}, </if> <if test ='null != jssx'> #{jssx}, </if> <if test ='null != gjbl'> #{gjbl}, </if> <if test ='null != gsgdje'> #{gsgdje}, </if> <if test ='null != gsqzgz'> #{gsqzgz}, </if> <if test ='null != grbl'> #{grbl}, </if> <if test ='null != grgdje'> #{grgdje}, </if> <if test ='null != grqzgz'> #{grqzgz}, </if> <if test ='null != type'> #{type}, </if> <if test ='null != tjsjTime'> #{tjsjTime}, </if> <if test ='null != tjryNum'> #{tjryNum}, </if> <if test ='null != gssbhj'> #{gssbhj}, </if> <if test ='null != grsbhj'> #{grsbhj}, </if> <if test ='null != gsgjjhj'> #{gsgjjhj}, </if> <if test ='null != grgjjhj'> #{grgjjhj}, </if> <if test ='null != cbfaid'> #{cbfaid} </if> </trim> </insert> <delete id="delete" > DELETE FROM sbgjj_asso_cbfzmx WHERE id = #{id} </delete> <delete id="deleteBycbfaid" > DELETE FROM sbgjj_asso_cbfzmx WHERE cbfaid = #{cbfaid} </delete> <update id="update" parameterType="cn.timer.api.bean.sbgjj.SbgjjAssoCbfzmx"> UPDATE sbgjj_asso_cbfzmx <set> <if test ='null != xz'>xz = #{xz},</if> <if test ='null != jsxx'>jsxx = #{jsxx},</if> <if test ='null != jssx'>jssx = #{jssx},</if> <if test ='null != gjbl'>gjbl = #{gjbl},</if> <if test ='null != gsgdje'>gsgdje = #{gsgdje},</if> <if test ='null != gsqzgz'>gsqzgz = #{gsqzgz},</if> <if test ='null != grbl'>grbl = #{grbl},</if> <if test ='null != grgdje'>grgdje = #{grgdje},</if> <if test ='null != grqzgz'>grqzgz = #{grqzgz},</if> <if test ='null != type'>type = #{type},</if> <if test ='null != tjsjTime'>tjsj_time = #{tjsjTime},</if> <if test ='null != tjryNum'>tjry_num = #{tjryNum},</if> <if test ='null != gssbhj'>gssbhj = #{gssbhj},</if> <if test ='null != grsbhj'>grsbhj = #{grsbhj},</if> <if test ='null != gsgjjhj'>gsgjjhj = #{gsgjjhj},</if> <if test ='null != grgjjhj'>grgjjhj = #{grgjjhj},</if> <if test ='null != cbfaid'>cbfaid = #{cbfaid}</if> </set> WHERE id = #{id} </update> <select id="load" resultMap="BaseResultMap"> SELECT <include refid="Base_Column_List" /> FROM sbgjj_asso_cbfzmx WHERE id = #{id} </select> <select id="pageList" resultMap="BaseResultMap"> SELECT <include refid="Base_Column_List" /> FROM sbgjj_asso_cbfzmx LIMIT #{offset}, #{pageSize} </select> <select id="pageListCount" resultType="java.lang.Integer"> SELECT count(1) FROM sbgjj_asso_cbfzmx </select> --> </mapper>