@@ -83,7 +83,7 @@ func GetEggEnergyBasic(c *gin.Context) { | |||||
var exchangeRules md2.ExchangeRulesStruct | var exchangeRules md2.ExchangeRulesStruct | ||||
utils.Unserialize([]byte(basicSettings.ExchangeRules), &exchangeRules) | utils.Unserialize([]byte(basicSettings.ExchangeRules), &exchangeRules) | ||||
var rewardSystem md2.RewardSystemStruct | |||||
var rewardSystem []md2.RewardSystemStruct | |||||
utils.Unserialize([]byte(basicSettings.RewardSystem), &rewardSystem) | utils.Unserialize([]byte(basicSettings.RewardSystem), &rewardSystem) | ||||
var newUserRewardRules md2.NewUserRewardRules | var newUserRewardRules md2.NewUserRewardRules | ||||
@@ -125,37 +125,12 @@ func GetEggEnergyBasic(c *gin.Context) { | |||||
TotalUserForPerson: basicSettings.TotalUserForPerson, | TotalUserForPerson: basicSettings.TotalUserForPerson, | ||||
TotalUserForTeam: basicSettings.TotalUserForTeam, | TotalUserForTeam: basicSettings.TotalUserForTeam, | ||||
}, | }, | ||||
DestructionSetting: md2.DestructionSettingStruct{ | |||||
DestructionQuantity: destructionSetting.DestructionQuantity, | |||||
PublicWelfareAndCharity: destructionSetting.PublicWelfareAndCharity, | |||||
DevelopmentCommittee: destructionSetting.DevelopmentCommittee, | |||||
StarLevelDividends: destructionSetting.StarLevelDividends, | |||||
MarketplaceMerchant: destructionSetting.MarketplaceMerchant, | |||||
CommunityDividends: destructionSetting.CommunityDividends, | |||||
}, | |||||
PriceSetting: md2.PriceSettingStruct{ | |||||
PriceHigherThanValue: priceSetting.PriceHigherThanValue, | |||||
MarketplaceMerchantsNumsExchangeMarketplaceMerchantsFundValue: priceSetting.MarketplaceMerchantsNumsExchangeMarketplaceMerchantsFundValue, | |||||
PriceBelowValue: priceSetting.PriceBelowValue, | |||||
MarketplaceMerchantsFundExchangeMarketplaceMerchantsNumsValue: priceSetting.MarketplaceMerchantsFundExchangeMarketplaceMerchantsNumsValue, | |||||
}, | |||||
ExchangeRules: md2.ExchangeRulesStruct{ | |||||
AutoExchangeNumsByPerson: exchangeRules.AutoExchangeNumsByPerson, | |||||
AutoExchangeRateByPerson: exchangeRules.AutoExchangeRateByPerson, | |||||
AutoExchangeNumsByTeam: exchangeRules.AutoExchangeNumsByTeam, | |||||
AutoExchangeRateByTeam: exchangeRules.AutoExchangeRateByTeam, | |||||
}, | |||||
RewardSystem: md2.RewardSystemStruct{ | |||||
Level: rewardSystem.Level, | |||||
RewardCondition: rewardSystem.RewardCondition, | |||||
RewardValue: rewardSystem.RewardValue, | |||||
}, | |||||
NewUserIncentiveRules: md2.NewUserRewardRules{ | |||||
InviteUserRewardValue: newUserRewardRules.InviteUserRewardValue, | |||||
RewardCoefficient: newUserRewardRules.RewardCoefficient, | |||||
ContinueDays: newUserRewardRules.ContinueDays, | |||||
}, | |||||
SystemID: basicSettings.Id, | |||||
DestructionSetting: destructionSetting, | |||||
PriceSetting: priceSetting, | |||||
ExchangeRules: exchangeRules, | |||||
RewardSystem: rewardSystem, | |||||
NewUserIncentiveRules: newUserRewardRules, | |||||
SystemID: basicSettings.Id, | |||||
} | } | ||||
e.OutSuc(c, resp, nil) | e.OutSuc(c, resp, nil) | ||||
@@ -52,7 +52,7 @@ type GetEggEnergyBasicResp struct { | |||||
DestructionSetting md.DestructionSettingStruct `json:"destruction_setting"` // 销毁设置 | DestructionSetting md.DestructionSettingStruct `json:"destruction_setting"` // 销毁设置 | ||||
PriceSetting md.PriceSettingStruct `json:"price_setting"` // 价格设置 | PriceSetting md.PriceSettingStruct `json:"price_setting"` // 价格设置 | ||||
ExchangeRules md.ExchangeRulesStruct `json:"exchange_rules"` // 兑换规则 | ExchangeRules md.ExchangeRulesStruct `json:"exchange_rules"` // 兑换规则 | ||||
RewardSystem md.RewardSystemStruct `json:"reward_system"` // 圈层奖励 | |||||
RewardSystem []md.RewardSystemStruct `json:"reward_system"` // 圈层奖励 | |||||
NewUserIncentiveRules md.NewUserRewardRules `json:"new_user_incentive_rules"` // 新用户奖励规则 | NewUserIncentiveRules md.NewUserRewardRules `json:"new_user_incentive_rules"` // 新用户奖励规则 | ||||
SystemID int `json:"system_id"` // 该设置系统 ID | SystemID int `json:"system_id"` // 该设置系统 ID | ||||
} | } | ||||
@@ -3042,11 +3042,10 @@ const docTemplate = `{ | |||||
}, | }, | ||||
"reward_system": { | "reward_system": { | ||||
"description": "圈层奖励", | "description": "圈层奖励", | ||||
"allOf": [ | |||||
{ | |||||
"$ref": "#/definitions/md.RewardSystemStruct" | |||||
} | |||||
] | |||||
"type": "array", | |||||
"items": { | |||||
"$ref": "#/definitions/md.RewardSystemStruct" | |||||
} | |||||
}, | }, | ||||
"system_id": { | "system_id": { | ||||
"description": "该设置系统 ID", | "description": "该设置系统 ID", | ||||
@@ -3035,11 +3035,10 @@ | |||||
}, | }, | ||||
"reward_system": { | "reward_system": { | ||||
"description": "圈层奖励", | "description": "圈层奖励", | ||||
"allOf": [ | |||||
{ | |||||
"$ref": "#/definitions/md.RewardSystemStruct" | |||||
} | |||||
] | |||||
"type": "array", | |||||
"items": { | |||||
"$ref": "#/definitions/md.RewardSystemStruct" | |||||
} | |||||
}, | }, | ||||
"system_id": { | "system_id": { | ||||
"description": "该设置系统 ID", | "description": "该设置系统 ID", | ||||
@@ -615,9 +615,10 @@ definitions: | |||||
- $ref: '#/definitions/md.PriceSettingStruct' | - $ref: '#/definitions/md.PriceSettingStruct' | ||||
description: 价格设置 | description: 价格设置 | ||||
reward_system: | reward_system: | ||||
allOf: | |||||
- $ref: '#/definitions/md.RewardSystemStruct' | |||||
description: 圈层奖励 | description: 圈层奖励 | ||||
items: | |||||
$ref: '#/definitions/md.RewardSystemStruct' | |||||
type: array | |||||
system_id: | system_id: | ||||
description: 该设置系统 ID | description: 该设置系统 ID | ||||
type: integer | type: integer | ||||
@@ -2,9 +2,9 @@ module applet | |||||
go 1.19 | go 1.19 | ||||
//replace code.fnuoos.com/EggPlanet/egg_models.git => E:/company/Egg/egg_models | |||||
replace code.fnuoos.com/EggPlanet/egg_models.git => E:/company/Egg/egg_models | |||||
//replace code.fnuoos.com/EggPlanet/egg_system_rules.git => E:/company/Egg/egg_system_rules | |||||
replace code.fnuoos.com/EggPlanet/egg_system_rules.git => E:/company/Egg/egg_system_rules | |||||
require ( | require ( | ||||
github.com/boombuler/barcode v1.0.1 | github.com/boombuler/barcode v1.0.1 | ||||