| | |
| | | <?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.moral.monitor.dao.MonitorPointDao">
|
| | |
|
| | | <mapper namespace="com.moral.monitor.dao.MonitorpointDao">
|
| | | <resultMap id="BaseResultMap" type="com.moral.monitor.entity.MonitorPoint">
|
| | | <id column="id" jdbcType="VARCHAR" property="id" />
|
| | | <result column="name" jdbcType="VARCHAR" property="name" />
|
| | | <result column="longitude" jdbcType="DOUBLE" property="longitude" />
|
| | | <result column="latitude" jdbcType="DOUBLE" property="latitude" />
|
| | | <result column="provincecode" jdbcType="VARCHAR" property="provincecode" />
|
| | | <result column="citycode" jdbcType="VARCHAR" property="citycode" />
|
| | | <result column="areacode" jdbcType="VARCHAR" property="areacode" />
|
| | | <result column="address" jdbcType="VARCHAR" property="address" />
|
| | | <result column="repairman" jdbcType="VARCHAR" property="repairman" />
|
| | | <result column="region_description" jdbcType="VARCHAR" property="regionDescription" />
|
| | | <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
| | | <result column="owner" jdbcType="VARCHAR" property="owner" />
|
| | | </resultMap>
|
| | | <sql id="Example_Where_Clause">
|
| | | <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>
|
| | | <select id="selectByExample" parameterType="com.moral.monitor.entity.MonitorPointExample" resultMap="BaseResultMap">
|
| | | select
|
| | | <if test="distinct">
|
| | | distinct
|
| | | </if>
|
| | | monitorpoint.*
|
| | | from monitorpoint
|
| | | LEFT JOIN area ON monitorpoint.areacode = area.`code` |
| | | <if test="_parameter != null">
|
| | | <include refid="Example_Where_Clause" />
|
| | | </if>
|
| | | <if test="orderByClause != null">
|
| | | order by ${orderByClause}
|
| | | </if>
|
| | | </select>
|
| | | <!--所有监测点-->
|
| | | <select id="allMonitorPoint" parameterType="com.moral.monitor.entity.QueryHelper" resultType="com.moral.monitor.entity.MonitorPoint">
|
| | | select * from monitorpoint
|