Przeglądaj źródła

(mfixapper): 修复场所列表查询 SQL

- 修正了场所名称的别名引用,从 b.name 改为 a.name
- 更新了部门表的连接条件,从 b.tenant_id = c.id 改为 b.org_code = c.org_code
- 修改了组织类别条件,将 2 和 3
SheepHy 2 miesięcy temu
rodzic
commit
def68404b2

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

@@ -4,7 +4,7 @@
     <select id="getPlaceList" resultType="org.jeecg.modules.app.vo.PlaceVO">
         SELECT
         b.id,
-        b.name AS name,
+        a.name AS name,
         b.good_rate AS goodRate,
         b.address,
         b.category_id,
@@ -15,22 +15,22 @@
         FROM
         nm_site_place a
         LEFT JOIN nm_site b ON a.site_id = b.id
-        LEFT JOIN sys_depart c ON b.tenant_id = c.id
+        LEFT JOIN sys_depart c ON b.org_code = c.org_code
         WHERE 1 = 1 AND a.del_flag = 0
         <if test="venueType != null and venueType == '0-1'">
             ORDER BY b.good_rate DESC
         </if>
         <if test="venueType != null and venueType == '1-1'">
-            AND c.org_category = 2
+            AND c.org_category = 20
         </if>
         <if test="venueType != null and venueType == '1-2'">
-            AND c.org_category = 2 ORDER BY  b.good_rate DESC
+            AND c.org_category = 20 ORDER BY  b.good_rate DESC
         </if>
         <if test="venueType != null and venueType == '2-1'">
-            AND c.org_category = 3
+            AND c.org_category = 21
         </if>
         <if test="venueType != null and venueType == '2-2'">
-            AND c.org_category = 3 ORDER BY  b.good_rate DESC
+            AND c.org_category = 21 ORDER BY  b.good_rate DESC
         </if>
     </select>