fix: resolve build errors after merge (types, config, logic)
This commit is contained in:
@@ -200,10 +200,12 @@ type File struct {
|
||||
}
|
||||
|
||||
type InviteConfig struct {
|
||||
ForcedInvite bool `yaml:"ForcedInvite" default:"false"`
|
||||
FirstPurchasePercentage int64 `yaml:"FirstPurchasePercentage" default:"20"`
|
||||
ForcedInvite bool `yaml:"ForcedInvite" default:"false"`
|
||||
FirstPurchasePercentage int64 `yaml:"FirstPurchasePercentage" default:"20"`
|
||||
FirstYearlyPurchasePercentage int64 `yaml:"FirstYearlyPurchasePercentage" default:"25"`
|
||||
NonFirstPurchasePercentage int64 `yaml:"NonFirstPurchasePercentage" default:"10"`
|
||||
NonFirstPurchasePercentage int64 `yaml:"NonFirstPurchasePercentage" default:"10"`
|
||||
ReferralPercentage uint8 `yaml:"ReferralPercentage" default:"10"`
|
||||
OnlyFirstPurchase bool `yaml:"OnlyFirstPurchase" default:"false"`
|
||||
}
|
||||
|
||||
type Telegram struct {
|
||||
|
||||
@@ -58,7 +58,7 @@ func (l *QuerySubscribeListLogic) QuerySubscribeList(req *types.QuerySubscribeLi
|
||||
}
|
||||
list[i] = sub
|
||||
// 通过服务组查询关联的节点数量
|
||||
servers, err := l.svcCtx.ServerModel.FindServerListByGroupIds(l.ctx, sub.ServerGroup)
|
||||
servers, err := l.svcCtx.ServerModel.FindServerListByGroupIds(l.ctx, tool.StringToInt64Slice(sub.ServerGroup))
|
||||
if err != nil {
|
||||
l.Errorw("[QuerySubscribeListLogic] FindServerListByGroupIds error", logger.Field("error", err.Error()))
|
||||
sub.ServerCount = 0
|
||||
|
||||
@@ -22,6 +22,7 @@ type Subscribe struct {
|
||||
Quota int64 `gorm:"type:int;not null;default:0;comment:Quota"`
|
||||
Nodes string `gorm:"type:varchar(255);comment:Node Ids"`
|
||||
NodeTags string `gorm:"type:varchar(255);comment:Node Tags"`
|
||||
ServerGroup string `gorm:"type:varchar(255);comment:Server Group"`
|
||||
Show *bool `gorm:"type:tinyint(1);not null;default:0;comment:Show portal page"`
|
||||
Sell *bool `gorm:"type:tinyint(1);not null;default:0;comment:Sell"`
|
||||
Sort int64 `gorm:"type:int;not null;default:0;comment:Sort"`
|
||||
|
||||
@@ -17,6 +17,7 @@ import (
|
||||
"github.com/perfect-panel/server/internal/model/order"
|
||||
"github.com/perfect-panel/server/internal/model/payment"
|
||||
"github.com/perfect-panel/server/internal/model/subscribe"
|
||||
"github.com/perfect-panel/server/internal/model/server"
|
||||
"github.com/perfect-panel/server/internal/model/system"
|
||||
"github.com/perfect-panel/server/internal/model/ticket"
|
||||
"github.com/perfect-panel/server/internal/model/traffic"
|
||||
@@ -48,10 +49,10 @@ type ServiceContext struct {
|
||||
OrderModel order.Model
|
||||
ClientModel client.Model
|
||||
TicketModel ticket.Model
|
||||
//ServerModel server.Model
|
||||
SystemModel system.Model
|
||||
CouponModel coupon.Model
|
||||
PaymentModel payment.Model
|
||||
ServerModel server.Model
|
||||
SystemModel system.Model
|
||||
CouponModel coupon.Model
|
||||
PaymentModel payment.Model
|
||||
DocumentModel document.Model
|
||||
SubscribeModel subscribe.Model
|
||||
TrafficLogModel traffic.Model
|
||||
@@ -109,7 +110,7 @@ func NewServiceContext(c config.Config) *ServiceContext {
|
||||
OrderModel: order.NewModel(db, rds),
|
||||
ClientModel: client.NewSubscribeApplicationModel(db),
|
||||
TicketModel: ticket.NewModel(db, rds),
|
||||
//ServerModel: server.NewModel(db, rds),
|
||||
ServerModel: server.NewModel(db, rds),
|
||||
SystemModel: system.NewModel(db, rds),
|
||||
CouponModel: coupon.NewModel(db, rds),
|
||||
PaymentModel: payment.NewModel(db, rds),
|
||||
|
||||
@@ -951,8 +951,9 @@ type GetServerUserListResponse struct {
|
||||
type GetStatResponse struct {
|
||||
User int64 `json:"user"`
|
||||
Node int64 `json:"node"`
|
||||
Country int64 `json:"country"`
|
||||
Protocol []string `json:"protocol"`
|
||||
Country int64 `json:"country"`
|
||||
Protocol []string `json:"protocol"`
|
||||
OnlineDevice int64 `json:"online_devices"`
|
||||
}
|
||||
|
||||
type GetSubscribeApplicationListRequest struct {
|
||||
@@ -2060,6 +2061,8 @@ type Subscribe struct {
|
||||
Quota int64 `json:"quota"`
|
||||
Nodes []int64 `json:"nodes"`
|
||||
NodeTags []string `json:"node_tags"`
|
||||
ServerGroup string `json:"server_group"`
|
||||
ServerCount int64 `json:"server_count"`
|
||||
Show bool `json:"show"`
|
||||
Sell bool `json:"sell"`
|
||||
Sort int64 `json:"sort"`
|
||||
|
||||
Reference in New Issue
Block a user