列表字段更改
This commit is contained in:
@@ -6,13 +6,17 @@ import com.cool.store.entity.HyPartnerBaseInfoDO;
|
|||||||
import com.cool.store.mapper.HyOpenAreaInfoMapper;
|
import com.cool.store.mapper.HyOpenAreaInfoMapper;
|
||||||
import com.github.pagehelper.PageInfo;
|
import com.github.pagehelper.PageInfo;
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
|
import com.google.common.collect.Maps;
|
||||||
import org.apache.commons.collections4.CollectionUtils;
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
|
import org.apache.commons.collections4.ListUtils;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author suzhuhong
|
* @Author suzhuhong
|
||||||
@@ -85,6 +89,14 @@ public class HyOpenAreaInfoDAO {
|
|||||||
return hyOpenAreaInfoMapper.selectByIds(ids);
|
return hyOpenAreaInfoMapper.selectByIds(ids);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Map<Long, String> selectNameMapByIds(List<Long> ids){
|
||||||
|
if (CollectionUtils.isEmpty(ids)){
|
||||||
|
return Maps.newHashMap();
|
||||||
|
}
|
||||||
|
List<HyOpenAreaInfoDO> hyOpenAreaInfoDOS = hyOpenAreaInfoMapper.selectByIds(ids);
|
||||||
|
return ListUtils.emptyIfNull(hyOpenAreaInfoDOS).stream().collect(Collectors.toMap(k->k.getId(), v->v.getAreaName()));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public HyOpenAreaInfoDO selectById(Long id){
|
public HyOpenAreaInfoDO selectById(Long id){
|
||||||
if (id==null){
|
if (id==null){
|
||||||
|
|||||||
@@ -31,10 +31,10 @@ public class BlackListVO {
|
|||||||
private String phoneAddress;
|
private String phoneAddress;
|
||||||
|
|
||||||
@ApiModelProperty("创建时间")
|
@ApiModelProperty("创建时间")
|
||||||
private Date createTime;
|
private String createTime;
|
||||||
|
|
||||||
@ApiModelProperty("操作时间")
|
@ApiModelProperty("操作时间")
|
||||||
private Date closeTime;
|
private String closeTime;
|
||||||
|
|
||||||
@ApiModelProperty("操作人ID")
|
@ApiModelProperty("操作人ID")
|
||||||
private String closeUserId;
|
private String closeUserId;
|
||||||
|
|||||||
@@ -1,10 +1,17 @@
|
|||||||
package com.cool.store.vo;
|
package com.cool.store.vo;
|
||||||
|
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
|
import com.cool.store.dto.partner.PrivateSeaLineDTO;
|
||||||
|
import com.cool.store.utils.CoolDateUtils;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import org.apache.commons.lang3.time.DateUtils;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author suzhuhong
|
* @Author suzhuhong
|
||||||
@@ -35,7 +42,7 @@ public class PrivateSeaLineListVo {
|
|||||||
private String partnerUserPhone;
|
private String partnerUserPhone;
|
||||||
|
|
||||||
@ApiModelProperty("截止时间")
|
@ApiModelProperty("截止时间")
|
||||||
private Date deadline;
|
private String deadline;
|
||||||
|
|
||||||
@ApiModelProperty("招商经理")
|
@ApiModelProperty("招商经理")
|
||||||
private String investmentManager;
|
private String investmentManager;
|
||||||
@@ -52,11 +59,14 @@ public class PrivateSeaLineListVo {
|
|||||||
@ApiModelProperty("意向开店区域")
|
@ApiModelProperty("意向开店区域")
|
||||||
private String wantShopArea;
|
private String wantShopArea;
|
||||||
|
|
||||||
|
@ApiModelProperty("意向开店区域名称")
|
||||||
|
private String wantShopAreaName;
|
||||||
|
|
||||||
@ApiModelProperty("0不接受调剂、1全国调剂、2省内调剂、3市内调剂")
|
@ApiModelProperty("0不接受调剂、1全国调剂、2省内调剂、3市内调剂")
|
||||||
private Integer acceptAdjustType;
|
private Integer acceptAdjustType;
|
||||||
|
|
||||||
@ApiModelProperty("更新时间")
|
@ApiModelProperty("更新时间")
|
||||||
private Date updateTime;
|
private String updateTime;
|
||||||
|
|
||||||
@ApiModelProperty("门店编码")
|
@ApiModelProperty("门店编码")
|
||||||
private String storeCode;
|
private String storeCode;
|
||||||
@@ -73,4 +83,40 @@ public class PrivateSeaLineListVo {
|
|||||||
@ApiModelProperty("推荐加盟商名称")
|
@ApiModelProperty("推荐加盟商名称")
|
||||||
private String recommendPartnerName;
|
private String recommendPartnerName;
|
||||||
|
|
||||||
|
|
||||||
|
public static List<PrivateSeaLineListVo> convertList(List<PrivateSeaLineDTO> list, Map<String, String> finalDevManagerMap, Map<Long, String> wantShopAreaNameMap){
|
||||||
|
List<PrivateSeaLineListVo> resultList = new ArrayList<>();
|
||||||
|
for (PrivateSeaLineDTO x : list) {
|
||||||
|
PrivateSeaLineListVo privateSeaLineListVo = new PrivateSeaLineListVo();
|
||||||
|
privateSeaLineListVo.setLineId(x.getLineId());
|
||||||
|
privateSeaLineListVo.setLineStatus(x.getLineStatus());
|
||||||
|
privateSeaLineListVo.setPartnerId(x.getPartnerId());
|
||||||
|
privateSeaLineListVo.setWorkflowStatus(x.getWorkflowStatus());
|
||||||
|
String deadLine = DateUtil.format(x.getDeadline(), CoolDateUtils.DATE_FORMAT_SEC);
|
||||||
|
privateSeaLineListVo.setDeadline(deadLine);
|
||||||
|
privateSeaLineListVo.setPartnerUserPhone(x.getPartnerUserPhone());
|
||||||
|
privateSeaLineListVo.setPartnerUserName(x.getPartnerUserName());
|
||||||
|
privateSeaLineListVo.setAcceptAdjustType(x.getAcceptAdjustType());
|
||||||
|
privateSeaLineListVo.setInvestmentManagerName(x.getInvestmentManager());
|
||||||
|
privateSeaLineListVo.setDevelopmentManager(x.getDevelopmentManager());
|
||||||
|
privateSeaLineListVo.setInvestmentManagerName(x.getInvestmentManagerName());
|
||||||
|
privateSeaLineListVo.setStoreCode(x.getStoreCode());
|
||||||
|
privateSeaLineListVo.setStoreName(x.getStoreName());
|
||||||
|
String updateTime = DateUtil.format(x.getUpdateTime(), CoolDateUtils.DATE_FORMAT_SEC);
|
||||||
|
privateSeaLineListVo.setUpdateTime(updateTime);
|
||||||
|
privateSeaLineListVo.setRecommendPartnerId(x.getRecommendPartnerId());
|
||||||
|
privateSeaLineListVo.setAcceptAdjustType(x.getAcceptAdjustType());
|
||||||
|
privateSeaLineListVo.setWantShopArea(x.getWantShopArea());
|
||||||
|
privateSeaLineListVo.setWantShopAreaName(wantShopAreaNameMap.get(x.getWantShopArea()));
|
||||||
|
privateSeaLineListVo.setInvestmentManager(x.getInvestmentManager());
|
||||||
|
privateSeaLineListVo.setRecommendPartnerName(x.getRecommendPartnerName());
|
||||||
|
privateSeaLineListVo.setWorkflowStage(x.getWorkflowStage());
|
||||||
|
privateSeaLineListVo.setWantShopArea(x.getWantShopArea());
|
||||||
|
privateSeaLineListVo.setWorkflowStage(x.getWorkflowStage());
|
||||||
|
privateSeaLineListVo.setDevelopmentManagerName(finalDevManagerMap.get(x.getDevelopmentManager()));
|
||||||
|
resultList.add(privateSeaLineListVo);
|
||||||
|
}
|
||||||
|
return resultList;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ public class PublicSeaLineListVo {
|
|||||||
private String rejectRealReason;
|
private String rejectRealReason;
|
||||||
|
|
||||||
@ApiModelProperty("返回公海时间")
|
@ApiModelProperty("返回公海时间")
|
||||||
private Date LastCloseDate ;
|
private String LastCloseDate ;
|
||||||
|
|
||||||
@ApiModelProperty("招商经理")
|
@ApiModelProperty("招商经理")
|
||||||
private String lastInvestmentManager;
|
private String lastInvestmentManager;
|
||||||
|
|||||||
@@ -287,8 +287,8 @@ public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService {
|
|||||||
List<HyPartnerLineInfoDO> partnerLastLine = hyPartnerLineInfoDAO.getPartnerLastLine(partnerIdList);
|
List<HyPartnerLineInfoDO> partnerLastLine = hyPartnerLineInfoDAO.getPartnerLastLine(partnerIdList);
|
||||||
List<String> investmentManagerIds = partnerLastLine.stream().map(HyPartnerLineInfoDO::getInvestmentManager).collect(Collectors.toList());
|
List<String> investmentManagerIds = partnerLastLine.stream().map(HyPartnerLineInfoDO::getInvestmentManager).collect(Collectors.toList());
|
||||||
List<EnterpriseUserDO> userInfoList = enterpriseUserDAO.getUserInfoByUserIds(investmentManagerIds);
|
List<EnterpriseUserDO> userInfoList = enterpriseUserDAO.getUserInfoByUserIds(investmentManagerIds);
|
||||||
Map<String, String> mobileMap = userInfoList.stream().filter(x ->
|
Map<String, String> nameMobileMap = userInfoList.stream().filter(x ->
|
||||||
StringUtil.isNotEmpty(x.getMobile())).collect(Collectors.toMap(EnterpriseUserDO::getUserId, EnterpriseUserDO::getMobile));
|
StringUtil.isNotEmpty(x.getMobile())).collect(Collectors.toMap(EnterpriseUserDO::getUserId, v-> v.getName() + " "+ v.getMobile()));
|
||||||
Map<String, HyPartnerLineInfoDO> hyPartnerLineInfoDOMap = partnerLastLine.stream().collect(Collectors.toMap(HyPartnerLineInfoDO::getPartnerId, data -> data));
|
Map<String, HyPartnerLineInfoDO> hyPartnerLineInfoDOMap = partnerLastLine.stream().collect(Collectors.toMap(HyPartnerLineInfoDO::getPartnerId, data -> data));
|
||||||
|
|
||||||
List<LineCountDTO> followCountList = hyPartnerLineInfoDAO.getFollowCountList(partnerIdList);
|
List<LineCountDTO> followCountList = hyPartnerLineInfoDAO.getFollowCountList(partnerIdList);
|
||||||
@@ -297,7 +297,6 @@ public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService {
|
|||||||
List<PublicSeaLineListVo> result = new ArrayList<>();
|
List<PublicSeaLineListVo> result = new ArrayList<>();
|
||||||
list.forEach(x->{
|
list.forEach(x->{
|
||||||
PublicSeaLineListVo publicSeaLineListVo = new PublicSeaLineListVo();
|
PublicSeaLineListVo publicSeaLineListVo = new PublicSeaLineListVo();
|
||||||
|
|
||||||
publicSeaLineListVo.setPartnerId(x.getPartnerId());
|
publicSeaLineListVo.setPartnerId(x.getPartnerId());
|
||||||
publicSeaLineListVo.setCreateTime(DateUtil.format(x.getCreateTime(),CoolDateUtils.DATE_FORMAT_SEC));
|
publicSeaLineListVo.setCreateTime(DateUtil.format(x.getCreateTime(),CoolDateUtils.DATE_FORMAT_SEC));
|
||||||
publicSeaLineListVo.setPartnerUserName(x.getUserName());
|
publicSeaLineListVo.setPartnerUserName(x.getUserName());
|
||||||
@@ -308,13 +307,12 @@ public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService {
|
|||||||
publicSeaLineListVo.setId(x.getLineId());
|
publicSeaLineListVo.setId(x.getLineId());
|
||||||
publicSeaLineListVo.setAcceptAdjustType(x.getAcceptAdjustType());
|
publicSeaLineListVo.setAcceptAdjustType(x.getAcceptAdjustType());
|
||||||
publicSeaLineListVo.setFollowCount(countMap.getOrDefault(x.getPartnerId(),0));
|
publicSeaLineListVo.setFollowCount(countMap.getOrDefault(x.getPartnerId(),0));
|
||||||
|
|
||||||
HyPartnerLineInfoDO hy = hyPartnerLineInfoDOMap.getOrDefault(x.getPartnerId(), new HyPartnerLineInfoDO());
|
HyPartnerLineInfoDO hy = hyPartnerLineInfoDOMap.getOrDefault(x.getPartnerId(), new HyPartnerLineInfoDO());
|
||||||
publicSeaLineListVo.setRejectPublicReason(hy.getRejectPublicReason());
|
publicSeaLineListVo.setRejectPublicReason(hy.getRejectPublicReason());
|
||||||
publicSeaLineListVo.setRejectRealReason(hy.getRejectRealReason());
|
publicSeaLineListVo.setRejectRealReason(hy.getRejectRealReason());
|
||||||
publicSeaLineListVo.setLastCloseDate(hy.getCloseTime());
|
String closeTime = DateUtil.format(hy.getCloseTime(), CoolDateUtils.DATE_FORMAT_SEC);
|
||||||
publicSeaLineListVo.setLastInvestmentManager(hy.getInvestmentManager());
|
publicSeaLineListVo.setLastCloseDate(closeTime);
|
||||||
publicSeaLineListVo.setLastInvestmentManager(mobileMap.get(hy.getInvestmentManager()));
|
publicSeaLineListVo.setLastInvestmentManager(nameMobileMap.get(hy.getInvestmentManager()));
|
||||||
result.add(publicSeaLineListVo);
|
result.add(publicSeaLineListVo);
|
||||||
});
|
});
|
||||||
publicSeaLineList.setList(result);
|
publicSeaLineList.setList(result);
|
||||||
@@ -341,37 +339,9 @@ public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService {
|
|||||||
List<EnterpriseUserDO> devManagerList = enterpriseUserDAO.getUserInfoByUserIds(devManagerIdList);
|
List<EnterpriseUserDO> devManagerList = enterpriseUserDAO.getUserInfoByUserIds(devManagerIdList);
|
||||||
devManagerMap = devManagerList.stream().collect(Collectors.toMap(EnterpriseUserDO::getUserId, EnterpriseUserDO::getName));
|
devManagerMap = devManagerList.stream().collect(Collectors.toMap(EnterpriseUserDO::getUserId, EnterpriseUserDO::getName));
|
||||||
}
|
}
|
||||||
List<PrivateSeaLineListVo> result = new ArrayList<>();
|
List<Long> wantShopAreaList = list.stream().map(PrivateSeaLineDTO::getWantShopArea).map(Long::parseLong).distinct().collect(Collectors.toList());
|
||||||
|
Map<Long, String> wantShopAreaNameMap = hyOpenAreaInfoDAO.selectNameMapByIds(wantShopAreaList);
|
||||||
Map<String, String> finalDevManagerMap = devManagerMap;
|
List<PrivateSeaLineListVo> result = PrivateSeaLineListVo.convertList(list, devManagerMap, wantShopAreaNameMap);
|
||||||
list.forEach(x->{
|
|
||||||
PrivateSeaLineListVo privateSeaLineListVo = new PrivateSeaLineListVo();
|
|
||||||
privateSeaLineListVo.setLineId(x.getLineId());
|
|
||||||
privateSeaLineListVo.setLineStatus(x.getLineStatus());
|
|
||||||
privateSeaLineListVo.setPartnerId(x.getPartnerId());
|
|
||||||
privateSeaLineListVo.setWorkflowStatus(x.getWorkflowStatus());
|
|
||||||
privateSeaLineListVo.setDeadline(x.getDeadline());
|
|
||||||
privateSeaLineListVo.setPartnerUserPhone(x.getPartnerUserPhone());
|
|
||||||
privateSeaLineListVo.setPartnerUserName(x.getPartnerUserName());
|
|
||||||
privateSeaLineListVo.setAcceptAdjustType(x.getAcceptAdjustType());
|
|
||||||
privateSeaLineListVo.setInvestmentManagerName(x.getInvestmentManager());
|
|
||||||
privateSeaLineListVo.setDevelopmentManager(x.getDevelopmentManager());
|
|
||||||
privateSeaLineListVo.setInvestmentManagerName(x.getInvestmentManagerName());
|
|
||||||
privateSeaLineListVo.setStoreCode(x.getStoreCode());
|
|
||||||
privateSeaLineListVo.setStoreName(x.getStoreName());
|
|
||||||
privateSeaLineListVo.setUpdateTime(x.getUpdateTime());
|
|
||||||
privateSeaLineListVo.setDeadline(x.getDeadline());
|
|
||||||
privateSeaLineListVo.setRecommendPartnerId(x.getRecommendPartnerId());
|
|
||||||
privateSeaLineListVo.setAcceptAdjustType(x.getAcceptAdjustType());
|
|
||||||
privateSeaLineListVo.setWantShopArea(x.getWantShopArea());
|
|
||||||
privateSeaLineListVo.setInvestmentManager(x.getInvestmentManager());
|
|
||||||
privateSeaLineListVo.setRecommendPartnerName(x.getRecommendPartnerName());
|
|
||||||
privateSeaLineListVo.setWorkflowStage(x.getWorkflowStage());
|
|
||||||
privateSeaLineListVo.setWantShopArea(x.getWantShopArea());
|
|
||||||
privateSeaLineListVo.setWorkflowStage(x.getWorkflowStage());
|
|
||||||
privateSeaLineListVo.setDevelopmentManagerName(finalDevManagerMap.get(x.getDevelopmentManager()));
|
|
||||||
result.add(privateSeaLineListVo);
|
|
||||||
});
|
|
||||||
privateLineList.setList(result);
|
privateLineList.setList(result);
|
||||||
return privateLineList;
|
return privateLineList;
|
||||||
}
|
}
|
||||||
@@ -473,8 +443,10 @@ public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService {
|
|||||||
blackListVO.setPartnerId(partnerBlackListDTO.getPartnerId());
|
blackListVO.setPartnerId(partnerBlackListDTO.getPartnerId());
|
||||||
blackListVO.setPartnerUserName(partnerBlackListDTO.getPartnerUserName());
|
blackListVO.setPartnerUserName(partnerBlackListDTO.getPartnerUserName());
|
||||||
blackListVO.setPartnerUserPhone(partnerBlackListDTO.getMobile());
|
blackListVO.setPartnerUserPhone(partnerBlackListDTO.getMobile());
|
||||||
blackListVO.setCreateTime(partnerBlackListDTO.getCreateTime());
|
String createTime = DateUtil.format(partnerBlackListDTO.getCreateTime(), CoolDateUtils.DATE_FORMAT_SEC);
|
||||||
blackListVO.setCloseTime(partnerBlackListDTO.getCloseTime());
|
String closeTime = DateUtil.format(partnerBlackListDTO.getCloseTime(), CoolDateUtils.DATE_FORMAT_SEC);
|
||||||
|
blackListVO.setCreateTime(createTime);
|
||||||
|
blackListVO.setCloseTime(closeTime);
|
||||||
blackListVO.setJoinBlackReason(partnerBlackListDTO.getJoinBlackReason());
|
blackListVO.setJoinBlackReason(partnerBlackListDTO.getJoinBlackReason());
|
||||||
blackListVO.setCloseUserId(partnerBlackListDTO.getCloseUserId());
|
blackListVO.setCloseUserId(partnerBlackListDTO.getCloseUserId());
|
||||||
blackListVO.setCloseUserPhone(partnerBlackListDTO.getCloseUserId());
|
blackListVO.setCloseUserPhone(partnerBlackListDTO.getCloseUserId());
|
||||||
|
|||||||
@@ -79,7 +79,6 @@ public class TokenValidateFilter implements Filter {
|
|||||||
LoginUserInfo currentUser = null;
|
LoginUserInfo currentUser = null;
|
||||||
boolean isInWhiteList = excludePath(uri);
|
boolean isInWhiteList = excludePath(uri);
|
||||||
String accessToken = reqs.getHeader("accessToken");
|
String accessToken = reqs.getHeader("accessToken");
|
||||||
//String accessToken = "1cd17699b7dc1f64161485c2d365e0e0";
|
|
||||||
String key = "access_token:" + accessToken;
|
String key = "access_token:" + accessToken;
|
||||||
if(StringUtils.isNotBlank(accessToken)){
|
if(StringUtils.isNotBlank(accessToken)){
|
||||||
userStr = redisUtilPool.getString(key);
|
userStr = redisUtilPool.getString(key);
|
||||||
|
|||||||
Reference in New Issue
Block a user