From b1fa059e522e1fc608f6c7596b445ba3b58ae012 Mon Sep 17 00:00:00 2001
From: fengxiang <110431245@qq.com>
Date: Mon, 07 May 2018 13:50:41 +0800
Subject: [PATCH] 地图相关资源

---
 src/main/resources/mapper/DeviceMapper.xml |   16 ++++++++++++++--
 1 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/src/main/resources/mapper/DeviceMapper.xml b/src/main/resources/mapper/DeviceMapper.xml
index 0ce62ba..c7924aa 100644
--- a/src/main/resources/mapper/DeviceMapper.xml
+++ b/src/main/resources/mapper/DeviceMapper.xml
@@ -62,6 +62,18 @@
     id, name, address, longitude, latitude, mac, operate_user_id, state, is_delete, create_time, 
     install_time, monitor_point_id, device_version_id
   </sql>
+	<select id="countByTimes"   resultType="java.util.Map">
+		select DATE_FORMAT(create_time,#{format}) as time, COUNT(*) as count from device
+		where create_time >= #{start}
+		and create_time
+		<![CDATA[
+		<=
+		]]> #{end}
+		and is_delete <![CDATA[
+		<>
+		]]> 1
+		GROUP BY DATE_FORMAT(create_time,#{format}) ;
+	</select>
   <select id="selectWithRelationData" parameterType="tk.mybatis.mapper.entity.Example" resultMap="BaseResultMap">
     select
 	dev.*,
@@ -193,7 +205,7 @@
 		<collection property="organizationIds" column="id" select="selectOrganizationIds"></collection>
 	</resultMap>
 	<!-- resultMap������ -->
-	<select id="selectOrganizationIds" resultType="INTEGER">
+	<select id="selectOrganizationIds" resultType="java.lang.Integer">
 		call proc_organizationIds_GetByDeviceId(#{id,jdbcType=INTEGER});
 	</select>
 	<select id="selectWithOrgIdsByMac" parameterType="java.lang.String" resultMap="BaseResultWithOrgIdsMap">
@@ -203,7 +215,7 @@
 		where mac = #{mac,jdbcType=VARCHAR}
 	</select>
 
-	<select id="getDeviceCountByRegion" resultType="INTEGER">
+	<select id="getDeviceCountByRegion" resultType="java.lang.Integer">
 		SELECT
 			COUNT( * ) 
 		FROM

--
Gitblit v1.8.0