新增待办

This commit is contained in:
zhangchenbiao
2024-04-22 17:07:25 +08:00
parent 1c6e49ebb8
commit 3f38c940e1
20 changed files with 383 additions and 6 deletions

View File

@@ -3,8 +3,9 @@ package com.cool.store.request;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.List;
/**
* @author zhangchenbiao
@@ -19,4 +20,8 @@ public class AddShopRequest {
@ApiModelProperty("线索id")
private Long lineId;
@NotEmpty
@ApiModelProperty("店铺名称")
private List<String> shopNameList;
}

View File

@@ -0,0 +1,56 @@
package com.cool.store.vo.point;
import com.cool.store.entity.PointInfoDO;
import com.cool.store.enums.point.PointStatusEnum;
import com.google.common.collect.Lists;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.commons.collections4.CollectionUtils;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;
/**
* @author zhangchenbiao
* @FileName: PointToDoVO
* @Description:
* @date 2024-04-22 14:56
*/
@Data
public class PointToDoVO {
@ApiModelProperty("铺位id")
private Long pointId;
@ApiModelProperty("铺位名称")
private String pointName;
@ApiModelProperty("详细地址")
private String address;
@ApiModelProperty("所属大区")
private String regionNodeName;
@ApiModelProperty("提交时间")
private Date submitTime;
public static List<PointToDoVO> convertVO(List<PointInfoDO> pointList, Map<Long, String> regionNameMap, Map<Long, Date> submitTimeMap) {
if(CollectionUtils.isEmpty(pointList)){
return Lists.newArrayList();
}
List<PointToDoVO> resultList = new ArrayList<>();
for (PointInfoDO pointInfo : pointList) {
PointToDoVO pointPageVO = new PointToDoVO();
pointPageVO.setPointId(pointInfo.getId());
pointPageVO.setPointName(pointInfo.getPointName());
pointPageVO.setRegionNodeName(regionNameMap.get(pointInfo.getRegionId()));
pointPageVO.setAddress(pointInfo.getAddress());
pointPageVO.setSubmitTime(submitTimeMap.get(pointInfo.getId()));
resultList.add(pointPageVO);
}
return resultList;
}
}

View File

@@ -0,0 +1,67 @@
package com.cool.store.vo.shop;
import com.cool.store.entity.PointInfoDO;
import com.google.common.collect.Lists;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.commons.collections4.CollectionUtils;
import java.util.*;
/**
* @author zhangchenbiao
* @FileName: PointToDoVO
* @Description:
* @date 2024-04-22 14:56
*/
@Data
public class RentInfoToDoVO {
@ApiModelProperty("线索id")
private Long lineId;
@ApiModelProperty("加盟商名称")
private String lineUsername;
@ApiModelProperty("电话号码")
private String lineMobile;
@ApiModelProperty("铺位id")
private Long pointId;
@ApiModelProperty("店铺id")
private Long shopId;
@ApiModelProperty("店铺名称")
private String pointName;
@ApiModelProperty("详细地址")
private String address;
@ApiModelProperty("所属大区")
private String regionNodeName;
@ApiModelProperty("提交时间")
private Date submitTime;
public static List<RentInfoToDoVO> convert(List<RentInfoToDoVO> list, Map<Long, Long> shopPointMap, Map<Long, PointInfoDO> pointMap, Map<Long, String> regionNameMap, Map<Long, Date> rentContractSubmitTimeMap){
if(CollectionUtils.isEmpty(list)){
return Lists.newArrayList();
}
List<RentInfoToDoVO> resultList = new ArrayList<>();
for (RentInfoToDoVO rent : list) {
Long pointId = shopPointMap.get(rent.getShopId());
rent.setPointId(pointId);
PointInfoDO pointInfo = pointMap.get(pointId);
if(Objects.nonNull(pointInfo)){
rent.setPointName(pointInfo.getPointName());
rent.setAddress(pointInfo.getAddress());
}
rent.setRegionNodeName(regionNameMap.get(pointInfo.getRegionId()));
rent.setSubmitTime(rentContractSubmitTimeMap.get(rent.getShopId()));
resultList.add(rent);
}
return resultList;
}
}