|
|
@@ -124,12 +124,17 @@ |
|
|
not null and status in(1,2,3,4) |
|
|
not null and status in(1,2,3,4) |
|
|
) |
|
|
) |
|
|
</if> |
|
|
</if> |
|
|
|
|
|
|
|
|
<if test=" null != ids "> |
|
|
<if test=" null != ids "> |
|
|
and id in |
|
|
and id in |
|
|
<foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")"> |
|
|
<foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")"> |
|
|
#{idItem} |
|
|
#{idItem} |
|
|
</foreach> |
|
|
</foreach> |
|
|
</if> |
|
|
</if> |
|
|
|
|
|
|
|
|
|
|
|
<include refid="dataRule"/> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<if test=" null != sortColumns">order by ${sortColumns}</if> |
|
|
<if test=" null != sortColumns">order by ${sortColumns}</if> |
|
|
</sql> |
|
|
</sql> |
|
|
|
|
|
|
|
|
@@ -150,6 +155,23 @@ |
|
|
|
|
|
|
|
|
</select> |
|
|
</select> |
|
|
|
|
|
|
|
|
|
|
|
<sql id="dataRule"> |
|
|
|
|
|
<if test="(null != floorForRule and '' != floorForRule) or (null != businessForRule and '' != businessForRule)"> |
|
|
|
|
|
and m.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> |
|
|
|
|
|
</sql> |
|
|
|
|
|
|
|
|
<sql id="dynamicWhereConditionsVo"> |
|
|
<sql id="dynamicWhereConditionsVo"> |
|
|
where m.is_del = 0 |
|
|
where m.is_del = 0 |
|
|
|
|
|
|
|
|
@@ -232,20 +254,7 @@ |
|
|
#{idItem} |
|
|
#{idItem} |
|
|
</foreach> |
|
|
</foreach> |
|
|
</if> |
|
|
</if> |
|
|
<if test="(null != floorForRule and '' != floorForRule) or (null != businessForRule and '' != businessForRule)"> |
|
|
|
|
|
and m.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> |
|
|
|
|
|
|
|
|
<include refid="dataRule"/> |
|
|
|
|
|
|
|
|
<if test=" null != sortColumns">order by ${sortColumns}</if> |
|
|
<if test=" null != sortColumns">order by ${sortColumns}</if> |
|
|
</sql> |
|
|
</sql> |
|
|
@@ -340,6 +349,7 @@ |
|
|
<if test=" null != id"> |
|
|
<if test=" null != id"> |
|
|
and m.`id` = #{id} |
|
|
and m.`id` = #{id} |
|
|
</if> |
|
|
</if> |
|
|
|
|
|
|
|
|
order by m.top_time desc |
|
|
order by m.top_time desc |
|
|
</select> |
|
|
</select> |
|
|
|
|
|
|
|
|
|