开启缓存

This commit is contained in:
WenG 2020-11-04 20:16:45 +08:00
parent 96af171b9a
commit eb52516baa
2 changed files with 13 additions and 25 deletions

View File

@ -2,6 +2,8 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.cm.plugin.map.dao.IGridDao"> <mapper namespace="com.cm.plugin.map.dao.IGridDao">
<cache/>
<resultMap id="gridRelationDTO" type="com.cm.plugin.map.pojo.dto.GridRelationDTO"> <resultMap id="gridRelationDTO" type="com.cm.plugin.map.pojo.dto.GridRelationDTO">
<id column="relation_id" property="relationId"/> <id column="relation_id" property="relationId"/>
<result column="grid_id" property="gridId"/> <result column="grid_id" property="gridId"/>
@ -21,7 +23,7 @@
</resultMap> </resultMap>
<!-- 保存网格 --> <!-- 保存网格 -->
<insert id="saveGrid" parameterType="map"> <insert id="saveGrid" parameterType="map" flushCache="true">
INSERT INTO map_grid( INSERT INTO map_grid(
grid_id, grid_id,
grid_name, grid_name,
@ -44,7 +46,7 @@
</insert> </insert>
<!-- 保存网格关联关系 --> <!-- 保存网格关联关系 -->
<insert id="saveGridRelation" parameterType="map"> <insert id="saveGridRelation" parameterType="map" flushCache="true">
INSERT INTO map_grid_relation( INSERT INTO map_grid_relation(
grid_id, grid_id,
relation_id relation_id
@ -55,7 +57,7 @@
</insert> </insert>
<!-- 删除网格 --> <!-- 删除网格 -->
<delete id="deleteGrid" parameterType="map"> <delete id="deleteGrid" parameterType="map" flushCache="true">
DELETE FROM DELETE FROM
map_grid map_grid
WHERE WHERE
@ -71,7 +73,7 @@
</delete> </delete>
<!-- 删除网格点 --> <!-- 删除网格点 -->
<delete id="deleteGridPoint" parameterType="map"> <delete id="deleteGridPoint" parameterType="map" flushCache="true">
DELETE FROM DELETE FROM
map_grid_point map_grid_point
WHERE WHERE
@ -87,7 +89,7 @@
</delete> </delete>
<!-- 删除网格关联关系 --> <!-- 删除网格关联关系 -->
<delete id="deleteGridRelation" parameterType="map"> <delete id="deleteGridRelation" parameterType="map" flushCache="true">
DELETE FROM DELETE FROM
map_grid_relation map_grid_relation
WHERE WHERE
@ -106,7 +108,7 @@
</delete> </delete>
<!-- 保存网格点 --> <!-- 保存网格点 -->
<insert id="saveGridPoint" parameterType="map"> <insert id="saveGridPoint" parameterType="map" flushCache="true">
INSERT INTO map_grid_point( INSERT INTO map_grid_point(
grid_id, grid_id,
lng, lng,
@ -119,7 +121,7 @@
</insert> </insert>
<!-- 获取关联关系列表 --> <!-- 获取关联关系列表 -->
<select id="listGridRelation" parameterType="map" resultMap="gridRelationDTO"> <select id="listGridRelation" parameterType="map" resultMap="gridRelationDTO" useCache="true">
SELECT SELECT
relation_id, relation_id,
grid_id grid_id
@ -152,7 +154,7 @@
</select> </select>
<!-- 获取网格列表通过关联ID --> <!-- 获取网格列表通过关联ID -->
<select id="listGridByRelationId" parameterType="java.lang.String" resultMap="gridDTO"> <select id="listGridByRelationId" parameterType="java.lang.String" resultMap="gridDTO" useCache="true">
SELECT SELECT
t1.grid_id, t1.grid_id,
t1.fill_color, t1.fill_color,
@ -170,7 +172,7 @@
t2.relation_id = #{_parameter} t2.relation_id = #{_parameter}
</select> </select>
<select id="listGridByRelationIds" parameterType="java.util.List" resultMap="gridDTO"> <select id="listGridByRelationIds" parameterType="java.util.List" resultMap="gridDTO" useCache="true">
SELECT SELECT
t1.grid_id, t1.grid_id,
t1.fill_color, t1.fill_color,
@ -192,7 +194,7 @@
</select> </select>
<!-- 获取网格点列表通过网格ID --> <!-- 获取网格点列表通过网格ID -->
<select id="listPointByGridId" parameterType="java.lang.String" resultMap="gridPointDTO"> <select id="listPointByGridId" parameterType="java.lang.String" resultMap="gridPointDTO" useCache="true">
SELECT SELECT
grid_id, grid_id,
lng, lng,
@ -204,7 +206,7 @@
</select> </select>
<!-- 获取网格点列表通过网格ID列表 --> <!-- 获取网格点列表通过网格ID列表 -->
<select id="listPointByGridIds" parameterType="java.util.List" resultMap="gridPointDTO"> <select id="listPointByGridIds" parameterType="java.util.List" resultMap="gridPointDTO" useCache="true">
SELECT SELECT
grid_id, grid_id,
lng, lng,

View File

@ -1,14 +0,0 @@
<!doctype html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
<base th:href="${#request.getContextPath() + '/'} ">
<meta charset="utf-8">
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
</head>
<body>
<script type="text/javascript" src="http://api.map.baidu.com/api?type=webgl&v=1.0&ak=mlfOah4gWM1FjEo9CmlI64zK6MhyiMPW"></script>
<script type="text/javascript" src="js/baidu-map.js"></script>
</body>
</html>