|
|
@@ -0,0 +1,342 @@
|
|
|
+<?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.baseinfo.metricpointlayout.mapper.MetricPointLayoutMapper">
|
|
|
+ <resultMap id="BaseResultMap" type="com.steerinfo.baseinfo.metricpointlayout.model.MetricPointLayout">
|
|
|
+ <id column="POINT_NO" jdbcType="VARCHAR" property="pointNo" />
|
|
|
+ <result column="POS_TOP" jdbcType="DECIMAL" property="posTop" />
|
|
|
+ <result column="POS_LEFT" jdbcType="DECIMAL" property="posLeft" />
|
|
|
+ <result column="ICON_TYPE" jdbcType="VARCHAR" property="iconType" />
|
|
|
+ <result column="ICON_OFFSET_TOP" jdbcType="VARCHAR" property="iconOffsetTop" />
|
|
|
+ <result column="ICON_OFFSET_RIGHT" jdbcType="VARCHAR" property="iconOffsetRight" />
|
|
|
+ <result column="SORT_ORDER" jdbcType="DECIMAL" property="sortOrder" />
|
|
|
+ <result column="IS_ENABLED" jdbcType="CHAR" property="isEnabled" />
|
|
|
+ <result column="CREATE_TIME" jdbcType="TIMESTAMP" property="createTime" />
|
|
|
+ <result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime" />
|
|
|
+ </resultMap>
|
|
|
+ <sql id="columns">
|
|
|
+ POINT_NO, POS_TOP, POS_LEFT, ICON_TYPE, ICON_OFFSET_TOP, ICON_OFFSET_RIGHT, SORT_ORDER,
|
|
|
+ IS_ENABLED, CREATE_TIME, UPDATE_TIME
|
|
|
+ </sql>
|
|
|
+ <sql id="columns_alias">
|
|
|
+ t.POINT_NO, t.POS_TOP, t.POS_LEFT, t.ICON_TYPE, t.ICON_OFFSET_TOP, t.ICON_OFFSET_RIGHT,
|
|
|
+ t.SORT_ORDER, t.IS_ENABLED, t.CREATE_TIME, t.UPDATE_TIME
|
|
|
+ </sql>
|
|
|
+ <sql id="select">
|
|
|
+ SELECT <include refid="columns"/> FROM METRIC_POINT_LAYOUT
|
|
|
+ </sql>
|
|
|
+ <sql id="select_alias">
|
|
|
+ SELECT <include refid="columns_alias"/> FROM METRIC_POINT_LAYOUT t
|
|
|
+ </sql>
|
|
|
+ <sql id="where">
|
|
|
+ <where>
|
|
|
+ <if test="pointNo != null and pointNo != ''">
|
|
|
+ and POINT_NO = #{pointNo}
|
|
|
+ </if>
|
|
|
+ <if test="posTop != null">
|
|
|
+ and POS_TOP = #{posTop}
|
|
|
+ </if>
|
|
|
+ <if test="posLeft != null">
|
|
|
+ and POS_LEFT = #{posLeft}
|
|
|
+ </if>
|
|
|
+ <if test="iconType != null and iconType != ''">
|
|
|
+ and ICON_TYPE = #{iconType}
|
|
|
+ </if>
|
|
|
+ <if test="iconOffsetTop != null and iconOffsetTop != ''">
|
|
|
+ and ICON_OFFSET_TOP = #{iconOffsetTop}
|
|
|
+ </if>
|
|
|
+ <if test="iconOffsetRight != null and iconOffsetRight != ''">
|
|
|
+ and ICON_OFFSET_RIGHT = #{iconOffsetRight}
|
|
|
+ </if>
|
|
|
+ <if test="sortOrder != null">
|
|
|
+ and SORT_ORDER = #{sortOrder}
|
|
|
+ </if>
|
|
|
+ <if test="isEnabled != null">
|
|
|
+ and IS_ENABLED = #{isEnabled}
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null">
|
|
|
+ and TO_CHAR(CREATE_TIME,'yyyy-MM-dd') = #{createTime}
|
|
|
+ </if>
|
|
|
+ <if test="updateTime != null">
|
|
|
+ and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </sql>
|
|
|
+ <sql id="whereLike">
|
|
|
+ <where>
|
|
|
+ <if test="pointNo != null and pointNo != ''">
|
|
|
+ and POINT_NO LIKE '%${pointNo}%'
|
|
|
+ </if>
|
|
|
+ <if test="posTop != null">
|
|
|
+ and POS_TOP = #{posTop}
|
|
|
+ </if>
|
|
|
+ <if test="posLeft != null">
|
|
|
+ and POS_LEFT = #{posLeft}
|
|
|
+ </if>
|
|
|
+ <if test="iconType != null and iconType != ''">
|
|
|
+ and ICON_TYPE LIKE '%${iconType}%'
|
|
|
+ </if>
|
|
|
+ <if test="iconOffsetTop != null and iconOffsetTop != ''">
|
|
|
+ and ICON_OFFSET_TOP LIKE '%${iconOffsetTop}%'
|
|
|
+ </if>
|
|
|
+ <if test="iconOffsetRight != null and iconOffsetRight != ''">
|
|
|
+ and ICON_OFFSET_RIGHT LIKE '%${iconOffsetRight}%'
|
|
|
+ </if>
|
|
|
+ <if test="sortOrder != null">
|
|
|
+ and SORT_ORDER = #{sortOrder}
|
|
|
+ </if>
|
|
|
+ <if test="isEnabled != null">
|
|
|
+ and IS_ENABLED = #{isEnabled}
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null">
|
|
|
+ and TO_CHAR(CREATE_TIME,'yyyy-MM-dd') = #{createTime}
|
|
|
+ </if>
|
|
|
+ <if test="updateTime != null">
|
|
|
+ and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </sql>
|
|
|
+ <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
|
|
+ delete from METRIC_POINT_LAYOUT
|
|
|
+ where POINT_NO = #{pointNo,jdbcType=VARCHAR}
|
|
|
+ </delete>
|
|
|
+ <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
|
|
|
+ delete from METRIC_POINT_LAYOUT
|
|
|
+ where 1!=1
|
|
|
+ <if test="posTop != null">
|
|
|
+ or POS_TOP = #{posTop}
|
|
|
+ </if>
|
|
|
+ <if test="posLeft != null">
|
|
|
+ or POS_LEFT = #{posLeft}
|
|
|
+ </if>
|
|
|
+ <if test="iconType != null and iconType != ''">
|
|
|
+ or ICON_TYPE = #{iconType}
|
|
|
+ </if>
|
|
|
+ <if test="iconOffsetTop != null and iconOffsetTop != ''">
|
|
|
+ or ICON_OFFSET_TOP = #{iconOffsetTop}
|
|
|
+ </if>
|
|
|
+ <if test="iconOffsetRight != null and iconOffsetRight != ''">
|
|
|
+ or ICON_OFFSET_RIGHT = #{iconOffsetRight}
|
|
|
+ </if>
|
|
|
+ <if test="sortOrder != null">
|
|
|
+ or SORT_ORDER = #{sortOrder}
|
|
|
+ </if>
|
|
|
+ <if test="isEnabled != null">
|
|
|
+ or IS_ENABLED = #{isEnabled}
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null">
|
|
|
+ or TO_CHAR(CREATE_TIME,'yyyy-MM-dd') = '#{createTime}'
|
|
|
+ </if>
|
|
|
+ <if test="updateTime != null">
|
|
|
+ or TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = '#{updateTime}'
|
|
|
+ </if>
|
|
|
+ </delete>
|
|
|
+ <insert id="insert" parameterType="com.steerinfo.baseinfo.metricpointlayout.model.MetricPointLayout">
|
|
|
+ insert into METRIC_POINT_LAYOUT (POINT_NO, POS_TOP, POS_LEFT,
|
|
|
+ ICON_TYPE, ICON_OFFSET_TOP, ICON_OFFSET_RIGHT,
|
|
|
+ SORT_ORDER, IS_ENABLED, CREATE_TIME,
|
|
|
+ UPDATE_TIME)
|
|
|
+ values (#{pointNo,jdbcType=VARCHAR}, #{posTop,jdbcType=DECIMAL}, #{posLeft,jdbcType=DECIMAL},
|
|
|
+ #{iconType,jdbcType=VARCHAR}, #{iconOffsetTop,jdbcType=VARCHAR}, #{iconOffsetRight,jdbcType=VARCHAR},
|
|
|
+ #{sortOrder,jdbcType=DECIMAL}, #{isEnabled,jdbcType=CHAR}, #{createTime,jdbcType=TIMESTAMP},
|
|
|
+ #{updateTime,jdbcType=TIMESTAMP})
|
|
|
+ </insert>
|
|
|
+ <insert id="insertSelective" parameterType="com.steerinfo.baseinfo.metricpointlayout.model.MetricPointLayout">
|
|
|
+ insert into METRIC_POINT_LAYOUT
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="pointNo != null">
|
|
|
+ POINT_NO,
|
|
|
+ </if>
|
|
|
+ <if test="posTop != null">
|
|
|
+ POS_TOP,
|
|
|
+ </if>
|
|
|
+ <if test="posLeft != null">
|
|
|
+ POS_LEFT,
|
|
|
+ </if>
|
|
|
+ <if test="iconType != null">
|
|
|
+ ICON_TYPE,
|
|
|
+ </if>
|
|
|
+ <if test="iconOffsetTop != null">
|
|
|
+ ICON_OFFSET_TOP,
|
|
|
+ </if>
|
|
|
+ <if test="iconOffsetRight != null">
|
|
|
+ ICON_OFFSET_RIGHT,
|
|
|
+ </if>
|
|
|
+ <if test="sortOrder != null">
|
|
|
+ SORT_ORDER,
|
|
|
+ </if>
|
|
|
+ <if test="isEnabled != null">
|
|
|
+ IS_ENABLED,
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null">
|
|
|
+ CREATE_TIME,
|
|
|
+ </if>
|
|
|
+ <if test="updateTime != null">
|
|
|
+ UPDATE_TIME,
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="pointNo != null">
|
|
|
+ #{pointNo,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="posTop != null">
|
|
|
+ #{posTop,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="posLeft != null">
|
|
|
+ #{posLeft,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="iconType != null">
|
|
|
+ #{iconType,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="iconOffsetTop != null">
|
|
|
+ #{iconOffsetTop,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="iconOffsetRight != null">
|
|
|
+ #{iconOffsetRight,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="sortOrder != null">
|
|
|
+ #{sortOrder,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="isEnabled != null">
|
|
|
+ #{isEnabled,jdbcType=CHAR},
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null">
|
|
|
+ #{createTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="updateTime != null">
|
|
|
+ #{updateTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+ <update id="updateByPrimaryKey" parameterType="com.steerinfo.baseinfo.metricpointlayout.model.MetricPointLayout">
|
|
|
+ update METRIC_POINT_LAYOUT
|
|
|
+ set POS_TOP = #{posTop,jdbcType=DECIMAL},
|
|
|
+ POS_LEFT = #{posLeft,jdbcType=DECIMAL},
|
|
|
+ ICON_TYPE = #{iconType,jdbcType=VARCHAR},
|
|
|
+ ICON_OFFSET_TOP = #{iconOffsetTop,jdbcType=VARCHAR},
|
|
|
+ ICON_OFFSET_RIGHT = #{iconOffsetRight,jdbcType=VARCHAR},
|
|
|
+ SORT_ORDER = #{sortOrder,jdbcType=DECIMAL},
|
|
|
+ IS_ENABLED = #{isEnabled,jdbcType=CHAR},
|
|
|
+ CREATE_TIME = #{createTime,jdbcType=TIMESTAMP},
|
|
|
+ UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP}
|
|
|
+ where POINT_NO = #{pointNo,jdbcType=VARCHAR}
|
|
|
+ </update>
|
|
|
+ <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.baseinfo.metricpointlayout.model.MetricPointLayout">
|
|
|
+ update METRIC_POINT_LAYOUT
|
|
|
+ <set>
|
|
|
+ <if test="posTop != null">
|
|
|
+ POS_TOP = #{posTop,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="posLeft != null">
|
|
|
+ POS_LEFT = #{posLeft,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="iconType != null">
|
|
|
+ ICON_TYPE = #{iconType,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="iconOffsetTop != null">
|
|
|
+ ICON_OFFSET_TOP = #{iconOffsetTop,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="iconOffsetRight != null">
|
|
|
+ ICON_OFFSET_RIGHT = #{iconOffsetRight,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="sortOrder != null">
|
|
|
+ SORT_ORDER = #{sortOrder,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="isEnabled != null">
|
|
|
+ IS_ENABLED = #{isEnabled,jdbcType=CHAR},
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null">
|
|
|
+ CREATE_TIME = #{createTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="updateTime != null">
|
|
|
+ UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ </set>
|
|
|
+ where POINT_NO = #{pointNo,jdbcType=VARCHAR}
|
|
|
+ </update>
|
|
|
+ <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
|
|
|
+ <include refid="select"/>
|
|
|
+ where POINT_NO = #{pointNo,jdbcType=VARCHAR}
|
|
|
+ </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 METRIC_POINT_LAYOUT
|
|
|
+ (POINT_NO,
|
|
|
+ POS_TOP, POS_LEFT, ICON_TYPE,
|
|
|
+ ICON_OFFSET_TOP, ICON_OFFSET_RIGHT,
|
|
|
+ SORT_ORDER, IS_ENABLED, CREATE_TIME,
|
|
|
+ UPDATE_TIME)
|
|
|
+ ( <foreach collection="list" item="item" separator="union all">
|
|
|
+ select
|
|
|
+ #{item.pointNo,jdbcType=VARCHAR},
|
|
|
+ #{item.posTop,jdbcType=DECIMAL}, #{item.posLeft,jdbcType=DECIMAL}, #{item.iconType,jdbcType=VARCHAR},
|
|
|
+ #{item.iconOffsetTop,jdbcType=VARCHAR}, #{item.iconOffsetRight,jdbcType=VARCHAR},
|
|
|
+ #{item.sortOrder,jdbcType=DECIMAL}, #{item.isEnabled,jdbcType=CHAR}, #{item.createTime,jdbcType=TIMESTAMP},
|
|
|
+ #{item.updateTime,jdbcType=TIMESTAMP} from dual
|
|
|
+ </foreach> )
|
|
|
+ </insert>
|
|
|
+ <update id="batchUpdate" parameterType="java.util.List">
|
|
|
+ update METRIC_POINT_LAYOUT
|
|
|
+ set
|
|
|
+ POINT_NO=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case POINT_NO" close="end">
|
|
|
+ when #{item.pointNo,jdbcType=VARCHAR} then #{item.pointNo,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,POS_TOP=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case POINT_NO" close="end">
|
|
|
+ when #{item.pointNo,jdbcType=VARCHAR} then #{item.posTop,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,POS_LEFT=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case POINT_NO" close="end">
|
|
|
+ when #{item.pointNo,jdbcType=VARCHAR} then #{item.posLeft,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,ICON_TYPE=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case POINT_NO" close="end">
|
|
|
+ when #{item.pointNo,jdbcType=VARCHAR} then #{item.iconType,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,ICON_OFFSET_TOP=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case POINT_NO" close="end">
|
|
|
+ when #{item.pointNo,jdbcType=VARCHAR} then #{item.iconOffsetTop,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,ICON_OFFSET_RIGHT=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case POINT_NO" close="end">
|
|
|
+ when #{item.pointNo,jdbcType=VARCHAR} then #{item.iconOffsetRight,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ ,SORT_ORDER=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case POINT_NO" close="end">
|
|
|
+ when #{item.pointNo,jdbcType=VARCHAR} then #{item.sortOrder,jdbcType=DECIMAL}
|
|
|
+ </foreach>
|
|
|
+ ,IS_ENABLED=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case POINT_NO" close="end">
|
|
|
+ when #{item.pointNo,jdbcType=VARCHAR} then #{item.isEnabled,jdbcType=CHAR}
|
|
|
+ </foreach>
|
|
|
+ ,CREATE_TIME=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case POINT_NO" close="end">
|
|
|
+ when #{item.pointNo,jdbcType=VARCHAR} then #{item.createTime,jdbcType=TIMESTAMP}
|
|
|
+ </foreach>
|
|
|
+ ,UPDATE_TIME=
|
|
|
+ <foreach collection="list" item="item" index="index" separator=" " open="case POINT_NO" close="end">
|
|
|
+ when #{item.pointNo,jdbcType=VARCHAR} then #{item.updateTime,jdbcType=TIMESTAMP}
|
|
|
+ </foreach>
|
|
|
+ where POINT_NO in
|
|
|
+ <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
|
|
|
+ #{item.pointNo,jdbcType=VARCHAR}
|
|
|
+ </foreach>
|
|
|
+ </update>
|
|
|
+ <delete id="batchDelete" parameterType="java.util.List">
|
|
|
+ delete from METRIC_POINT_LAYOUT
|
|
|
+ where POINT_NO in
|
|
|
+ <foreach collection="list" item="id" open="(" close=")" separator=",">
|
|
|
+ #{id}
|
|
|
+ </foreach>
|
|
|
+ </delete>
|
|
|
+ <!-- 友情提示!!!-->
|
|
|
+ <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
|
|
|
+
|
|
|
+</mapper>
|