Browse Source

[数据权限][修改][查询问题]

release_toaliyun_real
gongbiao 6 years ago
parent
commit
7c81a8bd68
1 changed files with 16 additions and 0 deletions
  1. +16
    -0
      mallinkService/src/main/resources/mapper/WxRentContractMapper.xml

+ 16
- 0
mallinkService/src/main/resources/mapper/WxRentContractMapper.xml View File

@@ -382,6 +382,22 @@
<if test=" null != rentShopType ">and rc.`rent_shop_type` = #{rentShopType}</if>
<if test=" null != applyStatus ">and rc.`apply_status` = #{applyStatus}</if>
<if test=" null != operationType ">and rc.`operation_type` = #{operationType}</if>
<if test="(null != floorForRule and '' != floorForRule) or (null != businessForRule and '' != businessForRule)">
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
<if test=" null != businessForRule and '' != businessForRule ">
and m.business_id in (${businessForRule})
</if>
<if test=" null != floorForRule and '' != floorForRule ">
and s.`floor` in (${floorForRule})
</if>
)
</if>
</where>
<if test=" null != sortColumns">order by ${sortColumns}</if>
<if test=" null == sortColumns">order by rc.createtime desc,rc.id desc</if>


Loading…
Cancel
Save