多租户层级查询优化
This commit is contained in:
@@ -130,4 +130,20 @@
|
||||
ORDER BY q.tourism_id DESC
|
||||
</select>
|
||||
|
||||
<!-- 全部景区ID(webApp全库统计使用) -->
|
||||
<select id="findAllTourismIds" resultType="java.lang.Long">
|
||||
SELECT id FROM tourisms WHERE is_del = 0 ORDER BY id DESC
|
||||
</select>
|
||||
|
||||
|
||||
<!-- 根据单个租户ID查询景区ID集合 -->
|
||||
<select id="findTourismIdsByTenantId" resultType="java.lang.Long">
|
||||
SELECT id FROM tourisms
|
||||
WHERE is_del = 0
|
||||
<if test="tenantId != null and tenantId != ''">
|
||||
AND tenant_id = #{tenantId}
|
||||
</if>
|
||||
ORDER BY id DESC
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user