feat: 添加在线设备统计功能并优化订阅相关逻辑
- 在DeviceManager中添加GetOnlineDeviceCount方法用于获取在线设备数 - 在统计接口中增加在线设备数返回 - 优化订阅查询逻辑,增加服务组关联节点数量计算 - 添加AnyTLS协议支持及相关URI生成功能 - 重构邀请佣金计算逻辑,支持首购/年付/非首购不同比例 - 修复用户基本信息更新中IsAdmin和Enable字段类型不匹配问题 - 更新数据库迁移脚本和配置文件中邀请相关配置项
This commit is contained in:
+11
-7
@@ -475,6 +475,7 @@ type CreateSubscribeRequest struct {
|
||||
GroupId int64 `json:"group_id"`
|
||||
ServerGroup []int64 `json:"server_group"`
|
||||
Server []int64 `json:"server"`
|
||||
ServerCount int64 `json:"server_count"`
|
||||
Show *bool `json:"show"`
|
||||
Sell *bool `json:"sell"`
|
||||
DeductionRatio int64 `json:"deduction_ratio"`
|
||||
@@ -861,10 +862,11 @@ type GetServerUserListResponse struct {
|
||||
}
|
||||
|
||||
type GetStatResponse struct {
|
||||
User int64 `json:"user"`
|
||||
Node int64 `json:"node"`
|
||||
Country int64 `json:"country"`
|
||||
Protocol []string `json:"protocol"`
|
||||
User int64 `json:"user"`
|
||||
Node int64 `json:"node"`
|
||||
Country int64 `json:"country"`
|
||||
Protocol []string `json:"protocol"`
|
||||
OnlineDevice int64 `json:"online_device"`
|
||||
}
|
||||
|
||||
type GetSubscribeDetailsRequest struct {
|
||||
@@ -1044,9 +1046,10 @@ type Hysteria2 struct {
|
||||
}
|
||||
|
||||
type InviteConfig struct {
|
||||
ForcedInvite bool `json:"forced_invite"`
|
||||
ReferralPercentage int64 `json:"referral_percentage"`
|
||||
OnlyFirstPurchase bool `json:"only_first_purchase"`
|
||||
ForcedInvite bool `json:"forced_invite"`
|
||||
FirstPurchasePercentage int64 `json:"first_purchase_percentage"`
|
||||
FirstYearlyPurchasePercentage int64 `json:"first_yearly_purchase_percentage"`
|
||||
NonFirstPurchasePercentage int64 `json:"non_first_purchase_percentage"`
|
||||
}
|
||||
|
||||
type KickOfflineRequest struct {
|
||||
@@ -1656,6 +1659,7 @@ type Subscribe struct {
|
||||
GroupId int64 `json:"group_id"`
|
||||
ServerGroup []int64 `json:"server_group"`
|
||||
Server []int64 `json:"server"`
|
||||
ServerCount int64 `json:"server_count"`
|
||||
Show bool `json:"show"`
|
||||
Sell bool `json:"sell"`
|
||||
Sort int64 `json:"sort"`
|
||||
|
||||
Reference in New Issue
Block a user