feat(订单): 实现推荐奖励系统支持佣金和赠送天数两种模式
Build docker and publish / build (20.15.1) (push) Failing after 9m13s
Build docker and publish / build (20.15.1) (push) Failing after 9m13s
重构推荐奖励处理逻辑,新增支持根据配置选择佣金奖励或赠送天数奖励 修改Discount相关字段类型为float64以支持小数折扣 添加GiftDays配置项控制赠送天数 新增FindActiveSubscribe方法查询用户有效订阅
This commit is contained in:
+3
-2
@@ -187,6 +187,7 @@ type (
|
||||
ForcedInvite bool `json:"forced_invite"`
|
||||
ReferralPercentage int64 `json:"referral_percentage"`
|
||||
OnlyFirstPurchase bool `json:"only_first_purchase"`
|
||||
GiftDays int64 `json:"gift_days"`
|
||||
}
|
||||
TelegramConfig {
|
||||
TelegramBotToken string `json:"telegram_bot_token"`
|
||||
@@ -206,8 +207,8 @@ type (
|
||||
CurrencySymbol string `json:"currency_symbol"`
|
||||
}
|
||||
SubscribeDiscount {
|
||||
Quantity int64 `json:"quantity"`
|
||||
Discount int64 `json:"discount"`
|
||||
Quantity int64 `json:"quantity"`
|
||||
Discount float64 `json:"discount"`
|
||||
}
|
||||
Subscribe {
|
||||
Id int64 `json:"id"`
|
||||
|
||||
Reference in New Issue
Block a user