|
@@ -21,7 +21,7 @@
|
|
select count(t1.user_id) as userCnt
|
|
select count(t1.user_id) as userCnt
|
|
from mp_channel_user_rel t1
|
|
from mp_channel_user_rel t1
|
|
left join mp_channel t2 on t1.channel_id = t2.channel_id
|
|
left join mp_channel t2 on t1.channel_id = t2.channel_id
|
|
- where t2.channel_no like concat(#{channelNo}, '.%')
|
|
|
|
|
|
+ where (t2.channel_no like concat(#{channelNo}, '.%') or t2.channel_no = #{channelNo})
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<!-- 根据渠道No查询渠道指定时间内新增的用户数量 -->
|
|
<!-- 根据渠道No查询渠道指定时间内新增的用户数量 -->
|
|
@@ -29,7 +29,7 @@
|
|
select count(t1.user_id) as userCnt
|
|
select count(t1.user_id) as userCnt
|
|
from mp_channel_user_rel t1
|
|
from mp_channel_user_rel t1
|
|
left join mp_channel t2 on t1.channel_id = t2.channel_id
|
|
left join mp_channel t2 on t1.channel_id = t2.channel_id
|
|
- where t2.channel_no like concat(#{channelNo}, '.%')
|
|
|
|
|
|
+ where (t2.channel_no like concat(#{channelNo}, '.%') or t2.channel_no = #{channelNo})
|
|
<if test="days != null and days != ''">
|
|
<if test="days != null and days != ''">
|
|
<!-- AND date_format(t1.created_time,'%Y-%m-%d') between date_format(DATE_ADD(CURDATE(),INTERVAL #{days} DAY),'%Y-%m-%d') and date_format(CURDATE(),'%Y-%m-%d') -->
|
|
<!-- AND date_format(t1.created_time,'%Y-%m-%d') between date_format(DATE_ADD(CURDATE(),INTERVAL #{days} DAY),'%Y-%m-%d') and date_format(CURDATE(),'%Y-%m-%d') -->
|
|
AND t1.created_time between DATE_ADD(CURDATE(),INTERVAL #{days} DAY) and NOW()
|
|
AND t1.created_time between DATE_ADD(CURDATE(),INTERVAL #{days} DAY) and NOW()
|