|
@@ -72,11 +72,9 @@
|
|
|
|
|
|
<!-- 查询子渠道信息 -->
|
|
<!-- 查询子渠道信息 -->
|
|
<select id="selectChannelVoList" resultMap="VoResultMap">
|
|
<select id="selectChannelVoList" resultMap="VoResultMap">
|
|
- select t1.* , t2.siteCnt, t3.userCnt, t4.name parentName
|
|
|
|
|
|
+ select t1.* , t2.name parentName
|
|
from mp_channel t1
|
|
from mp_channel t1
|
|
- left join (select parent_id, count(*) as siteCnt from mp_channel where `level` = 0 GROUP BY parent_id ) t2 on t1.channel_id = t2.parent_id
|
|
|
|
- left join (select channel_id, count(user_id) as userCnt from mp_channel_user_rel GROUP BY channel_id ) t3 on t1.channel_id = t3.channel_id
|
|
|
|
- left join mp_channel t4 on t1.parent_id = t4.channel_id
|
|
|
|
|
|
+ left join mp_channel t2 on t1.parent_id = t2.channel_id
|
|
${ew.customSqlSegment}
|
|
${ew.customSqlSegment}
|
|
order by a.channel_id desc
|
|
order by a.channel_id desc
|
|
</select>
|
|
</select>
|
|
@@ -87,7 +85,7 @@
|
|
from mp_channel t1
|
|
from mp_channel t1
|
|
left join mp_channel t2 on t1.parent_id = t2.channel_id
|
|
left join mp_channel t2 on t1.parent_id = t2.channel_id
|
|
where t1.`level`= 0 and t1.certify_status = 'y'
|
|
where t1.`level`= 0 and t1.certify_status = 'y'
|
|
- and t2.channel_no like concat(#{channelNo}, '%')
|
|
|
|
|
|
+ and t2.channel_no like concat(#{channelNo}, '.%')
|
|
</select>
|
|
</select>
|
|
|
|
|
|
</mapper>
|
|
</mapper>
|