<?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.CwGlInitbuildBMapper"> <resultMap id="BaseResultMap" type="com.dhcc.finance.main.domain.CwGlInitbuildB"> <id column="PK_INITBUILD_B" jdbcType="VARCHAR" property="pkInitbuildB" /> <result column="PK_INITBUILD" jdbcType="VARCHAR" property="pkInitbuild" /> <result column="PK_CURRTYPE" jdbcType="VARCHAR" property="pkCurrtype" /> <result column="DEBITAMOUNT" jdbcType="DECIMAL" property="debitamount" /> <result column="CREDITAMOUNT" jdbcType="DECIMAL" property="creditamount" /> <result column="LOCALDEBITAMOUNT" jdbcType="DECIMAL" property="localdebitamount" /> <result column="LOCALCREDITAMOUNT" jdbcType="DECIMAL" property="localcreditamount" /> <result column="ASSID" jdbcType="VARCHAR" property="assid" /> <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_INITBUILD_B, PK_INITBUILD, PK_CURRTYPE, DEBITAMOUNT, CREDITAMOUNT, LOCALDEBITAMOUNT, LOCALCREDITAMOUNT, ASSID, USE_STATE, CREATE_USER, CREATE_TIME, UPDATE_USER, UPDATE_TIME, REMARK </sql> <select id="selectByExample" parameterType="com.dhcc.finance.main.domain.CwGlInitbuildBExample" resultMap="BaseResultMap"> select <if test="distinct"> distinct </if> <include refid="Base_Column_List" /> from cw_gl_initbuild_b <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_gl_initbuild_b where PK_INITBUILD_B = #{pkInitbuildB,jdbcType=VARCHAR} </select> <delete id="deleteByPrimaryKey" parameterType="java.lang.String"> delete from cw_gl_initbuild_b where PK_INITBUILD_B = #{pkInitbuildB,jdbcType=VARCHAR} </delete> <delete id="deleteByExample" parameterType="com.dhcc.finance.main.domain.CwGlInitbuildBExample"> delete from cw_gl_initbuild_b <if test="_parameter != null"> <include refid="Example_Where_Clause" /> </if> </delete> <insert id="insert" parameterType="com.dhcc.finance.main.domain.CwGlInitbuildB"> insert into cw_gl_initbuild_b (PK_INITBUILD_B, PK_INITBUILD, PK_CURRTYPE, DEBITAMOUNT, CREDITAMOUNT, LOCALDEBITAMOUNT, LOCALCREDITAMOUNT, ASSID, USE_STATE, CREATE_USER, CREATE_TIME, UPDATE_USER, UPDATE_TIME, REMARK) values (#{pkInitbuildB,jdbcType=VARCHAR}, #{pkInitbuild,jdbcType=VARCHAR}, #{pkCurrtype,jdbcType=VARCHAR}, #{debitamount,jdbcType=DECIMAL}, #{creditamount,jdbcType=DECIMAL}, #{localdebitamount,jdbcType=DECIMAL}, #{localcreditamount,jdbcType=DECIMAL}, #{assid,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.CwGlInitbuildB"> insert into cw_gl_initbuild_b <trim prefix="(" suffix=")" suffixOverrides=","> <if test="pkInitbuildB != null"> PK_INITBUILD_B, </if> <if test="pkInitbuild != null"> PK_INITBUILD, </if> <if test="pkCurrtype != null"> PK_CURRTYPE, </if> <if test="debitamount != null"> DEBITAMOUNT, </if> <if test="creditamount != null"> CREDITAMOUNT, </if> <if test="localdebitamount != null"> LOCALDEBITAMOUNT, </if> <if test="localcreditamount != null"> LOCALCREDITAMOUNT, </if> <if test="assid != null"> ASSID, </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="pkInitbuildB != null"> #{pkInitbuildB,jdbcType=VARCHAR}, </if> <if test="pkInitbuild != null"> #{pkInitbuild,jdbcType=VARCHAR}, </if> <if test="pkCurrtype != null"> #{pkCurrtype,jdbcType=VARCHAR}, </if> <if test="debitamount != null"> #{debitamount,jdbcType=DECIMAL}, </if> <if test="creditamount != null"> #{creditamount,jdbcType=DECIMAL}, </if> <if test="localdebitamount != null"> #{localdebitamount,jdbcType=DECIMAL}, </if> <if test="localcreditamount != null"> #{localcreditamount,jdbcType=DECIMAL}, </if> <if test="assid != null"> #{assid,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.CwGlInitbuildBExample" resultType="java.lang.Long"> select count(*) from cw_gl_initbuild_b <if test="_parameter != null"> <include refid="Example_Where_Clause" /> </if> </select> <update id="updateByExampleSelective" parameterType="map"> update cw_gl_initbuild_b <set> <if test="record.pkInitbuildB != null"> PK_INITBUILD_B = #{record.pkInitbuildB,jdbcType=VARCHAR}, </if> <if test="record.pkInitbuild != null"> PK_INITBUILD = #{record.pkInitbuild,jdbcType=VARCHAR}, </if> <if test="record.pkCurrtype != null"> PK_CURRTYPE = #{record.pkCurrtype,jdbcType=VARCHAR}, </if> <if test="record.debitamount != null"> DEBITAMOUNT = #{record.debitamount,jdbcType=DECIMAL}, </if> <if test="record.creditamount != null"> CREDITAMOUNT = #{record.creditamount,jdbcType=DECIMAL}, </if> <if test="record.localdebitamount != null"> LOCALDEBITAMOUNT = #{record.localdebitamount,jdbcType=DECIMAL}, </if> <if test="record.localcreditamount != null"> LOCALCREDITAMOUNT = #{record.localcreditamount,jdbcType=DECIMAL}, </if> <if test="record.assid != null"> ASSID = #{record.assid,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_gl_initbuild_b set PK_INITBUILD_B = #{record.pkInitbuildB,jdbcType=VARCHAR}, PK_INITBUILD = #{record.pkInitbuild,jdbcType=VARCHAR}, PK_CURRTYPE = #{record.pkCurrtype,jdbcType=VARCHAR}, DEBITAMOUNT = #{record.debitamount,jdbcType=DECIMAL}, CREDITAMOUNT = #{record.creditamount,jdbcType=DECIMAL}, LOCALDEBITAMOUNT = #{record.localdebitamount,jdbcType=DECIMAL}, LOCALCREDITAMOUNT = #{record.localcreditamount,jdbcType=DECIMAL}, ASSID = #{record.assid,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.CwGlInitbuildB"> update cw_gl_initbuild_b <set> <if test="pkInitbuild != null"> PK_INITBUILD = #{pkInitbuild,jdbcType=VARCHAR}, </if> <if test="pkCurrtype != null"> PK_CURRTYPE = #{pkCurrtype,jdbcType=VARCHAR}, </if> <if test="debitamount != null"> DEBITAMOUNT = #{debitamount,jdbcType=DECIMAL}, </if> <if test="creditamount != null"> CREDITAMOUNT = #{creditamount,jdbcType=DECIMAL}, </if> <if test="localdebitamount != null"> LOCALDEBITAMOUNT = #{localdebitamount,jdbcType=DECIMAL}, </if> <if test="localcreditamount != null"> LOCALCREDITAMOUNT = #{localcreditamount,jdbcType=DECIMAL}, </if> <if test="assid != null"> ASSID = #{assid,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_INITBUILD_B = #{pkInitbuildB,jdbcType=VARCHAR} </update> <update id="updateByPrimaryKey" parameterType="com.dhcc.finance.main.domain.CwGlInitbuildB"> update cw_gl_initbuild_b set PK_INITBUILD = #{pkInitbuild,jdbcType=VARCHAR}, PK_CURRTYPE = #{pkCurrtype,jdbcType=VARCHAR}, DEBITAMOUNT = #{debitamount,jdbcType=DECIMAL}, CREDITAMOUNT = #{creditamount,jdbcType=DECIMAL}, LOCALDEBITAMOUNT = #{localdebitamount,jdbcType=DECIMAL}, LOCALCREDITAMOUNT = #{localcreditamount,jdbcType=DECIMAL}, ASSID = #{assid,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_INITBUILD_B = #{pkInitbuildB,jdbcType=VARCHAR} </update> </mapper>