|
@@ -168,7 +168,8 @@
|
|
|
<!-- 表类型 -->
|
|
|
<if test="param.channelId != null and param.channelId != 0">
|
|
|
and rb.channel_id = #{param.channelId}
|
|
|
- </if>
|
|
|
+ </if>
|
|
|
+ <if test="param.channelId == null "> and rb.channel_id != -99</if>
|
|
|
<!-- 数据权限 -->
|
|
|
<if test="param.siteId != null and param.siteId != 0 "> and rb.site_id = #{param.siteId} </if>
|
|
|
<!--
|
|
@@ -558,10 +559,10 @@
|
|
|
FROM
|
|
|
${tableName} ssmrrbb
|
|
|
WHERE 1 = 1
|
|
|
- <if test="siteId != null"> ssmrrbb.site_id = #{siteId} </if>
|
|
|
+ <if test="siteId != null"> and ssmrrbb.site_id = #{siteId} </if>
|
|
|
<if test="channelId != null"> and ssmrrbb.channel_id = #{channelId} </if>
|
|
|
AND ssmrrbb.stat_day = #{startDate}
|
|
|
- AND ssmrrbb.channel_id <![CDATA[ <> ]]> - 99
|
|
|
+ AND ssmrrbb.channel_id <![CDATA[ <> ]]> -99
|
|
|
<if test="buildingIds != null and buildingIds.size() != 0"> and ssmrrbb.building_id in <foreach collection="buildingIds" item="item" open="(" separator="," close=")">#{item}</foreach> </if>
|
|
|
<if test="customerIds != null and customerIds.size() != 0"> and ssmrrbb.customer_id in <foreach collection="customerIds" item="item" open="(" separator="," close=")">#{item}</foreach> </if>
|
|
|
GROUP BY
|
|
@@ -584,7 +585,7 @@
|
|
|
FROM ${tableName} ssmrrbb
|
|
|
left join sc_channel sc on(sc.id = ssmrrbb.channel_id)
|
|
|
WHERE 1 = 1
|
|
|
- <if test="siteId != null"> ssmrrbb.site_id = #{siteId} </if>
|
|
|
+ <if test="siteId != null"> and ssmrrbb.site_id = #{siteId} </if>
|
|
|
and ssmrrbb.stat_day = #{startDate}
|
|
|
AND ssmrrbb.channel_id <![CDATA[ <> ]]> - 99
|
|
|
<if test="customerId != null"> and ssmrrbb.customer_id = #{customerId} </if>
|