liujie
2026-09-16 a3a56121a476cd23d0f29bc391c07374dc5008f2
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
64
65
66
67
68
69
70
71
72
package com.tourguide.modules.dashboard.dto;
 
import java.math.BigDecimal;
import java.util.List;
 
public class DashboardResponse {
    private final long userCount;
    private final long orderCount;
    private final long reviewCount;
    private final BigDecimal dailyOrderGrowth;
    private final BigDecimal totalRevenue;
    private final List<TrendPoint> revenueTrend;
    private final List<ScenicRank> scenicRanking;
    private final List<OrderTypeStat> orderTypeStats;
 
    public DashboardResponse(long userCount, long orderCount, long reviewCount,
                             BigDecimal dailyOrderGrowth, BigDecimal totalRevenue,
                             List<TrendPoint> revenueTrend, List<ScenicRank> scenicRanking,
                             List<OrderTypeStat> orderTypeStats) {
        this.userCount = userCount;
        this.orderCount = orderCount;
        this.reviewCount = reviewCount;
        this.dailyOrderGrowth = dailyOrderGrowth;
        this.totalRevenue = totalRevenue;
        this.revenueTrend = revenueTrend;
        this.scenicRanking = scenicRanking;
        this.orderTypeStats = orderTypeStats;
    }
 
    public long getUserCount() { return userCount; }
    public long getOrderCount() { return orderCount; }
    public long getReviewCount() { return reviewCount; }
    public BigDecimal getDailyOrderGrowth() { return dailyOrderGrowth; }
    public BigDecimal getTotalRevenue() { return totalRevenue; }
    public List<TrendPoint> getRevenueTrend() { return revenueTrend; }
    public List<ScenicRank> getScenicRanking() { return scenicRanking; }
    public List<OrderTypeStat> getOrderTypeStats() { return orderTypeStats; }
 
    public static class TrendPoint {
        private final String dateLabel;
        private final BigDecimal revenue;
        public TrendPoint(String dateLabel, BigDecimal revenue) { this.dateLabel = dateLabel; this.revenue = revenue; }
        public String getDateLabel() { return dateLabel; }
        public BigDecimal getRevenue() { return revenue; }
    }
 
    public static class ScenicRank {
        private final int rank;
        private final String scenicName;
        private final long orderCount;
        private final BigDecimal growthRate;
        public ScenicRank(int rank, String scenicName, long orderCount, BigDecimal growthRate) {
            this.rank = rank; this.scenicName = scenicName; this.orderCount = orderCount; this.growthRate = growthRate;
        }
        public int getRank() { return rank; }
        public String getScenicName() { return scenicName; }
        public long getOrderCount() { return orderCount; }
        public BigDecimal getGrowthRate() { return growthRate; }
    }
 
    public static class OrderTypeStat {
        private final String orderType;
        private final long orderCount;
        private final BigDecimal percentage;
        public OrderTypeStat(String orderType, long orderCount, BigDecimal percentage) {
            this.orderType = orderType; this.orderCount = orderCount; this.percentage = percentage;
        }
        public String getOrderType() { return orderType; }
        public long getOrderCount() { return orderCount; }
        public BigDecimal getPercentage() { return percentage; }
    }
}