<?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="com.dhcc.finance.main.dao.CwBdVouchtempcomMapper"> <resultMap id="BaseResultMap" type="com.dhcc.finance.main.domain.CwBdVouchtempcom"> <id column="PK_VOUCHTEMPCOM" jdbcType="VARCHAR" property="pkVouchtempcom" /> <result column="PK_BILLTYPE" jdbcType="VARCHAR" property="pkBilltype" /> <result column="TRANSNAME" jdbcType="VARCHAR" property="transname" /> <result column="TRANSNO" jdbcType="VARCHAR" property="transno" /> <result column="PK_VOUCHTEMP" jdbcType="VARCHAR" property="pkVouchtemp" /> <result column="VOUCHTEMPNAME" jdbcType="VARCHAR" property="vouchtempname" /> <result column="USE_STATE" jdbcType="VARCHAR" property="useState" /> <result column="CREATE_USER" jdbcType="VARCHAR" property="createUser" /> <result column="CREATE_TIME" jdbcType="TIMESTAMP" property="createTime" /> <result column="UPDATE_USER" jdbcType="VARCHAR" property="updateUser" /> <result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime" /> <result column="REMARK" jdbcType="VARCHAR" property="remark" /> </resultMap> <sql id="Example_Where_Clause"> <where> <foreach collection="oredCriteria" item="criteria" separator="or"> <if test="criteria.valid"> <trim prefix="(" prefixOverrides="and" suffix=")"> <foreach collection="criteria.criteria" item="criterion"> <choose> <when test="criterion.noValue"> and ${criterion.condition} </when> <when test="criterion.singleValue"> and ${criterion.condition} #{criterion.value} </when> <when test="criterion.betweenValue"> and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} </when> <when test="criterion.listValue"> and ${criterion.condition} <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> #{listItem} </foreach> </when> </choose> </foreach> </trim> </if> </foreach> </where> </sql> <sql id="Update_By_Example_Where_Clause"> <where> <foreach collection="example.oredCriteria" item="criteria" separator="or"> <if test="criteria.valid"> <trim prefix="(" prefixOverrides="and" suffix=")"> <foreach collection="criteria.criteria" item="criterion"> <choose> <when test="criterion.noValue"> and ${criterion.condition} </when> <when test="criterion.singleValue"> and ${criterion.condition} #{criterion.value} </when> <when test="criterion.betweenValue"> and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} </when> <when test="criterion.listValue"> and ${criterion.condition} <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> #{listItem} </foreach> </when> </choose> </foreach> </trim> </if> </foreach> </where> </sql> <sql id="Base_Column_List"> PK_VOUCHTEMPCOM, PK_BILLTYPE, TRANSNAME, TRANSNO, PK_VOUCHTEMP, VOUCHTEMPNAME, USE_STATE, CREATE_USER, CREATE_TIME, UPDATE_USER, UPDATE_TIME, REMARK </sql> <select id="selectByExample" parameterType="com.dhcc.finance.main.domain.CwBdVouchtempcomExample" resultMap="BaseResultMap"> select <if test="distinct"> distinct </if> <include refid="Base_Column_List" /> from cw_bd_vouchtempcom <if test="_parameter != null"> <include refid="Example_Where_Clause" /> </if> <if test="orderByClause != null"> order by ${orderByClause} </if> </select> <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap"> select <include refid="Base_Column_List" /> from cw_bd_vouchtempcom where PK_VOUCHTEMPCOM = #{pkVouchtempcom,jdbcType=VARCHAR} </select> <delete id="deleteByPrimaryKey" parameterType="java.lang.String"> delete from cw_bd_vouchtempcom where PK_VOUCHTEMPCOM = #{pkVouchtempcom,jdbcType=VARCHAR} </delete> <delete id="deleteByExample" parameterType="com.dhcc.finance.main.domain.CwBdVouchtempcomExample"> delete from cw_bd_vouchtempcom <if test="_parameter != null"> <include refid="Example_Where_Clause" /> </if> </delete> <insert id="insert" parameterType="com.dhcc.finance.main.domain.CwBdVouchtempcom"> insert into cw_bd_vouchtempcom (PK_VOUCHTEMPCOM, PK_BILLTYPE, TRANSNAME, TRANSNO, PK_VOUCHTEMP, VOUCHTEMPNAME, USE_STATE, CREATE_USER, CREATE_TIME, UPDATE_USER, UPDATE_TIME, REMARK ) values (#{pkVouchtempcom,jdbcType=VARCHAR}, #{pkBilltype,jdbcType=VARCHAR}, #{transname,jdbcType=VARCHAR}, #{transno,jdbcType=VARCHAR}, #{pkVouchtemp,jdbcType=VARCHAR}, #{vouchtempname,jdbcType=VARCHAR}, #{useState,jdbcType=VARCHAR}, #{createUser,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateUser,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{remark,jdbcType=VARCHAR} ) </insert> <insert id="insertSelective" parameterType="com.dhcc.finance.main.domain.CwBdVouchtempcom"> insert into cw_bd_vouchtempcom <trim prefix="(" suffix=")" suffixOverrides=","> <if test="pkVouchtempcom != null"> PK_VOUCHTEMPCOM, </if> <if test="pkBilltype != null"> PK_BILLTYPE, </if> <if test="transname != null"> TRANSNAME, </if> <if test="transno != null"> TRANSNO, </if> <if test="pkVouchtemp != null"> PK_VOUCHTEMP, </if> <if test="vouchtempname != null"> VOUCHTEMPNAME, </if> <if test="useState != null"> USE_STATE, </if> <if test="createUser != null"> CREATE_USER, </if> <if test="createTime != null"> CREATE_TIME, </if> <if test="updateUser != null"> UPDATE_USER, </if> <if test="updateTime != null"> UPDATE_TIME, </if> <if test="remark != null"> REMARK, </if> </trim> <trim prefix="values (" suffix=")" suffixOverrides=","> <if test="pkVouchtempcom != null"> #{pkVouchtempcom,jdbcType=VARCHAR}, </if> <if test="pkBilltype != null"> #{pkBilltype,jdbcType=VARCHAR}, </if> <if test="transname != null"> #{transname,jdbcType=VARCHAR}, </if> <if test="transno != null"> #{transno,jdbcType=VARCHAR}, </if> <if test="pkVouchtemp != null"> #{pkVouchtemp,jdbcType=VARCHAR}, </if> <if test="vouchtempname != null"> #{vouchtempname,jdbcType=VARCHAR}, </if> <if test="useState != null"> #{useState,jdbcType=VARCHAR}, </if> <if test="createUser != null"> #{createUser,jdbcType=VARCHAR}, </if> <if test="createTime != null"> #{createTime,jdbcType=TIMESTAMP}, </if> <if test="updateUser != null"> #{updateUser,jdbcType=VARCHAR}, </if> <if test="updateTime != null"> #{updateTime,jdbcType=TIMESTAMP}, </if> <if test="remark != null"> #{remark,jdbcType=VARCHAR}, </if> </trim> </insert> <select id="countByExample" parameterType="com.dhcc.finance.main.domain.CwBdVouchtempcomExample" resultType="java.lang.Long"> select count(*) from cw_bd_vouchtempcom <if test="_parameter != null"> <include refid="Example_Where_Clause" /> </if> </select> <update id="updateByExampleSelective" parameterType="map"> update cw_bd_vouchtempcom <set> <if test="record.pkVouchtempcom != null"> PK_VOUCHTEMPCOM = #{record.pkVouchtempcom,jdbcType=VARCHAR}, </if> <if test="record.pkBilltype != null"> PK_BILLTYPE = #{record.pkBilltype,jdbcType=VARCHAR}, </if> <if test="record.transname != null"> TRANSNAME = #{record.transname,jdbcType=VARCHAR}, </if> <if test="record.transno != null"> TRANSNO = #{record.transno,jdbcType=VARCHAR}, </if> <if test="record.pkVouchtemp != null"> PK_VOUCHTEMP = #{record.pkVouchtemp,jdbcType=VARCHAR}, </if> <if test="record.vouchtempname != null"> VOUCHTEMPNAME = #{record.vouchtempname,jdbcType=VARCHAR}, </if> <if test="record.useState != null"> USE_STATE = #{record.useState,jdbcType=VARCHAR}, </if> <if test="record.createUser != null"> CREATE_USER = #{record.createUser,jdbcType=VARCHAR}, </if> <if test="record.createTime != null"> CREATE_TIME = #{record.createTime,jdbcType=TIMESTAMP}, </if> <if test="record.updateUser != null"> UPDATE_USER = #{record.updateUser,jdbcType=VARCHAR}, </if> <if test="record.updateTime != null"> UPDATE_TIME = #{record.updateTime,jdbcType=TIMESTAMP}, </if> <if test="record.remark != null"> REMARK = #{record.remark,jdbcType=VARCHAR}, </if> </set> <if test="_parameter != null"> <include refid="Update_By_Example_Where_Clause" /> </if> </update> <update id="updateByExample" parameterType="map"> update cw_bd_vouchtempcom set PK_VOUCHTEMPCOM = #{record.pkVouchtempcom,jdbcType=VARCHAR}, PK_BILLTYPE = #{record.pkBilltype,jdbcType=VARCHAR}, TRANSNAME = #{record.transname,jdbcType=VARCHAR}, TRANSNO = #{record.transno,jdbcType=VARCHAR}, PK_VOUCHTEMP = #{record.pkVouchtemp,jdbcType=VARCHAR}, VOUCHTEMPNAME = #{record.vouchtempname,jdbcType=VARCHAR}, USE_STATE = #{record.useState,jdbcType=VARCHAR}, CREATE_USER = #{record.createUser,jdbcType=VARCHAR}, CREATE_TIME = #{record.createTime,jdbcType=TIMESTAMP}, UPDATE_USER = #{record.updateUser,jdbcType=VARCHAR}, UPDATE_TIME = #{record.updateTime,jdbcType=TIMESTAMP}, REMARK = #{record.remark,jdbcType=VARCHAR} <if test="_parameter != null"> <include refid="Update_By_Example_Where_Clause" /> </if> </update> <update id="updateByPrimaryKeySelective" parameterType="com.dhcc.finance.main.domain.CwBdVouchtempcom"> update cw_bd_vouchtempcom <set> <if test="pkBilltype != null"> PK_BILLTYPE = #{pkBilltype,jdbcType=VARCHAR}, </if> <if test="transname != null"> TRANSNAME = #{transname,jdbcType=VARCHAR}, </if> <if test="transno != null"> TRANSNO = #{transno,jdbcType=VARCHAR}, </if> <if test="pkVouchtemp != null"> PK_VOUCHTEMP = #{pkVouchtemp,jdbcType=VARCHAR}, </if> <if test="vouchtempname != null"> VOUCHTEMPNAME = #{vouchtempname,jdbcType=VARCHAR}, </if> <if test="useState != null"> USE_STATE = #{useState,jdbcType=VARCHAR}, </if> <if test="createUser != null"> CREATE_USER = #{createUser,jdbcType=VARCHAR}, </if> <if test="createTime != null"> CREATE_TIME = #{createTime,jdbcType=TIMESTAMP}, </if> <if test="updateUser != null"> UPDATE_USER = #{updateUser,jdbcType=VARCHAR}, </if> <if test="updateTime != null"> UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP}, </if> <if test="remark != null"> REMARK = #{remark,jdbcType=VARCHAR}, </if> </set> where PK_VOUCHTEMPCOM = #{pkVouchtempcom,jdbcType=VARCHAR} </update> <update id="updateByPrimaryKey" parameterType="com.dhcc.finance.main.domain.CwBdVouchtempcom"> update cw_bd_vouchtempcom set PK_BILLTYPE = #{pkBilltype,jdbcType=VARCHAR}, TRANSNAME = #{transname,jdbcType=VARCHAR}, TRANSNO = #{transno,jdbcType=VARCHAR}, PK_VOUCHTEMP = #{pkVouchtemp,jdbcType=VARCHAR}, VOUCHTEMPNAME = #{vouchtempname,jdbcType=VARCHAR}, USE_STATE = #{useState,jdbcType=VARCHAR}, CREATE_USER = #{createUser,jdbcType=VARCHAR}, CREATE_TIME = #{createTime,jdbcType=TIMESTAMP}, UPDATE_USER = #{updateUser,jdbcType=VARCHAR}, UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP}, REMARK = #{remark,jdbcType=VARCHAR} where PK_VOUCHTEMPCOM = #{pkVouchtempcom,jdbcType=VARCHAR} </update> <!-- 批量插入 --> <insert id="batchInsertCwBdVouchtempcom" parameterType="java.util.List"> insert into cw_bd_vouchtempcom (PK_VOUCHTEMPCOM, PK_BILLTYPE, TRANSNAME, TRANSNO, PK_VOUCHTEMP, VOUCHTEMPNAME, USE_STATE, CREATE_USER, CREATE_TIME, UPDATE_USER, UPDATE_TIME, REMARK) values <foreach collection="cwBdVouchtempcom" item="item" index="index" separator=","> (#{item.pkVouchtempcom,jdbcType=VARCHAR}, #{item.pkBilltype,jdbcType=VARCHAR}, #{item.transname,jdbcType=VARCHAR}, #{item.transno,jdbcType=VARCHAR}, #{item.pkVouchtemp,jdbcType=VARCHAR}, #{item.vouchtempname,jdbcType=VARCHAR}, #{item.useState,jdbcType=VARCHAR}, #{item.createUser,jdbcType=VARCHAR}, #{item.createTime,jdbcType=TIMESTAMP}, #{item.updateUser,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=TIMESTAMP}, #{item.remark,jdbcType=VARCHAR} ) </foreach> </insert> </mapper>