This commit is contained in:
zhangchenbiao
2024-04-09 19:08:04 +08:00
parent 902905e2ea
commit 8d84f8f47e
10 changed files with 87 additions and 18 deletions

View File

@@ -14,6 +14,7 @@ import javax.validation.constraints.NotNull;
@Data
public class AppointmentTimeRequest {
@NotNull
@ApiModelProperty("线索id")
private Long lineId;

View File

@@ -18,7 +18,7 @@ import java.util.stream.Collectors;
* @date 2024-04-08 16:50
*/
@Data
public class RecommendPointRequest {
public class LineRecommendPointRequest {
@ApiModelProperty("线索id")
private Long lineId;

View File

@@ -0,0 +1,46 @@
package com.cool.store.request;
import com.cool.store.entity.PointRecommendDO;
import com.cool.store.enums.point.PointRecommendStatus;
import com.google.common.collect.Lists;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.commons.collections4.CollectionUtils;
import java.util.List;
import java.util.Objects;
import java.util.stream.Collectors;
/**
* @author zhangchenbiao
* @FileName: RecommendPointRequest
* @Description:
* @date 2024-04-08 16:50
*/
@Data
public class PointRecommendLineRequest {
@ApiModelProperty("线索ids")
private List<Long> lineIds;
@ApiModelProperty("铺位id")
private Long pointId;
@ApiModelProperty(value = "拓展经理", hidden = true)
private String developmentManager;
public List<PointRecommendDO> convertList(){
if(Objects.isNull(this.lineIds) || CollectionUtils.isEmpty(this.lineIds) || Objects.isNull(pointId)){
return Lists.newArrayList();
}
return this.lineIds.stream().map(lineId -> {
PointRecommendDO pointRecommendDO = new PointRecommendDO();
pointRecommendDO.setLineId(lineId);
pointRecommendDO.setDevelopmentManager(this.developmentManager);
pointRecommendDO.setPointId(pointId);
pointRecommendDO.setStatus(PointRecommendStatus.POINT_RECOMMEND_STATUS_1.getCode());
return pointRecommendDO;
}).collect(Collectors.toList());
}
}