package com.nova.sankuai.domain.vo.customer;
|
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModelProperty;
|
import lombok.Data;
|
|
import java.util.HashMap;
|
import java.util.List;
|
import java.util.Map;
|
|
/**
|
* @author weikangdi
|
* @create 2021/11/11
|
*/
|
@Data
|
@ApiModel("累计客户数量VO")
|
public class CustomerCountVo {
|
|
@ApiModelProperty(value = "机构Id")
|
@JsonFormat(shape = JsonFormat.Shape.STRING)
|
private Long MechanismId;
|
|
@ApiModelProperty(value = "累计客户数量")
|
private Integer count;
|
|
public static Map<Long, Integer> parseMap(List<CustomerCountVo> countVos) {
|
Map<Long, Integer> map = new HashMap<>();
|
for (CustomerCountVo countVo : countVos) {
|
if (countVo != null && countVo.getMechanismId() != null) {
|
map.put(countVo.getMechanismId(), countVo.getCount());
|
}
|
}
|
return map;
|
}
|
}
|