|
@@ -39,9 +39,12 @@
|
|
|
info.channel_name,
|
|
|
info.channel_remark
|
|
|
from channel_info info
|
|
|
+ <if test="userId !=null and userId !=''">
|
|
|
+ join user_channel_mapping ucm on ucm.channel_id = info.id and ucm.isvalid=1
|
|
|
+ </if>
|
|
|
where info.isvalid=1
|
|
|
<if test="userId !=null and userId !=''">
|
|
|
- and e.user_id=#{userId}
|
|
|
+ and ucm.user_id=#{userId}
|
|
|
</if>
|
|
|
limit #{offset},#{pageSize}
|
|
|
</select>
|
|
@@ -49,7 +52,11 @@
|
|
|
select count(distinct info.id) from channel_info info
|
|
|
where info.isvalid=1
|
|
|
<if test="userId !=null and userId !=''">
|
|
|
- and e.user_id=#{userId}
|
|
|
+ join user_channel_mapping ucm on ucm.channel_id = info.id and ucm.isvalid=1
|
|
|
+ </if>
|
|
|
+ where info.isvalid=1
|
|
|
+ <if test="userId !=null and userId !=''">
|
|
|
+ and ucm.user_id=#{userId}
|
|
|
</if>
|
|
|
</select>
|
|
|
<select id="selectChannelIdByEmail" resultType="java.lang.Integer">
|