浏览代码

fix(mapper): 修复 AppSiteMapper 中地点列表查询

-将查询的主表从 nm_site_place 改为 nm_site
- 更新字段名引用,使用 b.name 代替 a.name
- 更新删除标志条件,使用 b.del_flag代替 a.del_flag
- 优化 SQL 查询性能,减少不必要的左连接
SheepHy 2 月之前
父节点
当前提交
9e7083c7d1

+ 5 - 6
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/mapper/xml/AppSiteMapper.xml

@@ -4,19 +4,18 @@
     <select id="getPlaceList" resultType="org.jeecg.modules.app.vo.PlaceVO">
         SELECT
         b.id,
-        a.name AS name,
+        b.name AS name,
         b.good_rate AS goodRate,
         b.address,
         b.category_id,
         b.latitude,
         b.longitude,
-        a.cover,
-        a.type
+        b.cover,
+        b.type
         FROM
-        nm_site_place a
-        LEFT JOIN nm_site b ON a.site_id = b.id
+        nm_site b
         LEFT JOIN sys_depart c ON b.org_code = c.org_code
-        WHERE 1 = 1 AND a.del_flag = 0
+        WHERE 1 = 1 AND b.del_flag = 0
         <if test="venueType != null and venueType == '0-1'">
             ORDER BY b.good_rate DESC
         </if>