From bc72c98cd11519b811829de5ec59b8a021e75946 Mon Sep 17 00:00:00 2001
From: ZhuDongming <773644075@qq.com>
Date: Thu, 25 Jul 2019 14:16:18 +0800
Subject: [PATCH] 查询无人机在时间段内sensor值的Mapper接口
---
src/main/resources/mapper/OrganizationMapper.xml | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/src/main/resources/mapper/OrganizationMapper.xml b/src/main/resources/mapper/OrganizationMapper.xml
index 242b105..7865ab7 100644
--- a/src/main/resources/mapper/OrganizationMapper.xml
+++ b/src/main/resources/mapper/OrganizationMapper.xml
@@ -1,13 +1,15 @@
<?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.mapper.OrganizationMapper">
- <resultMap id="BaseResultMap" type="com.moral.entity.exp.OrganizationExp">
+ <resultMap id="BaseResultMap" type="com.moral.entity.Organization">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="rank" jdbcType="INTEGER" property="rank" />
<result column="province_code" jdbcType="INTEGER" property="provinceCode" />
<result column="city_code" jdbcType="INTEGER" property="cityCode" />
<result column="area_code" jdbcType="INTEGER" property="areaCode" />
+ <result column="town_code" jdbcType="BIGINT" property="townCode" />
+ <result column="village_code" jdbcType="BIGINT" property="villageCode" />
<result column="address" jdbcType="VARCHAR" property="address" />
<result column="telephone" jdbcType="VARCHAR" property="telephone" />
<result column="email" jdbcType="VARCHAR" property="email" />
@@ -20,6 +22,8 @@
<result column="province_name" property="provinceName" jdbcType="VARCHAR" />
<result column="city_name" property="cityName" jdbcType="VARCHAR" />
<result column="area_name" property="areaName" jdbcType="VARCHAR" />
+ <result column="town_name" property="townName" jdbcType="VARCHAR" />
+ <result column="village_name" property="villageName" jdbcType="VARCHAR" />
</association>
</resultMap>
<sql id="Example_Where_Clause">
@@ -56,7 +60,7 @@
create_time, expire_time, description
</sql>
<sql id="Relation_Province_City_Area_List">
- are.area_name, cti.city_name, pro.province_name
+ are.area_name, cti.city_name, pro.province_name,tow.town_name,vil.village_name
</sql>
<select id="selectWithAreaNameByExample" parameterType="tk.mybatis.mapper.entity.Example" resultMap="BaseResultMap">
select
@@ -67,6 +71,8 @@
,
<include refid="Relation_Province_City_Area_List" />
from organization
+ left join village vil on organization.village_code = vil.village_code
+ left join town tow on organization.town_code = tow.town_code
left join area are on organization.area_code = are.area_code
left join city cti on organization.city_code = cti.city_code
left join province pro on organization.province_code = pro.province_code
@@ -94,4 +100,7 @@
AND o.city_code = c.city_code
</if>
</select>
+ <select id="selectLowerOrgIds" resultType="java.lang.Integer">
+ call proc_lowerOrgIds_GetByOrgId(#{orgId,jdbcType=INTEGER});
+ </select>
</mapper>
\ No newline at end of file
--
Gitblit v1.8.0