From 8b7258c9427882bb1798f1502eaa35184c6e374e Mon Sep 17 00:00:00 2001
From: linwe <872216996@qq.com>
Date: Fri, 09 Aug 2024 14:29:18 +0800
Subject: [PATCH] 短信指定楼栋发送

---
 src/main/java/org/springblade/modules/category/mapper/CategoryMapper.xml |   50 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 50 insertions(+), 0 deletions(-)

diff --git a/src/main/java/org/springblade/modules/category/mapper/CategoryMapper.xml b/src/main/java/org/springblade/modules/category/mapper/CategoryMapper.xml
index c736dd8..0167d02 100644
--- a/src/main/java/org/springblade/modules/category/mapper/CategoryMapper.xml
+++ b/src/main/java/org/springblade/modules/category/mapper/CategoryMapper.xml
@@ -30,6 +30,56 @@
         <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">
+        select
+        jc.id,
+        jc.category_no,
+        jc.category_name,
+        jc.parent_no,
+        jc.remark
+        from
+        jczz_place_poi_label jppl LEFT JOIN jczz_category jc on jc.category_no=jppl.poi_code
+        <where>
+            <if test="category.id != null ">and jc.id = #{category.id}</if>
+            <if test="category.placeId != null and category.placeId != '' ">and jppl.place_id = #{category.placeId}</if>
+            <if test="category.categoryNo != null  and category.categoryNo != ''">and jc.category_no =
+                #{category.categoryNo}
+            </if>
+            <if test="category.categoryName != null  and category.categoryName != ''">and jc.ategory_name =
+                #{category.categoryName}
+            </if>
+            <if test="category.remark != null  and category.remark != ''">and jc.remark = #{category.remark}</if>
+            and jppl.type = 3
+            and jc.category_no is not null
+        </where>
+    </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>
 
 

--
Gitblit v1.9.3