|
@@ -67,7 +67,9 @@ public class SaleSiteController extends BaseApiController {
|
|
|
List<ChannelVO> list = new ArrayList<ChannelVO>();
|
|
|
startPage();
|
|
|
QueryWrapper<Channel> queryWrapper = new QueryWrapper<>();
|
|
|
- queryWrapper.eq("t1.parent_id", null!=channel && null != channel.getChannelId()?channel.getChannelId():0);
|
|
|
+ if(null!=channel && null != channel.getChannelId()) {
|
|
|
+ queryWrapper.eq("t1.parent_id", channel.getChannelId());
|
|
|
+ }
|
|
|
queryWrapper.eq("t1.level", 0);
|
|
|
queryWrapper.likeRight(null != channel && StringUtils.isNotBlank(channel.getMobile()), "t1.mobile", channel.getMobile());
|
|
|
queryWrapper.likeRight(null != channel && StringUtils.isNotBlank(channel.getName()), "t1.name", channel.getName());
|
|
@@ -75,13 +77,12 @@ public class SaleSiteController extends BaseApiController {
|
|
|
queryWrapper.eq(null != channel && null != channel.getCityId(), "t1.city_id", channel.getCityId());
|
|
|
queryWrapper.eq(null != channel && null != channel.getAreaId(), "t1.area_id", channel.getAreaId());
|
|
|
queryWrapper.orderByAsc("t1.channel_id");
|
|
|
- queryWrapper.last("limit 50");
|
|
|
list = channelService.selectChannelVoList(queryWrapper);
|
|
|
if(null != list && list.size() > 0) {
|
|
|
for(ChannelVO channelVO : list) {
|
|
|
if(null != channelVO && StringUtils.isNotBlank(channelVO.getChannelNo())) {
|
|
|
int siteCnt = channelService.getChannelSiteCnt(channelVO.getChannelNo());
|
|
|
- int userCnt = channelUserRelService.getChannelUserCnt(channelVO.getChannelNo());
|
|
|
+ int userCnt = channelUserRelService.getChannelTotalUserCnt(channelVO.getChannelNo());
|
|
|
channelVO.setSiteCnt(siteCnt);
|
|
|
channelVO.setUserCnt(userCnt);
|
|
|
// 查询用户信息
|