You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
367 lines
14 KiB
367 lines
14 KiB
|
3 months ago
|
<?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.dongjian.dashboard.back.dao.auto.DashboardRealtimeMeasureMapper">
|
||
|
|
<resultMap id="BaseResultMap" type="com.dongjian.dashboard.back.model.DashboardRealtimeMeasure">
|
||
|
|
<!--
|
||
|
|
WARNING - @mbg.generated
|
||
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
||
|
|
-->
|
||
|
|
<id column="device_id" jdbcType="VARCHAR" property="deviceId" />
|
||
|
|
<result column="date_year" jdbcType="INTEGER" property="dateYear" />
|
||
|
|
<result column="date_month" jdbcType="INTEGER" property="dateMonth" />
|
||
|
|
<result column="date_day" jdbcType="INTEGER" property="dateDay" />
|
||
|
|
<result column="date_hour" jdbcType="INTEGER" property="dateHour" />
|
||
|
|
<result column="date_minute" jdbcType="INTEGER" property="dateMinute" />
|
||
|
|
<result column="date_second" jdbcType="INTEGER" property="dateSecond" />
|
||
|
|
<result column="upload_value" jdbcType="VARCHAR" property="uploadValue" />
|
||
|
|
<result column="min_value" jdbcType="VARCHAR" property="minValue" />
|
||
|
|
<result column="max_value" jdbcType="VARCHAR" property="maxValue" />
|
||
|
|
<result column="upload_at" jdbcType="BIGINT" property="uploadAt" />
|
||
|
|
</resultMap>
|
||
|
|
<sql id="Example_Where_Clause">
|
||
|
|
<!--
|
||
|
|
WARNING - @mbg.generated
|
||
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
||
|
|
-->
|
||
|
|
<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">
|
||
|
|
<!--
|
||
|
|
WARNING - @mbg.generated
|
||
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
||
|
|
-->
|
||
|
|
<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">
|
||
|
|
<!--
|
||
|
|
WARNING - @mbg.generated
|
||
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
||
|
|
-->
|
||
|
|
device_id, date_year, date_month, date_day, date_hour, date_minute, date_second,
|
||
|
|
upload_value, min_value, max_value, upload_at
|
||
|
|
</sql>
|
||
|
|
<select id="selectByExample" parameterType="com.dongjian.dashboard.back.model.DashboardRealtimeMeasureExample" resultMap="BaseResultMap">
|
||
|
|
<!--
|
||
|
|
WARNING - @mbg.generated
|
||
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
||
|
|
-->
|
||
|
|
select
|
||
|
|
<if test="distinct">
|
||
|
|
distinct
|
||
|
|
</if>
|
||
|
|
'true' as QUERYID,
|
||
|
|
<include refid="Base_Column_List" />
|
||
|
|
from dashboard_realtime_measure
|
||
|
|
<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">
|
||
|
|
<!--
|
||
|
|
WARNING - @mbg.generated
|
||
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
||
|
|
-->
|
||
|
|
select
|
||
|
|
<include refid="Base_Column_List" />
|
||
|
|
from dashboard_realtime_measure
|
||
|
|
where device_id = #{deviceId,jdbcType=VARCHAR}
|
||
|
|
</select>
|
||
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
||
|
|
<!--
|
||
|
|
WARNING - @mbg.generated
|
||
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
||
|
|
-->
|
||
|
|
delete from dashboard_realtime_measure
|
||
|
|
where device_id = #{deviceId,jdbcType=VARCHAR}
|
||
|
|
</delete>
|
||
|
|
<delete id="deleteByExample" parameterType="com.dongjian.dashboard.back.model.DashboardRealtimeMeasureExample">
|
||
|
|
<!--
|
||
|
|
WARNING - @mbg.generated
|
||
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
||
|
|
-->
|
||
|
|
delete from dashboard_realtime_measure
|
||
|
|
<if test="_parameter != null">
|
||
|
|
<include refid="Example_Where_Clause" />
|
||
|
|
</if>
|
||
|
|
</delete>
|
||
|
|
<insert id="insert" parameterType="com.dongjian.dashboard.back.model.DashboardRealtimeMeasure">
|
||
|
|
<!--
|
||
|
|
WARNING - @mbg.generated
|
||
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
||
|
|
-->
|
||
|
|
insert into dashboard_realtime_measure (device_id, date_year, date_month,
|
||
|
|
date_day, date_hour, date_minute,
|
||
|
|
date_second, upload_value, min_value,
|
||
|
|
max_value, upload_at)
|
||
|
|
values (#{deviceId,jdbcType=VARCHAR}, #{dateYear,jdbcType=INTEGER}, #{dateMonth,jdbcType=INTEGER},
|
||
|
|
#{dateDay,jdbcType=INTEGER}, #{dateHour,jdbcType=INTEGER}, #{dateMinute,jdbcType=INTEGER},
|
||
|
|
#{dateSecond,jdbcType=INTEGER}, #{uploadValue,jdbcType=VARCHAR}, #{minValue,jdbcType=VARCHAR},
|
||
|
|
#{maxValue,jdbcType=VARCHAR}, #{uploadAt,jdbcType=BIGINT})
|
||
|
|
</insert>
|
||
|
|
<insert id="insertSelective" parameterType="com.dongjian.dashboard.back.model.DashboardRealtimeMeasure">
|
||
|
|
<!--
|
||
|
|
WARNING - @mbg.generated
|
||
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
||
|
|
-->
|
||
|
|
insert into dashboard_realtime_measure
|
||
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||
|
|
<if test="deviceId != null">
|
||
|
|
device_id,
|
||
|
|
</if>
|
||
|
|
<if test="dateYear != null">
|
||
|
|
date_year,
|
||
|
|
</if>
|
||
|
|
<if test="dateMonth != null">
|
||
|
|
date_month,
|
||
|
|
</if>
|
||
|
|
<if test="dateDay != null">
|
||
|
|
date_day,
|
||
|
|
</if>
|
||
|
|
<if test="dateHour != null">
|
||
|
|
date_hour,
|
||
|
|
</if>
|
||
|
|
<if test="dateMinute != null">
|
||
|
|
date_minute,
|
||
|
|
</if>
|
||
|
|
<if test="dateSecond != null">
|
||
|
|
date_second,
|
||
|
|
</if>
|
||
|
|
<if test="uploadValue != null">
|
||
|
|
upload_value,
|
||
|
|
</if>
|
||
|
|
<if test="minValue != null">
|
||
|
|
min_value,
|
||
|
|
</if>
|
||
|
|
<if test="maxValue != null">
|
||
|
|
max_value,
|
||
|
|
</if>
|
||
|
|
<if test="uploadAt != null">
|
||
|
|
upload_at,
|
||
|
|
</if>
|
||
|
|
</trim>
|
||
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||
|
|
<if test="deviceId != null">
|
||
|
|
#{deviceId,jdbcType=VARCHAR},
|
||
|
|
</if>
|
||
|
|
<if test="dateYear != null">
|
||
|
|
#{dateYear,jdbcType=INTEGER},
|
||
|
|
</if>
|
||
|
|
<if test="dateMonth != null">
|
||
|
|
#{dateMonth,jdbcType=INTEGER},
|
||
|
|
</if>
|
||
|
|
<if test="dateDay != null">
|
||
|
|
#{dateDay,jdbcType=INTEGER},
|
||
|
|
</if>
|
||
|
|
<if test="dateHour != null">
|
||
|
|
#{dateHour,jdbcType=INTEGER},
|
||
|
|
</if>
|
||
|
|
<if test="dateMinute != null">
|
||
|
|
#{dateMinute,jdbcType=INTEGER},
|
||
|
|
</if>
|
||
|
|
<if test="dateSecond != null">
|
||
|
|
#{dateSecond,jdbcType=INTEGER},
|
||
|
|
</if>
|
||
|
|
<if test="uploadValue != null">
|
||
|
|
#{uploadValue,jdbcType=VARCHAR},
|
||
|
|
</if>
|
||
|
|
<if test="minValue != null">
|
||
|
|
#{minValue,jdbcType=VARCHAR},
|
||
|
|
</if>
|
||
|
|
<if test="maxValue != null">
|
||
|
|
#{maxValue,jdbcType=VARCHAR},
|
||
|
|
</if>
|
||
|
|
<if test="uploadAt != null">
|
||
|
|
#{uploadAt,jdbcType=BIGINT},
|
||
|
|
</if>
|
||
|
|
</trim>
|
||
|
|
</insert>
|
||
|
|
<select id="countByExample" parameterType="com.dongjian.dashboard.back.model.DashboardRealtimeMeasureExample" resultType="java.lang.Long">
|
||
|
|
<!--
|
||
|
|
WARNING - @mbg.generated
|
||
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
||
|
|
-->
|
||
|
|
select count(*) from dashboard_realtime_measure
|
||
|
|
<if test="_parameter != null">
|
||
|
|
<include refid="Example_Where_Clause" />
|
||
|
|
</if>
|
||
|
|
</select>
|
||
|
|
<update id="updateByExampleSelective" parameterType="map">
|
||
|
|
<!--
|
||
|
|
WARNING - @mbg.generated
|
||
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
||
|
|
-->
|
||
|
|
update dashboard_realtime_measure
|
||
|
|
<set>
|
||
|
|
<if test="record.deviceId != null">
|
||
|
|
device_id = #{record.deviceId,jdbcType=VARCHAR},
|
||
|
|
</if>
|
||
|
|
<if test="record.dateYear != null">
|
||
|
|
date_year = #{record.dateYear,jdbcType=INTEGER},
|
||
|
|
</if>
|
||
|
|
<if test="record.dateMonth != null">
|
||
|
|
date_month = #{record.dateMonth,jdbcType=INTEGER},
|
||
|
|
</if>
|
||
|
|
<if test="record.dateDay != null">
|
||
|
|
date_day = #{record.dateDay,jdbcType=INTEGER},
|
||
|
|
</if>
|
||
|
|
<if test="record.dateHour != null">
|
||
|
|
date_hour = #{record.dateHour,jdbcType=INTEGER},
|
||
|
|
</if>
|
||
|
|
<if test="record.dateMinute != null">
|
||
|
|
date_minute = #{record.dateMinute,jdbcType=INTEGER},
|
||
|
|
</if>
|
||
|
|
<if test="record.dateSecond != null">
|
||
|
|
date_second = #{record.dateSecond,jdbcType=INTEGER},
|
||
|
|
</if>
|
||
|
|
<if test="record.uploadValue != null">
|
||
|
|
upload_value = #{record.uploadValue,jdbcType=VARCHAR},
|
||
|
|
</if>
|
||
|
|
<if test="record.minValue != null">
|
||
|
|
min_value = #{record.minValue,jdbcType=VARCHAR},
|
||
|
|
</if>
|
||
|
|
<if test="record.maxValue != null">
|
||
|
|
max_value = #{record.maxValue,jdbcType=VARCHAR},
|
||
|
|
</if>
|
||
|
|
<if test="record.uploadAt != null">
|
||
|
|
upload_at = #{record.uploadAt,jdbcType=BIGINT},
|
||
|
|
</if>
|
||
|
|
</set>
|
||
|
|
<if test="_parameter != null">
|
||
|
|
<include refid="Update_By_Example_Where_Clause" />
|
||
|
|
</if>
|
||
|
|
</update>
|
||
|
|
<update id="updateByExample" parameterType="map">
|
||
|
|
<!--
|
||
|
|
WARNING - @mbg.generated
|
||
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
||
|
|
-->
|
||
|
|
update dashboard_realtime_measure
|
||
|
|
set device_id = #{record.deviceId,jdbcType=VARCHAR},
|
||
|
|
date_year = #{record.dateYear,jdbcType=INTEGER},
|
||
|
|
date_month = #{record.dateMonth,jdbcType=INTEGER},
|
||
|
|
date_day = #{record.dateDay,jdbcType=INTEGER},
|
||
|
|
date_hour = #{record.dateHour,jdbcType=INTEGER},
|
||
|
|
date_minute = #{record.dateMinute,jdbcType=INTEGER},
|
||
|
|
date_second = #{record.dateSecond,jdbcType=INTEGER},
|
||
|
|
upload_value = #{record.uploadValue,jdbcType=VARCHAR},
|
||
|
|
min_value = #{record.minValue,jdbcType=VARCHAR},
|
||
|
|
max_value = #{record.maxValue,jdbcType=VARCHAR},
|
||
|
|
upload_at = #{record.uploadAt,jdbcType=BIGINT}
|
||
|
|
<if test="_parameter != null">
|
||
|
|
<include refid="Update_By_Example_Where_Clause" />
|
||
|
|
</if>
|
||
|
|
</update>
|
||
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.dongjian.dashboard.back.model.DashboardRealtimeMeasure">
|
||
|
|
<!--
|
||
|
|
WARNING - @mbg.generated
|
||
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
||
|
|
-->
|
||
|
|
update dashboard_realtime_measure
|
||
|
|
<set>
|
||
|
|
<if test="dateYear != null">
|
||
|
|
date_year = #{dateYear,jdbcType=INTEGER},
|
||
|
|
</if>
|
||
|
|
<if test="dateMonth != null">
|
||
|
|
date_month = #{dateMonth,jdbcType=INTEGER},
|
||
|
|
</if>
|
||
|
|
<if test="dateDay != null">
|
||
|
|
date_day = #{dateDay,jdbcType=INTEGER},
|
||
|
|
</if>
|
||
|
|
<if test="dateHour != null">
|
||
|
|
date_hour = #{dateHour,jdbcType=INTEGER},
|
||
|
|
</if>
|
||
|
|
<if test="dateMinute != null">
|
||
|
|
date_minute = #{dateMinute,jdbcType=INTEGER},
|
||
|
|
</if>
|
||
|
|
<if test="dateSecond != null">
|
||
|
|
date_second = #{dateSecond,jdbcType=INTEGER},
|
||
|
|
</if>
|
||
|
|
<if test="uploadValue != null">
|
||
|
|
upload_value = #{uploadValue,jdbcType=VARCHAR},
|
||
|
|
</if>
|
||
|
|
<if test="minValue != null">
|
||
|
|
min_value = #{minValue,jdbcType=VARCHAR},
|
||
|
|
</if>
|
||
|
|
<if test="maxValue != null">
|
||
|
|
max_value = #{maxValue,jdbcType=VARCHAR},
|
||
|
|
</if>
|
||
|
|
<if test="uploadAt != null">
|
||
|
|
upload_at = #{uploadAt,jdbcType=BIGINT},
|
||
|
|
</if>
|
||
|
|
</set>
|
||
|
|
where device_id = #{deviceId,jdbcType=VARCHAR}
|
||
|
|
</update>
|
||
|
|
<update id="updateByPrimaryKey" parameterType="com.dongjian.dashboard.back.model.DashboardRealtimeMeasure">
|
||
|
|
<!--
|
||
|
|
WARNING - @mbg.generated
|
||
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
||
|
|
-->
|
||
|
|
update dashboard_realtime_measure
|
||
|
|
set date_year = #{dateYear,jdbcType=INTEGER},
|
||
|
|
date_month = #{dateMonth,jdbcType=INTEGER},
|
||
|
|
date_day = #{dateDay,jdbcType=INTEGER},
|
||
|
|
date_hour = #{dateHour,jdbcType=INTEGER},
|
||
|
|
date_minute = #{dateMinute,jdbcType=INTEGER},
|
||
|
|
date_second = #{dateSecond,jdbcType=INTEGER},
|
||
|
|
upload_value = #{uploadValue,jdbcType=VARCHAR},
|
||
|
|
min_value = #{minValue,jdbcType=VARCHAR},
|
||
|
|
max_value = #{maxValue,jdbcType=VARCHAR},
|
||
|
|
upload_at = #{uploadAt,jdbcType=BIGINT}
|
||
|
|
where device_id = #{deviceId,jdbcType=VARCHAR}
|
||
|
|
</update>
|
||
|
|
</mapper>
|