|
@@ -0,0 +1,241 @@
|
|
|
|
+<?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.MeasureJsonDataMapper">
|
|
|
|
+ <resultMap id="BaseResultMap" type="com.steerinfo.dil.model.MeasureJsonData">
|
|
|
|
+ <id column="MEASURE_ID" jdbcType="DECIMAL" property="measureId" />
|
|
|
|
+ <result column="MEASURE_TYPE_ID" jdbcType="DECIMAL" property="measureTypeId" />
|
|
|
|
+ <result column="MEASURE_JSON_DATA" jdbcType="VARCHAR" property="measureJsonData" />
|
|
|
|
+ <result column="MEASURE_JSON_URL" jdbcType="VARCHAR" property="measureJsonUrl" />
|
|
|
|
+ <result column="ORDER_NUMBER" jdbcType="VARCHAR" property="orderNumber" />
|
|
|
|
+ <result column="WAREHOUSE_NAME" jdbcType="VARCHAR" property="warehouseName" />
|
|
|
|
+ </resultMap>
|
|
|
|
+ <sql id="columns">
|
|
|
|
+ MEASURE_ID, MEASURE_TYPE_ID, MEASURE_JSON_DATA, MEASURE_JSON_URL, ORDER_NUMBER, WAREHOUSE_NAME
|
|
|
|
+ </sql>
|
|
|
|
+ <sql id="columns_alias">
|
|
|
|
+ t.MEASURE_ID, t.MEASURE_TYPE_ID, t.MEASURE_JSON_DATA, t.MEASURE_JSON_URL, t.ORDER_NUMBER,
|
|
|
|
+ t.WAREHOUSE_NAME
|
|
|
|
+ </sql>
|
|
|
|
+ <sql id="select">
|
|
|
|
+ SELECT <include refid="columns"/> FROM MEASURE_JSON_DATA
|
|
|
|
+ </sql>
|
|
|
|
+ <sql id="select_alias">
|
|
|
|
+ SELECT <include refid="columns_alias"/> FROM MEASURE_JSON_DATA t
|
|
|
|
+ </sql>
|
|
|
|
+ <sql id="where">
|
|
|
|
+ <where>
|
|
|
|
+ <if test="measureId != null">
|
|
|
|
+ and MEASURE_ID = #{measureId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="measureTypeId != null">
|
|
|
|
+ and MEASURE_TYPE_ID = #{measureTypeId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="measureJsonData != null and measureJsonData != ''">
|
|
|
|
+ and MEASURE_JSON_DATA = #{measureJsonData}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="measureJsonUrl != null and measureJsonUrl != ''">
|
|
|
|
+ and MEASURE_JSON_URL = #{measureJsonUrl}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="orderNumber != null and orderNumber != ''">
|
|
|
|
+ and ORDER_NUMBER = #{orderNumber}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="warehouseName != null and warehouseName != ''">
|
|
|
|
+ and WAREHOUSE_NAME = #{warehouseName}
|
|
|
|
+ </if>
|
|
|
|
+ </where>
|
|
|
|
+ </sql>
|
|
|
|
+ <sql id="whereLike">
|
|
|
|
+ <where>
|
|
|
|
+ <if test="measureId != null">
|
|
|
|
+ and MEASURE_ID = #{measureId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="measureTypeId != null">
|
|
|
|
+ and MEASURE_TYPE_ID = #{measureTypeId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="measureJsonData != null and measureJsonData != ''">
|
|
|
|
+ and MEASURE_JSON_DATA LIKE '%${measureJsonData}%'
|
|
|
|
+ </if>
|
|
|
|
+ <if test="measureJsonUrl != null and measureJsonUrl != ''">
|
|
|
|
+ and MEASURE_JSON_URL LIKE '%${measureJsonUrl}%'
|
|
|
|
+ </if>
|
|
|
|
+ <if test="orderNumber != null and orderNumber != ''">
|
|
|
|
+ and ORDER_NUMBER LIKE '%${orderNumber}%'
|
|
|
|
+ </if>
|
|
|
|
+ <if test="warehouseName != null and warehouseName != ''">
|
|
|
|
+ and WAREHOUSE_NAME LIKE '%${warehouseName}%'
|
|
|
|
+ </if>
|
|
|
|
+ </where>
|
|
|
|
+ </sql>
|
|
|
|
+ <delete id="deleteByPrimaryKey" parameterType="java.lang.Short">
|
|
|
|
+ delete from MEASURE_JSON_DATA
|
|
|
|
+ where MEASURE_ID = #{measureId,jdbcType=DECIMAL}
|
|
|
|
+ </delete>
|
|
|
|
+ <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
|
|
|
|
+ delete from MEASURE_JSON_DATA
|
|
|
|
+ where 1!=1
|
|
|
|
+ <if test="measureTypeId != null">
|
|
|
|
+ or MEASURE_TYPE_ID = #{measureTypeId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="measureJsonData != null and measureJsonData != ''">
|
|
|
|
+ or MEASURE_JSON_DATA = #{measureJsonData}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="measureJsonUrl != null and measureJsonUrl != ''">
|
|
|
|
+ or MEASURE_JSON_URL = #{measureJsonUrl}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="orderNumber != null and orderNumber != ''">
|
|
|
|
+ or ORDER_NUMBER = #{orderNumber}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="warehouseName != null and warehouseName != ''">
|
|
|
|
+ or WAREHOUSE_NAME = #{warehouseName}
|
|
|
|
+ </if>
|
|
|
|
+ </delete>
|
|
|
|
+ <insert id="insert" parameterType="com.steerinfo.dil.model.MeasureJsonData">
|
|
|
|
+ insert into MEASURE_JSON_DATA (MEASURE_ID, MEASURE_TYPE_ID, MEASURE_JSON_DATA,
|
|
|
|
+ MEASURE_JSON_URL, ORDER_NUMBER, WAREHOUSE_NAME
|
|
|
|
+ )
|
|
|
|
+ values (#{measureId,jdbcType=DECIMAL}, #{measureTypeId,jdbcType=DECIMAL}, #{measureJsonData,jdbcType=VARCHAR},
|
|
|
|
+ #{measureJsonUrl,jdbcType=VARCHAR}, #{orderNumber,jdbcType=VARCHAR}, #{warehouseName,jdbcType=VARCHAR}
|
|
|
|
+ )
|
|
|
|
+ </insert>
|
|
|
|
+ <insert id="insertSelective" parameterType="com.steerinfo.dil.model.MeasureJsonData">
|
|
|
|
+ insert into MEASURE_JSON_DATA
|
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
+ <if test="measureId != null">
|
|
|
|
+ MEASURE_ID,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="measureTypeId != null">
|
|
|
|
+ MEASURE_TYPE_ID,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="measureJsonData != null">
|
|
|
|
+ MEASURE_JSON_DATA,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="measureJsonUrl != null">
|
|
|
|
+ MEASURE_JSON_URL,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="orderNumber != null">
|
|
|
|
+ ORDER_NUMBER,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="warehouseName != null">
|
|
|
|
+ WAREHOUSE_NAME,
|
|
|
|
+ </if>
|
|
|
|
+ </trim>
|
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
+ <if test="measureId != null">
|
|
|
|
+ #{measureId,jdbcType=DECIMAL},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="measureTypeId != null">
|
|
|
|
+ #{measureTypeId,jdbcType=DECIMAL},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="measureJsonData != null">
|
|
|
|
+ #{measureJsonData,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="measureJsonUrl != null">
|
|
|
|
+ #{measureJsonUrl,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="orderNumber != null">
|
|
|
|
+ #{orderNumber,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="warehouseName != null">
|
|
|
|
+ #{warehouseName,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ </trim>
|
|
|
|
+ </insert>
|
|
|
|
+ <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.MeasureJsonData">
|
|
|
|
+ update MEASURE_JSON_DATA
|
|
|
|
+ set MEASURE_TYPE_ID = #{measureTypeId,jdbcType=DECIMAL},
|
|
|
|
+ MEASURE_JSON_DATA = #{measureJsonData,jdbcType=VARCHAR},
|
|
|
|
+ MEASURE_JSON_URL = #{measureJsonUrl,jdbcType=VARCHAR},
|
|
|
|
+ ORDER_NUMBER = #{orderNumber,jdbcType=VARCHAR},
|
|
|
|
+ WAREHOUSE_NAME = #{warehouseName,jdbcType=VARCHAR}
|
|
|
|
+ where MEASURE_ID = #{measureId,jdbcType=DECIMAL}
|
|
|
|
+ </update>
|
|
|
|
+ <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.MeasureJsonData">
|
|
|
|
+ update MEASURE_JSON_DATA
|
|
|
|
+ <set>
|
|
|
|
+ <if test="measureTypeId != null">
|
|
|
|
+ MEASURE_TYPE_ID = #{measureTypeId,jdbcType=DECIMAL},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="measureJsonData != null">
|
|
|
|
+ MEASURE_JSON_DATA = #{measureJsonData,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="measureJsonUrl != null">
|
|
|
|
+ MEASURE_JSON_URL = #{measureJsonUrl,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="orderNumber != null">
|
|
|
|
+ ORDER_NUMBER = #{orderNumber,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="warehouseName != null">
|
|
|
|
+ WAREHOUSE_NAME = #{warehouseName,jdbcType=VARCHAR},
|
|
|
|
+ </if>
|
|
|
|
+ </set>
|
|
|
|
+ where MEASURE_ID = #{measureId,jdbcType=DECIMAL}
|
|
|
|
+ </update>
|
|
|
|
+ <select id="selectByPrimaryKey" parameterType="java.lang.Short" resultMap="BaseResultMap">
|
|
|
|
+ <include refid="select"/>
|
|
|
|
+ where MEASURE_ID = #{measureId,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="whereLike"/>
|
|
|
|
+ </select>
|
|
|
|
+ <insert id="batchInsert" parameterType="java.util.List">
|
|
|
|
+ insert into MEASURE_JSON_DATA
|
|
|
|
+ (MEASURE_ID,
|
|
|
|
+ MEASURE_TYPE_ID, MEASURE_JSON_DATA,
|
|
|
|
+ MEASURE_JSON_URL, ORDER_NUMBER,
|
|
|
|
+ WAREHOUSE_NAME)
|
|
|
|
+ ( <foreach collection="list" item="item" separator="union all">
|
|
|
|
+ select
|
|
|
|
+ #{item.measureId,jdbcType=DECIMAL},
|
|
|
|
+ #{item.measureTypeId,jdbcType=DECIMAL}, #{item.measureJsonData,jdbcType=VARCHAR},
|
|
|
|
+ #{item.measureJsonUrl,jdbcType=VARCHAR}, #{item.orderNumber,jdbcType=VARCHAR},
|
|
|
|
+ #{item.warehouseName,jdbcType=VARCHAR} from dual
|
|
|
|
+ </foreach> )
|
|
|
|
+ </insert>
|
|
|
|
+ <update id="batchUpdate" parameterType="java.util.List">
|
|
|
|
+ update MEASURE_JSON_DATA
|
|
|
|
+ set
|
|
|
|
+ MEASURE_ID=
|
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case MEASURE_ID" close="end">
|
|
|
|
+ when #{item.measureId,jdbcType=DECIMAL} then #{item.measureId,jdbcType=DECIMAL}
|
|
|
|
+ </foreach>
|
|
|
|
+ ,MEASURE_TYPE_ID=
|
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case MEASURE_ID" close="end">
|
|
|
|
+ when #{item.measureId,jdbcType=DECIMAL} then #{item.measureTypeId,jdbcType=DECIMAL}
|
|
|
|
+ </foreach>
|
|
|
|
+ ,MEASURE_JSON_DATA=
|
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case MEASURE_ID" close="end">
|
|
|
|
+ when #{item.measureId,jdbcType=DECIMAL} then #{item.measureJsonData,jdbcType=VARCHAR}
|
|
|
|
+ </foreach>
|
|
|
|
+ ,MEASURE_JSON_URL=
|
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case MEASURE_ID" close="end">
|
|
|
|
+ when #{item.measureId,jdbcType=DECIMAL} then #{item.measureJsonUrl,jdbcType=VARCHAR}
|
|
|
|
+ </foreach>
|
|
|
|
+ ,ORDER_NUMBER=
|
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case MEASURE_ID" close="end">
|
|
|
|
+ when #{item.measureId,jdbcType=DECIMAL} then #{item.orderNumber,jdbcType=VARCHAR}
|
|
|
|
+ </foreach>
|
|
|
|
+ ,WAREHOUSE_NAME=
|
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case MEASURE_ID" close="end">
|
|
|
|
+ when #{item.measureId,jdbcType=DECIMAL} then #{item.warehouseName,jdbcType=VARCHAR}
|
|
|
|
+ </foreach>
|
|
|
|
+ where MEASURE_ID in
|
|
|
|
+ <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
|
|
|
|
+ #{item.measureId,jdbcType=DECIMAL}
|
|
|
|
+ </foreach>
|
|
|
|
+ </update>
|
|
|
|
+ <delete id="batchDelete" parameterType="java.util.List">
|
|
|
|
+ delete from MEASURE_JSON_DATA
|
|
|
|
+ where MEASURE_ID in
|
|
|
|
+ <foreach collection="list" item="id" open="(" close=")" separator=",">
|
|
|
|
+ #{id}
|
|
|
|
+ </foreach>
|
|
|
|
+ </delete>
|
|
|
|
+ <!-- 友情提示!!!-->
|
|
|
|
+ <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
|
|
|
|
+
|
|
|
|
+</mapper>
|