<?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.panzhihua.service_community.dao.ComActReserveDangerAreaDao">
|
|
<resultMap type="com.panzhihua.service_community.entity.ComActReserveDangerArea"
|
id="ComActReserveDangerAreaBaseResultMap">
|
<result property="id" column="id"/>
|
<result property="type" column="type"/>
|
<result property="areaName" column="area_name"/>
|
<result property="county" column="county"/>
|
<result property="province" column="province"/>
|
<result property="city" column="city"/>
|
<result property="createTime" column="create_time"/>
|
<result property="screenTime" column="screen_time"/>
|
</resultMap>
|
|
<select id="pageList" resultType="com.panzhihua.common.model.vos.community.reserve.ComActReserveDangerAreaVO">
|
select * from com_act_reserve_danger_area
|
<where>
|
status = 1
|
<if test="commonPage.type !=null">
|
<if test="commonPage.type == 0">
|
and screen_time is null
|
</if>
|
<if test="commonPage.type == 1">
|
and screen_time is not null
|
</if>
|
</if>
|
<if test="commonPage.address !=null and commonPage.address !=''">
|
and (area_name like concat('%',#{commonPage.address},'%') or country like concat('%',#{commonPage.address},'%') or province like concat('%',#{commonPage.address},'%') or city like concat('%',#{commonPage.address},'%'))
|
</if>
|
</where>
|
</select>
|
|
<select id="statics" resultType="com.panzhihua.common.model.vos.community.reserve.DangerAreaStatics">
|
select (select count(*) from com_act_reserve_danger_area where status = 1 and type = 1) middleCount,(select count(*) from com_act_reserve_danger_area where status = 1 and type = 2) highCount
|
</select>
|
</mapper>
|