linwe
2024-08-09 8b7258c9427882bb1798f1502eaa35184c6e374e
src/main/java/org/springblade/modules/category/mapper/CategoryMapper.xml
@@ -30,6 +30,7 @@
        <if test="category.parentNo!=null and category.parentNo!=''">
            and parent_no = #{category.parentNo}
        </if>
        order by -sort desc
    </select>
    <select id="selectCategoryList" resultType="org.springblade.modules.category.dto.CategoryDTO">
@@ -57,4 +58,29 @@
    </select>
    <select id="getTreeList" resultType="org.springblade.common.node.TreeIntegerNode">
        SELECT
            jc.category_no AS id,
            jc.id AS ids,
            jc.category_no,
            jc.parent_no AS parentId,
            jc.category_name AS name,
            jc.`level`,
            (
            SELECT
                count( 1 )
            FROM
                jczz_place jp
                LEFT JOIN jczz_place_poi_label jppl ON jp.id = jppl.place_id
            WHERE
                jc.category_no = jppl.poi_code
                AND jppl.type = 3
            ) count
        FROM
            jczz_category jc
        WHERE
            is_deleted = 0
    </select>
</mapper>