فهرست منبع

Merge branch 'dev' of 113.31.163.91:quanshu/mp-server into dev

chunping 3 سال پیش
والد
کامیت
444b7303da

+ 3 - 5
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>
@@ -87,7 +85,7 @@
 		from mp_channel t1
 		left join mp_channel t2 on t1.parent_id = t2.channel_id
 		where t1.`level`= 0 and t1.certify_status = 'y'
-		and t2.channel_no like concat(#{channelNo}, '%')
+		and t2.channel_no like concat(#{channelNo}, '.%')
     </select>
 
 </mapper>

+ 1 - 1
mp-service/src/main/resources/mapper/channel/ChannelUserRelMapper.xml

@@ -21,7 +21,7 @@
         select count(t1.user_id) as userCnt 
 		from mp_channel_user_rel t1
 		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}, '.%')
     </select>