diff --git a/mallinkService/src/main/resources/mapper/WxRentContractMapper.xml b/mallinkService/src/main/resources/mapper/WxRentContractMapper.xml index 7dc079828..04d155c0f 100644 --- a/mallinkService/src/main/resources/mapper/WxRentContractMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxRentContractMapper.xml @@ -382,6 +382,22 @@ and rc.`rent_shop_type` = #{rentShopType} and rc.`apply_status` = #{applyStatus} and rc.`operation_type` = #{operationType} + + + and rc.merchant_id in( + select ms.merchant_id from (select merchant_id,shop_id from wx_merchant_shop where is_del=0) ms + inner join wx_merchant m on ms.merchant_id = m.id + inner join wx_shop s on s.id=ms.shop_id + where m.tenant_id=#{tenantId} and s.is_del=0 + + and m.business_id in (${businessForRule}) + + + and s.`floor` in (${floorForRule}) + + ) + + order by ${sortColumns} order by rc.createtime desc,rc.id desc