71 lines
2.2 KiB
XML
71 lines
2.2 KiB
XML
<?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.cm.population.dao.datarelease.IDataReleaseDao">
|
|
|
|
<select id="listBasePopulationInfo" parameterType="map" resultType="map">
|
|
SELECT
|
|
*
|
|
FROM
|
|
gen_base_population_info
|
|
WHERE
|
|
is_delete = '0'
|
|
<if test="gender != null and gender != ''">
|
|
AND gender = #{gender}
|
|
</if>
|
|
<if test="timeStr != null and timeStr != ''">
|
|
AND gmt_create <![CDATA[ >= ]]> #{timeStr}
|
|
</if>
|
|
<if test="timeEnd != null and timeEnd != ''">
|
|
AND gmt_create <![CDATA[ <= ]]> #{timeEnd}
|
|
</if>
|
|
</select>
|
|
|
|
<select id="listNationInfo" parameterType="map" resultType="map">
|
|
SELECT
|
|
COUNT(t1.nation) counts,
|
|
t1.nation
|
|
FROM
|
|
gen_base_population_info t1
|
|
WHERE
|
|
t1.is_delete = '0'
|
|
AND t1.nation IS NOT NULL
|
|
AND t1.nation <![CDATA[ <> ]]> ''
|
|
AND CHAR_LENGTH(t1.nation) > 32
|
|
AND t1.nation <![CDATA[ <> ]]> '2a1c97fc-48c3-4444-a350-bc5e27335ad4'
|
|
GROUP BY
|
|
t1.nation
|
|
ORDER BY counts DESC
|
|
LIMIT 0,10
|
|
</select>
|
|
|
|
<select id="listEducationDict" parameterType="map" resultType="map">
|
|
select
|
|
*
|
|
FROM
|
|
data_data
|
|
WHERE
|
|
is_delete = '0'
|
|
<if test="dataId != null and dataId != ''">
|
|
AND data_id = #{dataId}
|
|
</if>
|
|
<if test="dataParentId != null and dataParentId != ''">
|
|
AND data_parent_id = #{dataParentId}
|
|
</if>
|
|
</select>
|
|
|
|
<select id="listEducationInfo" parameterType="map" resultType="map">
|
|
SELECT
|
|
COUNT(t1.education) counts,
|
|
t1.education
|
|
FROM
|
|
gen_base_population_info t1
|
|
WHERE
|
|
t1.is_delete = '0'
|
|
AND t1.education IS NOT NULL
|
|
AND t1.education <![CDATA[ <> ]]> ''
|
|
AND CHAR_LENGTH(t1.education) > 32
|
|
GROUP BY
|
|
t1.education
|
|
ORDER BY counts DESC
|
|
</select>
|
|
</mapper> |