liujie
2026-08-21 a7c8a8f6055e1a03414f2227d12ff2e87ec52d41
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
package com.tourguide.modules.order.dto;
 
import com.tourguide.modules.order.entity.TourOrder;
 
import java.math.BigDecimal;
import java.time.LocalDateTime;
 
/** 导游单笔订单业绩明细。 */
public class GuideEarningItemResponse {
    private final Long id;
    private final String orderNo;
    private final String scenicName;
    private final String serviceName;
    private final String orderType;
    private final BigDecimal orderAmount;
    private final BigDecimal commissionRate;
    private final BigDecimal earningAmount;
    private final LocalDateTime completedAt;
 
    public GuideEarningItemResponse(TourOrder order) {
        this.id = order.getId();
        this.orderNo = order.getOrderNo();
        this.scenicName = order.getScenicName();
        this.serviceName = order.getPackageName();
        this.orderType = order.getOrderType();
        this.orderAmount = order.getPaymentAmount() == null ? order.getAmount() : order.getPaymentAmount();
        this.commissionRate = order.getCommissionRate();
        this.earningAmount = order.getGuideEarningAmount();
        this.completedAt = order.getCompletedAt();
    }
 
    public Long getId() { return id; }
    public String getOrderNo() { return orderNo; }
    public String getScenicName() { return scenicName; }
    public String getServiceName() { return serviceName; }
    public String getOrderType() { return orderType; }
    public BigDecimal getOrderAmount() { return orderAmount; }
    public BigDecimal getCommissionRate() { return commissionRate; }
    public BigDecimal getEarningAmount() { return earningAmount; }
    public LocalDateTime getCompletedAt() { return completedAt; }
}