fix
This commit is contained in:
@@ -89,4 +89,32 @@ public class LinePointBaseInfoVO {
|
||||
return resultList;
|
||||
}
|
||||
|
||||
|
||||
public static LinePointBaseInfoVO convert(LineInfoDO lineInfo, String username, Map<Long, String> userPortraitMap, HyOpenAreaInfoDO cityArea, Map<Long, Integer> recommendShopNumMap, Map<Long, Integer> selectedShopNumMap){
|
||||
LinePointBaseInfoVO linePointBaseInfo = new LinePointBaseInfoVO(lineInfo.getId(), lineInfo.getUsername(), lineInfo.getMobile());
|
||||
linePointBaseInfo.setWantShopNum(lineInfo.getWantShopNum());
|
||||
linePointBaseInfo.setInvestmentManagerUsername(username);
|
||||
if(Objects.nonNull(cityArea)){
|
||||
linePointBaseInfo.setAreaName(cityArea.getAreaName());
|
||||
linePointBaseInfo.setAreaPath(cityArea.getAreaPath().replace("/", "").trim());
|
||||
}
|
||||
linePointBaseInfo.setRecommendShopNum(recommendShopNumMap.get(lineInfo.getId()));
|
||||
linePointBaseInfo.setSelectedShopNum(selectedShopNumMap.get(lineInfo.getId()));
|
||||
if(StringUtils.isNotBlank(lineInfo.getUserPortrait())){
|
||||
List<String> userPortraitList = new ArrayList<>();
|
||||
String[] parts = lineInfo.getUserPortrait().split(",");
|
||||
for (String part : parts) {
|
||||
String trimmedPart = part.trim();
|
||||
if (StringUtils.isNotBlank(trimmedPart)) {
|
||||
String s = userPortraitMap.get(Long.valueOf(part));
|
||||
if(StringUtils.isNotBlank(s)){
|
||||
userPortraitList.add(s);
|
||||
}
|
||||
}
|
||||
}
|
||||
linePointBaseInfo.setUserPortraitList(userPortraitList);
|
||||
}
|
||||
return linePointBaseInfo;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user