|
|
|
@@ -197,25 +197,11 @@ |
|
|
|
<if test=" null != businessForRule and '' != businessForRule "> |
|
|
|
and business_id in (${businessForRule}) |
|
|
|
</if> |
|
|
|
<if test="null != floorForRule and '' != floorForRule "> |
|
|
|
and `id` in |
|
|
|
<foreach collection="tempShop" index="idx" separator=" union all " open="(" close=")"> |
|
|
|
select id from wx_rent_contract where 1=1 |
|
|
|
<if test=" null != tenantId and '' != tenantId"> |
|
|
|
and `tenant_id` = #{tenantId} |
|
|
|
</if> |
|
|
|
<if test=" null != parentTenantId and '' != parentTenantId"> |
|
|
|
and `parent_tenant_id` = #{parentTenantId} |
|
|
|
</if> |
|
|
|
and json_unquote(json_extract(json_extract(rent_info,'$[*].shopId'),concat('$[',#{idx},']'))) in(select |
|
|
|
id from wx_shop where 1=1 |
|
|
|
<if test=" null != tenantId and '' != tenantId"> |
|
|
|
and `tenant_id` = #{tenantId} |
|
|
|
</if> |
|
|
|
<if test=" null != parentTenantId and '' != parentTenantId"> |
|
|
|
and `parent_tenant_id` = #{parentTenantId} |
|
|
|
</if> |
|
|
|
and floor in (${floorForRule})) |
|
|
|
|
|
|
|
<if test=" null != merchantIds "> |
|
|
|
and merchant_id in |
|
|
|
<foreach collection="merchantIds" index="index" item="mItem" open="(" separator="," close=")"> |
|
|
|
#{mItem} |
|
|
|
</foreach> |
|
|
|
</if> |
|
|
|
|
|
|
|
@@ -432,39 +418,12 @@ |
|
|
|
<if test=" null != businessForRule and '' != businessForRule "> |
|
|
|
and rc.business_id in (${businessForRule}) |
|
|
|
</if> |
|
|
|
|
|
|
|
<if test="null != floorForRule and '' != floorForRule "> |
|
|
|
and rc.`id` in |
|
|
|
<foreach collection="tempShop" index="idx" separator=" union all " open="(" close=")"> |
|
|
|
select id from wx_rent_contract where 1=1 |
|
|
|
<if test=" null != tenantId and '' != tenantId"> |
|
|
|
and `tenant_id` = #{tenantId} |
|
|
|
</if> |
|
|
|
<if test=" null != parentTenantId and '' != parentTenantId"> |
|
|
|
and `parent_tenant_id` = #{parentTenantId} |
|
|
|
</if> |
|
|
|
and json_unquote(json_extract(json_extract(rent_info,'$[*].shopId'),concat('$[',#{idx},']'))) in(select |
|
|
|
id from wx_shop where 1=1 |
|
|
|
<if test=" null != tenantId and '' != tenantId"> |
|
|
|
and `tenant_id` = #{tenantId} |
|
|
|
</if> |
|
|
|
<if test=" null != parentTenantId and '' != parentTenantId"> |
|
|
|
and `parent_tenant_id` = #{parentTenantId} |
|
|
|
</if> |
|
|
|
and floor in (${floorForRule})) |
|
|
|
<if test=" null != merchantIds "> |
|
|
|
and rc.merchant_id in |
|
|
|
<foreach collection="merchantIds" index="index" item="mItem" open="(" separator="," close=")"> |
|
|
|
#{mItem} |
|
|
|
</foreach> |
|
|
|
</if> |
|
|
|
<!-- <if test="null != rentShopType and 2 == rentShopType and null != floorForRule and '' != floorForRule "> |
|
|
|
and rc.shop_id in (select id from wx_shop where 1=1 |
|
|
|
<if test=" null != tenantId and '' != tenantId"> |
|
|
|
and `tenant_id` = #{tenantId} |
|
|
|
</if> |
|
|
|
<if test=" null != parentTenantId and '' != parentTenantId"> |
|
|
|
and `parent_tenant_id` = #{parentTenantId} |
|
|
|
</if> |
|
|
|
and floor in (${floorForRule})) |
|
|
|
</if> --> |
|
|
|
|
|
|
|
</where> |
|
|
|
<if test=" null != sortColumns">order by ${sortColumns}</if> |
|
|
|
<if test=" null == sortColumns">order by rc.createtime desc,rc.id desc</if> |
|
|
|
|