fix
This commit is contained in:
@@ -20,7 +20,7 @@ public interface LineService {
|
||||
* @param lineId
|
||||
* @return
|
||||
*/
|
||||
LineInfoVO getLineInfo(Long lineId);
|
||||
LineInfoVO getLineInfo(Long lineId,String userId);
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.cool.store.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.cool.store.constants.CommonConstants;
|
||||
import com.cool.store.context.LoginUserInfo;
|
||||
@@ -12,10 +11,8 @@ import com.cool.store.enums.point.PayBusinessTypeEnum;
|
||||
import com.cool.store.exception.ServiceException;
|
||||
import com.cool.store.mapper.IntentAgreementMapper;
|
||||
import com.cool.store.mapper.JoinIntentionMapper;
|
||||
import com.cool.store.mapper.RegionMapper;
|
||||
import com.cool.store.request.*;
|
||||
import com.cool.store.service.*;
|
||||
import com.cool.store.utils.CoolDateUtils;
|
||||
import com.cool.store.utils.StringUtil;
|
||||
import com.cool.store.utils.UUIDUtils;
|
||||
import com.cool.store.utils.poi.DateUtils;
|
||||
@@ -30,7 +27,6 @@ import org.springframework.stereotype.Service;
|
||||
import javax.annotation.Resource;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
/**
|
||||
* @Author suzhuhong
|
||||
@@ -86,7 +82,7 @@ public class LineServiceImpl implements LineService {
|
||||
|
||||
|
||||
@Override
|
||||
public LineInfoVO getLineInfo(Long lineId) {
|
||||
public LineInfoVO getLineInfo(Long lineId,String currentUserId) {
|
||||
LineInfoVO result = new LineInfoVO();
|
||||
// 查询线索信息
|
||||
LineInfoDO lineInfo = lineInfoDAO.getLineInfo(lineId);
|
||||
@@ -100,8 +96,16 @@ public class LineServiceImpl implements LineService {
|
||||
Map<Integer, String> channelMapByIds = hyPartnerUserChannelDAO.getChannelMapByIds(Arrays.asList(lineInfo.getLineSource()));
|
||||
result.setLineSourceName(channelMapByIds.get(lineInfo.getLineSource()));
|
||||
}
|
||||
|
||||
List<ShopInfoDO> shopInfoDOS = shopInfoDAO.selectInvestmentByLines(Collections.singletonList(lineInfo.getId()));
|
||||
List<Long> regionId = new ArrayList<>();
|
||||
if (StringUtils.isNotBlank(currentUserId) && !sysRoleService.checkIsAdmin(currentUserId)) {
|
||||
List<String> list = userAuthMappingService.getAuthRegionIdAndSubRegionIdByUserId(currentUserId);
|
||||
if (CollectionUtils.isNotEmpty(list)) {
|
||||
for (String s : list) {
|
||||
regionId.add(Long.valueOf(s));
|
||||
}
|
||||
}
|
||||
}
|
||||
List<ShopInfoDO> shopInfoDOS = shopInfoDAO.selectByLines(Collections.singletonList(lineInfo.getId()),regionId);
|
||||
Set<String> userIds = new HashSet<>();
|
||||
//门店的招生和选址人远
|
||||
Set<String> shopInvestmentMserIds = shopInfoDOS.stream().map(ShopInfoDO::getInvestmentManager).filter(StringUtils::isNotBlank).collect(Collectors.toSet());
|
||||
@@ -287,7 +291,7 @@ public class LineServiceImpl implements LineService {
|
||||
List<LineInfoDO> lineInfoDOS = lineInfoDAO.partnerList(partnerRequest, areaName, userId, regionId);
|
||||
PageInfo page = new PageInfo(lineInfoDOS);
|
||||
List<Long> lineIds = lineInfoDOS.stream().map(LineInfoDO::getId).collect(Collectors.toList());
|
||||
List<ShopInfoDO> shopInfoDOS = shopInfoDAO.selectInvestmentByLines(lineIds);
|
||||
List<ShopInfoDO> shopInfoDOS = shopInfoDAO.selectByLines(lineIds,regionId);
|
||||
Map<Long, Set<String>> investmentManagerIdMapByLineId = shopInfoDOS.stream().collect(Collectors.groupingBy(ShopInfoDO::getLineId, Collectors.mapping(ShopInfoDO::getInvestmentManager, Collectors.toSet())));
|
||||
Map<Long, Set<String>> developmentManagerMap = shopInfoDOS.stream().collect(Collectors.groupingBy(ShopInfoDO::getLineId, Collectors.mapping(ShopInfoDO::getDevelopmentManager, Collectors.toSet())));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user