首页统计
This commit is contained in:
@@ -4,7 +4,20 @@
|
||||
<mapper namespace="com.central.order.mapper.TourismMapper">
|
||||
|
||||
<select id="findList" resultType="com.central.order.model.Tourism">
|
||||
select * from tourisms t
|
||||
SELECT *
|
||||
FROM tourisms t
|
||||
<where>
|
||||
<if test="p.tenantIds != null and p.tenantIds.size > 0">
|
||||
AND t.tenant_id IN
|
||||
<foreach collection="p.tenantIds" item="tid" open="(" separator="," close=")">
|
||||
#{tid}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="(p.tenantIds == null or p.tenantIds.size == 0) and p.tenantId != null and p.tenantId != ''">
|
||||
AND t.tenant_id = #{p.tenantId}
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY t.id DESC
|
||||
</select>
|
||||
|
||||
<resultMap id="TourismResultMap" type="com.central.order.model.Tourism">
|
||||
@@ -89,4 +102,17 @@
|
||||
ORDER BY create_time DESC
|
||||
</select>
|
||||
|
||||
<!-- 根据租户ID集合查询景区ID集合 -->
|
||||
<select id="findTourismIdsByTenantIds" resultType="java.lang.Long">
|
||||
SELECT id FROM tourisms
|
||||
WHERE is_del = 0
|
||||
<if test="tenantIds != null and tenantIds.size > 0">
|
||||
AND tenant_id IN
|
||||
<foreach collection="tenantIds" item="tid" open="(" separator="," close=")">
|
||||
#{tid}
|
||||
</foreach>
|
||||
</if>
|
||||
ORDER BY id DESC
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user