feat:V2.4

This commit is contained in:
苏竹红
2025-01-10 19:02:16 +08:00
parent 81b135bba6
commit 5d2afdf9c5
36 changed files with 702 additions and 322 deletions

View File

@@ -0,0 +1,23 @@
package com.cool.store.dto.point;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @Author suzhuhong
* @Date 2025/1/8 15:41
* @Version 1.0
*/
@Data
public class ShopCountDTO {
@ApiModelProperty("门店ID")
private Long shopId;
@ApiModelProperty("推荐门店数量")
private Integer recommendShopNum;
@ApiModelProperty("选择门店数量")
private Integer selectedShopNum;
}

View File

@@ -0,0 +1,31 @@
package com.cool.store.dto.point;
import lombok.Data;
/**
* @Author suzhuhong
* @Date 2025/1/8 15:12
* @Version 1.0
*/
@Data
public class ShopPointDTO {
private Long shopId;
private Long lineId;
private Long pointId;
private String userName;
private String mobile;
private String shopName;
private Long wantShopAreaId;
private String userPortrait;
private String investmentManager;
}

View File

@@ -18,6 +18,9 @@ public class PointRecommendDO {
@Column(name = "line_id")
private Long lineId;
@Column(name = "shop_id")
private Long shopId;
/**
* 点位id
*/

View File

@@ -20,8 +20,8 @@ import java.util.stream.Collectors;
@Data
public class LineRecommendPointRequest {
@ApiModelProperty("线索id")
private Long lineId;
@ApiModelProperty("门店ID")
private Long shopId;
@ApiModelProperty("铺位ids")
private List<Long> pointIds;
@@ -30,12 +30,12 @@ public class LineRecommendPointRequest {
private String developmentManager;
public List<PointRecommendDO> convertList(){
if(Objects.isNull(this.lineId) || CollectionUtils.isEmpty(pointIds)){
if(Objects.isNull(this.shopId) || CollectionUtils.isEmpty(pointIds)){
return Lists.newArrayList();
}
return this.pointIds.stream().map(pointId -> {
PointRecommendDO pointRecommendDO = new PointRecommendDO();
pointRecommendDO.setLineId(this.lineId);
pointRecommendDO.setShopId(this.shopId);
pointRecommendDO.setDevelopmentManager(this.developmentManager);
pointRecommendDO.setPointId(pointId);
pointRecommendDO.setStatus(PointRecommendStatusEnum.POINT_RECOMMEND_STATUS_1.getCode());

View File

@@ -21,7 +21,7 @@ public class MiniPointPageRequest extends PageBasicInfo {
@ApiModelProperty("1.待选择 2.已选择 3.拒绝/失效")
private Integer status;
@ApiModelProperty(value = "线索id")
private Long lineId;
@ApiModelProperty(value = "门店线索ID")
private Long shopId;
}

View File

@@ -21,7 +21,7 @@ import java.util.stream.Collectors;
public class PointRecommendLineRequest {
@ApiModelProperty("线索ids")
private List<Long> lineIds;
private List<Long> shopIds;
@ApiModelProperty("铺位id")
private Long pointId;
@@ -30,12 +30,12 @@ public class PointRecommendLineRequest {
private String developmentManager;
public List<PointRecommendDO> convertList(){
if(Objects.isNull(this.lineIds) || CollectionUtils.isEmpty(this.lineIds) || Objects.isNull(pointId)){
if(Objects.isNull(this.shopIds) || CollectionUtils.isEmpty(this.shopIds) || Objects.isNull(pointId)){
return Lists.newArrayList();
}
return this.lineIds.stream().map(lineId -> {
return this.shopIds.stream().map(shopIds -> {
PointRecommendDO pointRecommendDO = new PointRecommendDO();
pointRecommendDO.setLineId(lineId);
pointRecommendDO.setLineId(shopIds);
pointRecommendDO.setDevelopmentManager(this.developmentManager);
pointRecommendDO.setPointId(pointId);
pointRecommendDO.setStatus(PointRecommendStatusEnum.POINT_RECOMMEND_STATUS_1.getCode());

View File

@@ -23,8 +23,8 @@ public class RejectPointRequest {
@ApiModelProperty("拒绝原因")
private String reason;
@ApiModelProperty(value = "当前线索id", hidden = true)
private Long lineId;
@ApiModelProperty(value = "门店Id")
private Long shopId;

View File

@@ -12,8 +12,8 @@ import lombok.Data;
@Data
public class TurnLineRequest {
@ApiModelProperty("线索id")
private Long lineId;
@ApiModelProperty("门店ID")
private Long shopId;
@ApiModelProperty("新的选址人员")
private String developmentManager;

View File

@@ -41,7 +41,7 @@ public class MiniPointPageVO {
@ApiModelProperty("1.待选择 2.已选择 3.已被他人选择 4.已签约 5.已拒绝 6.已失效")
private Integer recommendStatus;
public static List<MiniPointPageVO> convertVO(List<MiniPointPageDTO> pointList, Map<Long, String> regionNameMap, Long curLineId) {
public static List<MiniPointPageVO> convertVO(List<MiniPointPageDTO> pointList, Map<Long, String> regionNameMap) {
if(CollectionUtils.isEmpty(pointList)){
return Lists.newArrayList();
}

View File

@@ -0,0 +1,119 @@
package com.cool.store.vo.shop;
import com.cool.store.constants.CommonConstants;
import com.cool.store.dto.point.ShopPointDTO;
import com.cool.store.entity.HyOpenAreaInfoDO;
import com.cool.store.entity.LineInfoDO;
import com.cool.store.vo.LinePointBaseInfoVO;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.commons.lang3.StringUtils;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Objects;
/**
* @Author suzhuhong
* @Date 2025/1/8 14:59
* @Version 1.0
*/
@Data
public class ShopPointBaseInfoVO {
@ApiModelProperty("门店ID")
private Long shopId;
@ApiModelProperty("门店名称")
private String shopName;
@ApiModelProperty("手机号")
private String mobile;
@ApiModelProperty("区域名称")
private String areaName;
@ApiModelProperty("区域路径")
private String areaPath;
@ApiModelProperty("用户标签")
private List<String> userPortraitList;
@ApiModelProperty("招商经理")
private String investmentManagerUsername;
@ApiModelProperty("已推门店")
private Integer recommendShopNum;
@ApiModelProperty("已选门店")
private Integer selectedShopNum;
public ShopPointBaseInfoVO(Long shopId, String shopName, String mobile) {
this.shopId = shopId;
this.shopName = shopName;
this.mobile = mobile;
}
public static List<ShopPointBaseInfoVO> convertList(List<ShopPointDTO> lineList, Map<String, String> userNameMap, Map<Long, String> userPortraitMap, Map<Long, HyOpenAreaInfoDO> cityMap, Map<Long, Integer> recommendShopNumMap){
List<ShopPointBaseInfoVO> resultList = new ArrayList<>();
for (ShopPointDTO shopPointDTO : lineList) {
ShopPointBaseInfoVO shopPointBaseInfoVO = new ShopPointBaseInfoVO(shopPointDTO.getShopId(), shopPointDTO.getShopName(), shopPointDTO.getMobile());
String username = userNameMap.get(shopPointDTO.getInvestmentManager());
shopPointBaseInfoVO.setInvestmentManagerUsername(username);
HyOpenAreaInfoDO areaInfo = cityMap.get(shopPointDTO.getWantShopAreaId());
if(Objects.nonNull(areaInfo)){
shopPointBaseInfoVO.setAreaName(areaInfo.getAreaName());
shopPointBaseInfoVO.setAreaPath(areaInfo.getAreaPath().replace("/", "").trim());
}
shopPointBaseInfoVO.setRecommendShopNum(recommendShopNumMap.get(shopPointDTO.getShopId()));
shopPointBaseInfoVO.setSelectedShopNum((shopPointDTO.getPointId()!=null&&shopPointDTO.getPointId()> CommonConstants.ZERO)?CommonConstants.ONE:CommonConstants.ZERO);
if(StringUtils.isNotBlank(shopPointDTO.getUserPortrait())){
List<String> userPortraitList = new ArrayList<>();
String[] parts = shopPointDTO.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);
}
}
}
shopPointBaseInfoVO.setUserPortraitList(userPortraitList);
}
resultList.add(shopPointBaseInfoVO);
}
return resultList;
}
public static ShopPointBaseInfoVO convert(LineInfoDO lineInfo, String username, Map<Long, String> userPortraitMap, HyOpenAreaInfoDO cityArea, Map<Long, Integer> recommendShopNumMap, Map<Long, Integer> selectedShopNumMap){
ShopPointBaseInfoVO linePointBaseInfo = new ShopPointBaseInfoVO(lineInfo.getId(), lineInfo.getUsername(), lineInfo.getMobile());
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;
}
}