|
@@ -0,0 +1,235 @@
|
|
|
+<?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.steerinfo.dil.mapper.RmsReceivingCompanyMapper">
|
|
|
+ <resultMap id="BaseResultMap" type="com.steerinfo.dil.model.RmsReceivingCompany">
|
|
|
+ <id column="COMPANY_ID" javaType="DECIMAL" property="companyId"/>
|
|
|
+ <result column="COMPANY_CODE" jdbcType="VARCHAR" property="companyCode" />
|
|
|
+ <result column="COMPANY_NAME" jdbcType="VARCHAR" property="companyName" />
|
|
|
+ <result column="INSERT_USERNAME" jdbcType="VARCHAR" property="insertUsername" />
|
|
|
+ <result column="INSERT_TIME" jdbcType="TIMESTAMP" property="insertTime" />
|
|
|
+ <result column="UPDATE_USERNAME" jdbcType="VARCHAR" property="updateUsername" />
|
|
|
+ <result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime" />
|
|
|
+ <result column="INSERT_UPDATE_REMARK" jdbcType="VARCHAR" property="insertUpdateRemark" />
|
|
|
+ </resultMap>
|
|
|
+ <sql id="columns">
|
|
|
+ t.COMPANY_ID, t.COMPANY_CODE, t.COMPANY_NAME, t.INSERT_USERNAME, t.INSERT_TIME, t.UPDATE_USERNAME,
|
|
|
+ t.UPDATE_TIME, t.INSERT_UPDATE_REMARK
|
|
|
+ </sql>
|
|
|
+ <sql id="select">
|
|
|
+ SELECT <include refid="columns" /> FROM rms_receiving_company t
|
|
|
+ </sql>
|
|
|
+ <sql id="where">
|
|
|
+ <where>
|
|
|
+ <if test="companyId != null">
|
|
|
+ and t.COMPANY_ID = #{companyId}
|
|
|
+ </if>
|
|
|
+ <if test="companyCode != null and companyCode != ''">
|
|
|
+ and t.COMPANY_CODE = #{companyCode}
|
|
|
+ </if>
|
|
|
+ <if test="companyName != null and companyName != ''">
|
|
|
+ and t.COMPANY_NAME = #{companyName}
|
|
|
+ </if>
|
|
|
+ <if test="insertUsername != null and insertUsername != ''">
|
|
|
+ and t.INSERT_USERNAME = #{insertUsername}
|
|
|
+ </if>
|
|
|
+ <if test="insertTime != null">
|
|
|
+ and t.INSERT_TIME = #{insertTime}
|
|
|
+ </if>
|
|
|
+ <if test="updateUsername != null and updateUsername != ''">
|
|
|
+ and t.UPDATE_USERNAME = #{updateUsername}
|
|
|
+ </if>
|
|
|
+ <if test="updateTime != null">
|
|
|
+ and t.UPDATE_TIME = #{updateTime}
|
|
|
+ </if>
|
|
|
+ <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
|
|
|
+ and t.INSERT_UPDATE_REMARK = #{insertUpdateRemark}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </sql>
|
|
|
+ <delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
|
|
|
+ delete from rms_receiving_company
|
|
|
+ where COMPANY_ID = #{companyId, jdbcType=DECIMAL}
|
|
|
+ </delete>
|
|
|
+ <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
|
|
|
+ delete from rms_receiving_company
|
|
|
+ where 1 != 1
|
|
|
+ <if test="companyId != null and companyId != ''">
|
|
|
+ or COMPANY_ID = #{companyId}
|
|
|
+ </if>
|
|
|
+ <if test="companyCode != null and companyCode != ''">
|
|
|
+ or COMPANY_CODE = #{companyCode}
|
|
|
+ </if>
|
|
|
+ <if test="companyName != null and companyName != ''">
|
|
|
+ or COMPANY_NAME = #{companyName}
|
|
|
+ </if>
|
|
|
+ </delete>
|
|
|
+ <insert id="insert" parameterType="com.steerinfo.dil.model.RmsReceivingCompany">
|
|
|
+ insert into rms_receiving_company
|
|
|
+ (
|
|
|
+ COMPANY_ID,
|
|
|
+ COMPANY_CODE,
|
|
|
+ COMPANY_NAME,
|
|
|
+ INSERT_USERNAME,
|
|
|
+ INSERT_TIME,
|
|
|
+ UPDATE_USERNAME,
|
|
|
+ UPDATE_TIME,
|
|
|
+ INSERT_UPDATE_REMARK
|
|
|
+ )
|
|
|
+ values
|
|
|
+ (
|
|
|
+ #{companyId, jdbcType=DECIMAL},
|
|
|
+ #{companyCode, jdbcType=VARCHAR},
|
|
|
+ #{companyName, jdbcType=VARCHAR},
|
|
|
+ #{insertUsername, jdbcType=VARCHAR},
|
|
|
+ #{insertTime, jdbcType=TIMESTAMP},
|
|
|
+ #{updateUsername, jdbcType=VARCHAR},
|
|
|
+ #{updateTime, jdbcType=TIMESTAMP},
|
|
|
+ #{insertUpdateRemark, jdbcType=VARCHAR}
|
|
|
+ )
|
|
|
+ </insert>
|
|
|
+ <insert id="insertSelective" parameterType="com.steerinfo.dil.model.RmsReceivingCompany">
|
|
|
+ insert into rms_receiving_company
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="companyId != null">
|
|
|
+ COMPANY_ID,
|
|
|
+ </if>
|
|
|
+ <if test="companyCode != null">
|
|
|
+ COMPANY_CODE,
|
|
|
+ </if>
|
|
|
+ <if test="companyName != null">
|
|
|
+ COMPANY_NAME,
|
|
|
+ </if>
|
|
|
+ <if test="insertUsername != null">
|
|
|
+ INSERT_USERNAME,
|
|
|
+ </if>
|
|
|
+ <if test="insertTime != null">
|
|
|
+ INSERT_TIME,
|
|
|
+ </if>
|
|
|
+ <if test="updateUsername != null">
|
|
|
+ UPDATE_USERNAME,
|
|
|
+ </if>
|
|
|
+ <if test="updateTime != null">
|
|
|
+ UPDATE_TIME,
|
|
|
+ </if>
|
|
|
+ <if test="insertUpdateRemark != null">
|
|
|
+ INSERT_UPDATE_REMARK,
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="companyId != null">
|
|
|
+ #{companyId, jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="companyCode != null">
|
|
|
+ #{companyCode, jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="companyName != null">
|
|
|
+ #{companyName, jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="insertUsername != null">
|
|
|
+ #{insertUsername, jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="insertTime != null">
|
|
|
+ #{insertTime, jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="updateUsername != null">
|
|
|
+ #{updateUsername, jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="updateTime != null">
|
|
|
+ #{updateTime, jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="insertUpdateRemark != null">
|
|
|
+ #{insertUpdateRemark, jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+ <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.RmsReceivingCompany">
|
|
|
+ update rms_receiving_company set
|
|
|
+ COMPANY_CODE = #{companyCode, jdbcType=VARCHAR},
|
|
|
+ COMPANY_NAME = #{companyName, jdbcType=VARCHAR},
|
|
|
+ INSERT_USERNAME = #{insertUsername, jdbcType=VARCHAR},
|
|
|
+ INSERT_TIME = #{insertTime, jdbcType=TIMESTAMP},
|
|
|
+ UPDATE_USERNAME = #{updateUsername, jdbcType=VARCHAR},
|
|
|
+ UPDATE_TIME = #{updateTime, jdbcType=TIMESTAMP},
|
|
|
+ INSERT_UPDATE_REMARK = #{insertUpdateRemark, jdbcType=VARCHAR}
|
|
|
+ where
|
|
|
+ COMPANY_ID = #{companyId, jdbcType=DECIMAL}
|
|
|
+ </update>
|
|
|
+ <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.RmsReceivingCompany">
|
|
|
+ update rms_receiving_company
|
|
|
+ <set>
|
|
|
+ <if test="companyCode != null">
|
|
|
+ COMPANY_CODE = #{companyCode, jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="companyName != null">
|
|
|
+ COMPANY_NAME = #{companyName, jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="insertUsername != null">
|
|
|
+ INSERT_USERNAME = #{insertUsername, jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="insertTime != null">
|
|
|
+ INSERT_TIME = #{insertTime, jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="updateUsername != null">
|
|
|
+ UPDATE_USERNAME = #{updateUsername, jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="updateTime != null">
|
|
|
+ UPDATE_TIME = #{updateTime, jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="insertUpdateRemark != null">
|
|
|
+ INSERT_UPDATE_REMARK = #{insertUpdateRemark, jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ </set>
|
|
|
+ where COMPANY_ID = #{companyId, jdbcType=DECIMAL}
|
|
|
+ </update>
|
|
|
+ <select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap">
|
|
|
+ <include refid="select" />
|
|
|
+ where COMPANY_ID = #{companyId, jdbcType=DECIMAL}
|
|
|
+ </select>
|
|
|
+ <select id="selectByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
|
|
|
+ <include refid="select" />
|
|
|
+ <include refid="where" />
|
|
|
+ </select>
|
|
|
+ <select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
|
|
|
+ <include refid="select" />
|
|
|
+ <include refid="where" />
|
|
|
+ </select>
|
|
|
+ <insert id="batchInsert" parameterType="java.util.List">
|
|
|
+ insert into rms_receiving_company
|
|
|
+ (
|
|
|
+ COMPANY_ID,
|
|
|
+ COMPANY_CODE,
|
|
|
+ COMPANY_NAME,
|
|
|
+ INSERT_USERNAME,
|
|
|
+ INSERT_TIME,
|
|
|
+ UPDATE_USERNAME,
|
|
|
+ UPDATE_TIME,
|
|
|
+ INSERT_UPDATE_REMARK
|
|
|
+ )
|
|
|
+ ( <foreach collection="list" item="item" separator="union all">
|
|
|
+ select
|
|
|
+ #{companyId, jdbcType=DECIMAL},
|
|
|
+ #{companyCode, jdbcType=VARCHAR},
|
|
|
+ #{companyName, jdbcType=VARCHAR},
|
|
|
+ #{insertUsername, jdbcType=VARCHAR},
|
|
|
+ #{insertTime, jdbcType=TIMESTAMP},
|
|
|
+ #{updateUsername, jdbcType=VARCHAR},
|
|
|
+ #{updateTime, jdbcType=TIMESTAMP},
|
|
|
+ #{insertUpdateRemark, jdbcType=VARCHAR}
|
|
|
+ from dual
|
|
|
+ </foreach> )
|
|
|
+ </insert>
|
|
|
+ <update id="batchUpdate" parameterType="java.util.List">
|
|
|
+
|
|
|
+ </update>
|
|
|
+ <delete id="batchDelete" parameterType="java.util.List">
|
|
|
+ delete from rms_receiving_company
|
|
|
+ where COMPANY_ID in
|
|
|
+ <foreach close=")" collection="list" item="id" open="(" separator=",">
|
|
|
+ #{id}
|
|
|
+ </foreach>
|
|
|
+ </delete>
|
|
|
+
|
|
|
+ <select id="selectAll" resultMap="BaseResultMap">
|
|
|
+ <include refid="select" />
|
|
|
+ </select>
|
|
|
+</mapper>
|