|
@@ -183,4 +183,34 @@
|
|
|
</if>
|
|
|
</select>
|
|
|
|
|
|
+ <select id="getSectionAllCountByBaseVO" resultType="Integer">
|
|
|
+ SELECT
|
|
|
+ count(*)
|
|
|
+ FROM
|
|
|
+ section s
|
|
|
+ LEFT JOIN global_location a ON a.id = s.pid
|
|
|
+ LEFT JOIN global_location b ON b.id = a.pid
|
|
|
+ LEFT JOIN global_location c ON c.id = b.pid
|
|
|
+ WHERE
|
|
|
+ 1=1
|
|
|
+ <if test="sectionList != null and !sectionList.isEmpty()">
|
|
|
+ AND s.id IN
|
|
|
+ <foreach collection="sectionList" item="item" open="(" separator="," close=")">
|
|
|
+ #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="provinceId != null and provinceId != 0">
|
|
|
+ AND c.id = #{provinceId}
|
|
|
+ </if>
|
|
|
+ <if test="cityId != null and cityId != 0">
|
|
|
+ AND b.id = #{cityId}
|
|
|
+ </if>
|
|
|
+ <if test="areaId != null and areaId != 0">
|
|
|
+ AND a.id = #{areaId}
|
|
|
+ </if>
|
|
|
+ <if test="sectionId != null and sectionId != 0">
|
|
|
+ AND s.id = #{sectionId}
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+
|
|
|
</mapper>
|