diff --git a/app/hdl/institutional_management/egg_energy/hdl_basic.go b/app/hdl/institutional_management/egg_energy/hdl_basic.go index 6c08b33..d047962 100644 --- a/app/hdl/institutional_management/egg_energy/hdl_basic.go +++ b/app/hdl/institutional_management/egg_energy/hdl_basic.go @@ -83,7 +83,7 @@ func GetEggEnergyBasic(c *gin.Context) { var exchangeRules md2.ExchangeRulesStruct utils.Unserialize([]byte(basicSettings.ExchangeRules), &exchangeRules) - var rewardSystem md2.RewardSystemStruct + var rewardSystem []md2.RewardSystemStruct utils.Unserialize([]byte(basicSettings.RewardSystem), &rewardSystem) var newUserRewardRules md2.NewUserRewardRules @@ -125,37 +125,12 @@ func GetEggEnergyBasic(c *gin.Context) { TotalUserForPerson: basicSettings.TotalUserForPerson, 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) diff --git a/app/md/institutional_management/egg_energy/md_basic.go b/app/md/institutional_management/egg_energy/md_basic.go index 457e6f7..4420c0a 100644 --- a/app/md/institutional_management/egg_energy/md_basic.go +++ b/app/md/institutional_management/egg_energy/md_basic.go @@ -52,7 +52,7 @@ type GetEggEnergyBasicResp struct { DestructionSetting md.DestructionSettingStruct `json:"destruction_setting"` // 销毁设置 PriceSetting md.PriceSettingStruct `json:"price_setting"` // 价格设置 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"` // 新用户奖励规则 SystemID int `json:"system_id"` // 该设置系统 ID } diff --git a/docs/docs.go b/docs/docs.go index 375e882..dc5702c 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -3042,11 +3042,10 @@ const docTemplate = `{ }, "reward_system": { "description": "圈层奖励", - "allOf": [ - { - "$ref": "#/definitions/md.RewardSystemStruct" - } - ] + "type": "array", + "items": { + "$ref": "#/definitions/md.RewardSystemStruct" + } }, "system_id": { "description": "该设置系统 ID", diff --git a/docs/swagger.json b/docs/swagger.json index cd85b8d..47d497c 100644 --- a/docs/swagger.json +++ b/docs/swagger.json @@ -3035,11 +3035,10 @@ }, "reward_system": { "description": "圈层奖励", - "allOf": [ - { - "$ref": "#/definitions/md.RewardSystemStruct" - } - ] + "type": "array", + "items": { + "$ref": "#/definitions/md.RewardSystemStruct" + } }, "system_id": { "description": "该设置系统 ID", diff --git a/docs/swagger.yaml b/docs/swagger.yaml index 4ee0f29..fc3b166 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -615,9 +615,10 @@ definitions: - $ref: '#/definitions/md.PriceSettingStruct' description: 价格设置 reward_system: - allOf: - - $ref: '#/definitions/md.RewardSystemStruct' description: 圈层奖励 + items: + $ref: '#/definitions/md.RewardSystemStruct' + type: array system_id: description: 该设置系统 ID type: integer diff --git a/go.mod b/go.mod index 0affc02..8953b16 100644 --- a/go.mod +++ b/go.mod @@ -2,9 +2,9 @@ module applet 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 ( github.com/boombuler/barcode v1.0.1