liujie
2026-07-29 c560a88ab429cd164d8eb6fcec42a273b898e230
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
package com.tourguide.modules.user.dto;
 
import com.tourguide.modules.user.entity.GuideTeam;
import com.tourguide.modules.user.entity.GuideTeamScenicConfig;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Collections;
import java.util.List;
import java.util.stream.Collectors;
 
public class GuideTeamResponse {
    private Long id;
    private String teamName;
    private String contactPhone;
    private String operatingArea;
    private String companyName;
    private String unifiedSocialCreditCode;
    private BigDecimal commissionRatio;
    private String wechatOpenId;
    private String merchantId;
    private Integer status;
    private LocalDateTime createdAt;
    private LocalDateTime updatedAt;
    private List<GuideTeamScenicResponse> scenicConfigs;
 
    public static GuideTeamResponse from(GuideTeam team) {
        return from(team, Collections.<GuideTeamScenicConfig>emptyList());
    }
 
    public static GuideTeamResponse from(GuideTeam team, List<GuideTeamScenicConfig> scenicConfigs) {
        GuideTeamResponse response = new GuideTeamResponse();
        response.id = team.getId();
        response.teamName = team.getTeamName();
        response.contactPhone = team.getContactPhone();
        response.operatingArea = team.getOperatingArea();
        response.companyName = team.getCompanyName();
        response.unifiedSocialCreditCode = team.getUnifiedSocialCreditCode();
        response.commissionRatio = team.getCommissionRatio();
        response.wechatOpenId = team.getWechatOpenId();
        response.merchantId = team.getMerchantId();
        response.status = team.getStatus();
        response.createdAt = team.getCreatedAt();
        response.updatedAt = team.getUpdatedAt();
        response.scenicConfigs = scenicConfigs.stream()
                .map(GuideTeamScenicResponse::from)
                .collect(Collectors.toList());
        return response;
    }
 
    public Long getId() { return id; }
    public String getTeamName() { return teamName; }
    public String getContactPhone() { return contactPhone; }
    public String getOperatingArea() { return operatingArea; }
    public String getCompanyName() { return companyName; }
    public String getUnifiedSocialCreditCode() { return unifiedSocialCreditCode; }
    public BigDecimal getCommissionRatio() { return commissionRatio; }
    public String getWechatOpenId() { return wechatOpenId; }
    public String getMerchantId() { return merchantId; }
    public Integer getStatus() { return status; }
    public LocalDateTime getCreatedAt() { return createdAt; }
    public LocalDateTime getUpdatedAt() { return updatedAt; }
    public List<GuideTeamScenicResponse> getScenicConfigs() { return scenicConfigs; }
}