2
sunshine
2024-11-05 d1f9fb55a136e589a5ad588ed9a93ce9272917da
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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;
    }
}