|
@@ -0,0 +1,368 @@
|
|
|
+<?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.mvc.dao.TStationStructureMapper">
|
|
|
+ <resultMap id="BaseResultMap" type="com.mvc.entity.TStationStructure">
|
|
|
+ <!--
|
|
|
+ description guozhao 2025-08-07 10:15:50
|
|
|
+ -->
|
|
|
+ <id column="ID" jdbcType="INTEGER" property="id" />
|
|
|
+ <result column="STATION_CODE" jdbcType="VARCHAR" property="stationCode" />
|
|
|
+ <result column="PARENT_CODE" jdbcType="VARCHAR" property="parentCode" />
|
|
|
+ <result column="WATER_METER_LEVEL" jdbcType="INTEGER" property="waterMeterLevel" />
|
|
|
+ <result column="WATER_TYPE" jdbcType="INTEGER" property="waterType" />
|
|
|
+ <result column="UNIT_CODE" jdbcType="VARCHAR" property="unitCode" />
|
|
|
+ <result column="NODE_KEY" jdbcType="VARCHAR" property="nodeKey" />
|
|
|
+ <result column="PARENT_KEY" jdbcType="VARCHAR" property="parentKey" />
|
|
|
+ <result column="NODE_LABEL" jdbcType="VARCHAR" property="nodeLabel" />
|
|
|
+ <result column="NODE_TYPE" jdbcType="TINYINT" property="nodeType" />
|
|
|
+ <result column="NODE_ORDER" jdbcType="TINYINT" property="nodeOrder" />
|
|
|
+ </resultMap>
|
|
|
+ <sql id="Example_Where_Clause">
|
|
|
+ <!--
|
|
|
+ description guozhao 2025-08-07 10:15:50
|
|
|
+ -->
|
|
|
+ <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">
|
|
|
+ <!--
|
|
|
+ description guozhao 2025-08-07 10:15:50
|
|
|
+ -->
|
|
|
+ <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">
|
|
|
+ <!--
|
|
|
+ description guozhao 2025-08-07 10:15:50
|
|
|
+ -->
|
|
|
+ ID, STATION_CODE, PARENT_CODE, WATER_METER_LEVEL, WATER_TYPE, UNIT_CODE, NODE_KEY,
|
|
|
+ PARENT_KEY, NODE_LABEL, NODE_TYPE, NODE_ORDER
|
|
|
+ </sql>
|
|
|
+ <select id="selectByExample" parameterType="com.mvc.entity.TStationStructureExample" resultMap="BaseResultMap">
|
|
|
+ <!--
|
|
|
+ description guozhao 2025-08-07 10:15:50
|
|
|
+ -->
|
|
|
+ select
|
|
|
+ <if test="distinct">
|
|
|
+ distinct
|
|
|
+ </if>
|
|
|
+ <include refid="Base_Column_List" />
|
|
|
+ from t_station_structure
|
|
|
+ <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.Integer" resultMap="BaseResultMap">
|
|
|
+ <!--
|
|
|
+ description guozhao 2025-08-07 10:15:50
|
|
|
+ -->
|
|
|
+ select
|
|
|
+ <include refid="Base_Column_List" />
|
|
|
+ from t_station_structure
|
|
|
+ where ID = #{id,jdbcType=INTEGER}
|
|
|
+ </select>
|
|
|
+ <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
|
|
+ <!--
|
|
|
+ description guozhao 2025-08-07 10:15:50
|
|
|
+ -->
|
|
|
+ delete from t_station_structure
|
|
|
+ where ID = #{id,jdbcType=INTEGER}
|
|
|
+ </delete>
|
|
|
+ <delete id="deleteByExample" parameterType="com.mvc.entity.TStationStructureExample">
|
|
|
+ <!--
|
|
|
+ description guozhao 2025-08-07 10:15:50
|
|
|
+ -->
|
|
|
+ delete from t_station_structure
|
|
|
+ <if test="_parameter != null">
|
|
|
+ <include refid="Example_Where_Clause" />
|
|
|
+ </if>
|
|
|
+ </delete>
|
|
|
+ <insert id="insert" parameterType="com.mvc.entity.TStationStructure">
|
|
|
+ <!--
|
|
|
+ description guozhao 2025-08-07 10:15:50
|
|
|
+ -->
|
|
|
+ insert into t_station_structure (ID, STATION_CODE, PARENT_CODE,
|
|
|
+ WATER_METER_LEVEL, WATER_TYPE, UNIT_CODE,
|
|
|
+ NODE_KEY, PARENT_KEY, NODE_LABEL,
|
|
|
+ NODE_TYPE, NODE_ORDER)
|
|
|
+ values (#{id,jdbcType=INTEGER}, #{stationCode,jdbcType=VARCHAR}, #{parentCode,jdbcType=VARCHAR},
|
|
|
+ #{waterMeterLevel,jdbcType=INTEGER}, #{waterType,jdbcType=INTEGER}, #{unitCode,jdbcType=VARCHAR},
|
|
|
+ #{nodeKey,jdbcType=VARCHAR}, #{parentKey,jdbcType=VARCHAR}, #{nodeLabel,jdbcType=VARCHAR},
|
|
|
+ #{nodeType,jdbcType=TINYINT}, #{nodeOrder,jdbcType=TINYINT})
|
|
|
+ </insert>
|
|
|
+ <insert id="insertSelective" parameterType="com.mvc.entity.TStationStructure">
|
|
|
+ <!--
|
|
|
+ description guozhao 2025-08-07 10:15:50
|
|
|
+ -->
|
|
|
+ insert into t_station_structure
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="id != null">
|
|
|
+ ID,
|
|
|
+ </if>
|
|
|
+ <if test="stationCode != null">
|
|
|
+ STATION_CODE,
|
|
|
+ </if>
|
|
|
+ <if test="parentCode != null">
|
|
|
+ PARENT_CODE,
|
|
|
+ </if>
|
|
|
+ <if test="waterMeterLevel != null">
|
|
|
+ WATER_METER_LEVEL,
|
|
|
+ </if>
|
|
|
+ <if test="waterType != null">
|
|
|
+ WATER_TYPE,
|
|
|
+ </if>
|
|
|
+ <if test="unitCode != null">
|
|
|
+ UNIT_CODE,
|
|
|
+ </if>
|
|
|
+ <if test="nodeKey != null">
|
|
|
+ NODE_KEY,
|
|
|
+ </if>
|
|
|
+ <if test="parentKey != null">
|
|
|
+ PARENT_KEY,
|
|
|
+ </if>
|
|
|
+ <if test="nodeLabel != null">
|
|
|
+ NODE_LABEL,
|
|
|
+ </if>
|
|
|
+ <if test="nodeType != null">
|
|
|
+ NODE_TYPE,
|
|
|
+ </if>
|
|
|
+ <if test="nodeOrder != null">
|
|
|
+ NODE_ORDER,
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="id != null">
|
|
|
+ #{id,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="stationCode != null">
|
|
|
+ #{stationCode,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="parentCode != null">
|
|
|
+ #{parentCode,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="waterMeterLevel != null">
|
|
|
+ #{waterMeterLevel,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="waterType != null">
|
|
|
+ #{waterType,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="unitCode != null">
|
|
|
+ #{unitCode,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="nodeKey != null">
|
|
|
+ #{nodeKey,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="parentKey != null">
|
|
|
+ #{parentKey,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="nodeLabel != null">
|
|
|
+ #{nodeLabel,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="nodeType != null">
|
|
|
+ #{nodeType,jdbcType=TINYINT},
|
|
|
+ </if>
|
|
|
+ <if test="nodeOrder != null">
|
|
|
+ #{nodeOrder,jdbcType=TINYINT},
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+ <select id="countByExample" parameterType="com.mvc.entity.TStationStructureExample" resultType="java.lang.Long">
|
|
|
+ <!--
|
|
|
+ description guozhao 2025-08-07 10:15:50
|
|
|
+ -->
|
|
|
+ select count(*) from t_station_structure
|
|
|
+ <if test="_parameter != null">
|
|
|
+ <include refid="Example_Where_Clause" />
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+ <update id="updateByExampleSelective" parameterType="map">
|
|
|
+ <!--
|
|
|
+ description guozhao 2025-08-07 10:15:50
|
|
|
+ -->
|
|
|
+ update t_station_structure
|
|
|
+ <set>
|
|
|
+ <if test="record.id != null">
|
|
|
+ ID = #{record.id,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="record.stationCode != null">
|
|
|
+ STATION_CODE = #{record.stationCode,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="record.parentCode != null">
|
|
|
+ PARENT_CODE = #{record.parentCode,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="record.waterMeterLevel != null">
|
|
|
+ WATER_METER_LEVEL = #{record.waterMeterLevel,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="record.waterType != null">
|
|
|
+ WATER_TYPE = #{record.waterType,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="record.unitCode != null">
|
|
|
+ UNIT_CODE = #{record.unitCode,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="record.nodeKey != null">
|
|
|
+ NODE_KEY = #{record.nodeKey,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="record.parentKey != null">
|
|
|
+ PARENT_KEY = #{record.parentKey,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="record.nodeLabel != null">
|
|
|
+ NODE_LABEL = #{record.nodeLabel,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="record.nodeType != null">
|
|
|
+ NODE_TYPE = #{record.nodeType,jdbcType=TINYINT},
|
|
|
+ </if>
|
|
|
+ <if test="record.nodeOrder != null">
|
|
|
+ NODE_ORDER = #{record.nodeOrder,jdbcType=TINYINT},
|
|
|
+ </if>
|
|
|
+ </set>
|
|
|
+ <if test="_parameter != null">
|
|
|
+ <include refid="Update_By_Example_Where_Clause" />
|
|
|
+ </if>
|
|
|
+ </update>
|
|
|
+ <update id="updateByExample" parameterType="map">
|
|
|
+ <!--
|
|
|
+ description guozhao 2025-08-07 10:15:50
|
|
|
+ -->
|
|
|
+ update t_station_structure
|
|
|
+ set ID = #{record.id,jdbcType=INTEGER},
|
|
|
+ STATION_CODE = #{record.stationCode,jdbcType=VARCHAR},
|
|
|
+ PARENT_CODE = #{record.parentCode,jdbcType=VARCHAR},
|
|
|
+ WATER_METER_LEVEL = #{record.waterMeterLevel,jdbcType=INTEGER},
|
|
|
+ WATER_TYPE = #{record.waterType,jdbcType=INTEGER},
|
|
|
+ UNIT_CODE = #{record.unitCode,jdbcType=VARCHAR},
|
|
|
+ NODE_KEY = #{record.nodeKey,jdbcType=VARCHAR},
|
|
|
+ PARENT_KEY = #{record.parentKey,jdbcType=VARCHAR},
|
|
|
+ NODE_LABEL = #{record.nodeLabel,jdbcType=VARCHAR},
|
|
|
+ NODE_TYPE = #{record.nodeType,jdbcType=TINYINT},
|
|
|
+ NODE_ORDER = #{record.nodeOrder,jdbcType=TINYINT}
|
|
|
+ <if test="_parameter != null">
|
|
|
+ <include refid="Update_By_Example_Where_Clause" />
|
|
|
+ </if>
|
|
|
+ </update>
|
|
|
+ <update id="updateByPrimaryKeySelective" parameterType="com.mvc.entity.TStationStructure">
|
|
|
+ <!--
|
|
|
+ description guozhao 2025-08-07 10:15:50
|
|
|
+ -->
|
|
|
+ update t_station_structure
|
|
|
+ <set>
|
|
|
+ <if test="stationCode != null">
|
|
|
+ STATION_CODE = #{stationCode,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="parentCode != null">
|
|
|
+ PARENT_CODE = #{parentCode,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="waterMeterLevel != null">
|
|
|
+ WATER_METER_LEVEL = #{waterMeterLevel,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="waterType != null">
|
|
|
+ WATER_TYPE = #{waterType,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="unitCode != null">
|
|
|
+ UNIT_CODE = #{unitCode,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="nodeKey != null">
|
|
|
+ NODE_KEY = #{nodeKey,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="parentKey != null">
|
|
|
+ PARENT_KEY = #{parentKey,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="nodeLabel != null">
|
|
|
+ NODE_LABEL = #{nodeLabel,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="nodeType != null">
|
|
|
+ NODE_TYPE = #{nodeType,jdbcType=TINYINT},
|
|
|
+ </if>
|
|
|
+ <if test="nodeOrder != null">
|
|
|
+ NODE_ORDER = #{nodeOrder,jdbcType=TINYINT},
|
|
|
+ </if>
|
|
|
+ </set>
|
|
|
+ where ID = #{id,jdbcType=INTEGER}
|
|
|
+ </update>
|
|
|
+ <update id="updateByPrimaryKey" parameterType="com.mvc.entity.TStationStructure">
|
|
|
+ <!--
|
|
|
+ description guozhao 2025-08-07 10:15:50
|
|
|
+ -->
|
|
|
+ update t_station_structure
|
|
|
+ set STATION_CODE = #{stationCode,jdbcType=VARCHAR},
|
|
|
+ PARENT_CODE = #{parentCode,jdbcType=VARCHAR},
|
|
|
+ WATER_METER_LEVEL = #{waterMeterLevel,jdbcType=INTEGER},
|
|
|
+ WATER_TYPE = #{waterType,jdbcType=INTEGER},
|
|
|
+ UNIT_CODE = #{unitCode,jdbcType=VARCHAR},
|
|
|
+ NODE_KEY = #{nodeKey,jdbcType=VARCHAR},
|
|
|
+ PARENT_KEY = #{parentKey,jdbcType=VARCHAR},
|
|
|
+ NODE_LABEL = #{nodeLabel,jdbcType=VARCHAR},
|
|
|
+ NODE_TYPE = #{nodeType,jdbcType=TINYINT},
|
|
|
+ NODE_ORDER = #{nodeOrder,jdbcType=TINYINT}
|
|
|
+ where ID = #{id,jdbcType=INTEGER}
|
|
|
+ </update>
|
|
|
+ <select id="selectByExampleWithRowbounds" parameterType="com.mvc.entity.TStationStructureExample" resultMap="BaseResultMap">
|
|
|
+ <!--
|
|
|
+ description guozhao 2025-08-07 10:15:50
|
|
|
+ -->
|
|
|
+ select
|
|
|
+ <if test="distinct">
|
|
|
+ distinct
|
|
|
+ </if>
|
|
|
+ <include refid="Base_Column_List" />
|
|
|
+ from t_station_structure
|
|
|
+ <if test="_parameter != null">
|
|
|
+ <include refid="Example_Where_Clause" />
|
|
|
+ </if>
|
|
|
+ <if test="orderByClause != null">
|
|
|
+ order by ${orderByClause}
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+</mapper>
|