<?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.jxgl.JxglAssoZbzdszMapper"> <resultMap id="BaseResultMap" type="cn.timer.api.bean.jxgl.JxglAssoZbzdsz" > <id column="id" property="id" /> <result column="name" property="name" /> <result column="type" property="type" /> <result column="is_sfqy" property="isSfqy" /> <result column="is_gsbl" property="isGsbl" /> <result column="jcszid" property="jcszid" /> <result column="qyid" property="qyid" /> </resultMap> <insert id="insertjxglassozbzdszList" parameterType="java.util.List" > insert into jxgl_asso_zbzdsz (name,type,is_sfqy,is_gsbl,jcszid,qyid) <foreach collection="list" item="item" index="index" open="values " close="" separator=","> ( <if test ='item.name != null'> #{item.name}, </if> <if test ='item.type != null'> #{item.type}, </if> <if test ='item.isSfqy != null'> #{item.isSfqy}, </if> <if test ='item.isGsbl != null'> #{item.isGsbl}, </if> <if test ='item.jcszid != null'> #{item.jcszid}, </if> <if test ='item.qyid != null'> #{item.qyid} </if> ) </foreach> </insert> <delete id="deletezbzdszByjcszid" > DELETE FROM jxgl_asso_zbzdsz WHERE jcszid = #{jcszid} </delete> <!-- <insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.jxgl.JxglAssoZbzdsz"> INSERT INTO jxgl_asso_zbzdsz <trim prefix="(" suffix=")" suffixOverrides=","> <if test ='null != name'> name, </if> <if test ='null != type'> type, </if> <if test ='null != isSfqy'> is_sfqy, </if> <if test ='null != isGsbl'> is_gsbl, </if> <if test ='null != jcszid'> jcszid </if> </trim> <trim prefix="values (" suffix=")" suffixOverrides=","> <if test ='null != name'> #{name}, </if> <if test ='null != type'> #{type}, </if> <if test ='null != isSfqy'> #{isSfqy}, </if> <if test ='null != isGsbl'> #{isGsbl}, </if> <if test ='null != jcszid'> #{jcszid} </if> </trim> </insert> <delete id="delete" > DELETE FROM jxgl_asso_zbzdsz WHERE id = #{id} </delete> <update id="update" parameterType="cn.timer.api.bean.jxgl.JxglAssoZbzdsz"> UPDATE jxgl_asso_zbzdsz <set> <if test ='null != name'>name = #{name},</if> <if test ='null != type'>type = #{type},</if> <if test ='null != isSfqy'>is_sfqy = #{isSfqy},</if> <if test ='null != isGsbl'>is_gsbl = #{isGsbl},</if> <if test ='null != jcszid'>jcszid = #{jcszid}</if> </set> WHERE id = #{id} </update> <select id="load" resultMap="BaseResultMap"> SELECT <include refid="Base_Column_List" /> FROM jxgl_asso_zbzdsz WHERE id = #{id} </select> <select id="pageList" resultMap="BaseResultMap"> SELECT <include refid="Base_Column_List" /> FROM jxgl_asso_zbzdsz LIMIT #{offset}, #{pageSize} </select> <select id="pageListCount" resultType="java.lang.Integer"> SELECT count(1) FROM jxgl_asso_zbzdsz </select> --> </mapper>