You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
872 B
29 lines
872 B
|
4 years ago
|
<?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.epmet.dao.user.IcResiUserDao">
|
||
|
|
|
||
|
|
<select id="userChart" resultType="com.epmet.dto.result.UserChartResultDTO">
|
||
|
|
SELECT
|
||
|
|
COUNT(id) num,
|
||
|
|
is_floating isFloating
|
||
|
|
FROM
|
||
|
|
ic_resi_user
|
||
|
|
WHERE
|
||
|
|
del_flag = '0'
|
||
|
|
<choose>
|
||
|
|
<when test='orgType == "agency"'>
|
||
|
|
AND (agency_id = #{orgId} OR pids LIKE CONCAT('%', #{orgId}, '%'))
|
||
|
|
</when>
|
||
|
|
<when test='orgType == "grid"'>
|
||
|
|
AND grid_id = #{orgId}
|
||
|
|
</when>
|
||
|
|
<otherwise>
|
||
|
|
AND village_id = #{orgId}
|
||
|
|
</otherwise>
|
||
|
|
</choose>
|
||
|
|
GROUP BY is_floating
|
||
|
|
</select>
|
||
|
|
|
||
|
|
</mapper>
|