Browse Source

渠道查询接口错误修改

Liugl 3 years ago
parent
commit
f1450bf481

+ 6 - 0
mp-service/src/main/java/com/qs/mp/channel/service/impl/ChannelServiceImpl.java

@@ -178,6 +178,12 @@ public class ChannelServiceImpl extends ServiceImpl<ChannelMapper, Channel> impl
 		QueryWrapper<Channel> queryWrapper = new QueryWrapper<>();
 		queryWrapper.eq("t1.parent_id", channel.getParentId());
 		queryWrapper.eq("t1.level", 0);
+		if(null != channel.getVerifyStatus()) {
+			queryWrapper.eq("t1.verify_status", channel.getVerifyStatus());
+		}
+		if(null != channel.getCertifyStatus()) {
+			queryWrapper.eq("t1.certify_status", channel.getCertifyStatus());
+		}
 		return getBaseMapper().selectSiteVoList(queryWrapper);
 	}
 

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

@@ -109,7 +109,7 @@
 		from mp_channel t1
 		left join mp_channel t2 on t1.parent_id = t2.channel_id
 		${ew.customSqlSegment}
-		order by a.channel_id desc
+		order by t1.channel_id desc
 	</select>
 	
 	 <!-- 查询子经销商信息 -->
@@ -118,7 +118,7 @@
 		from mp_channel t1
 		left join mp_channel t2 on t1.parent_id = t2.channel_id
 		${ew.customSqlSegment}
-		order by a.channel_id desc
+		order by t1.channel_id desc
 	</select>
 
 	<!-- 查询渠道及其子渠道经销商用户数总和 -->