Browse Source

渠道列表查询sql

Liugl 3 years ago
parent
commit
bbe7c8f54c
1 changed files with 2 additions and 4 deletions
  1. 2 4
      mp-service/src/main/resources/mapper/channel/ChannelMapper.xml

+ 2 - 4
mp-service/src/main/resources/mapper/channel/ChannelMapper.xml

@@ -72,11 +72,9 @@
 
     <!-- 查询子渠道信息 -->
     <select id="selectChannelVoList" resultMap="VoResultMap">
-		select t1.* , t2.siteCnt, t3.userCnt, t4.name parentName
+		select t1.* , t2.name parentName
 		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}
 		order by a.channel_id desc
 	</select>