From 6793684ae885043dba5e5fdbcbf01995c56a24ce Mon Sep 17 00:00:00 2001 From: shenjiachi Date: Wed, 13 Nov 2024 16:30:56 +0800 Subject: [PATCH] update --- .../egg_energy/hdl_basic.go | 13 +++++++++++-- .../institutional_management/egg_energy/md_basic.go | 12 ++++++------ app/router/router.go | 4 ++-- 3 files changed, 19 insertions(+), 10 deletions(-) diff --git a/app/hdl/institutional_management/egg_energy/hdl_basic.go b/app/hdl/institutional_management/egg_energy/hdl_basic.go index 93d0eba..6409393 100644 --- a/app/hdl/institutional_management/egg_energy/hdl_basic.go +++ b/app/hdl/institutional_management/egg_energy/hdl_basic.go @@ -89,6 +89,9 @@ func GetEggEnergyBasic(c *gin.Context) { var newUserRewardRules md2.NewUserRewardRules utils.Unserialize([]byte(basicSettings.NewUserIncentiveRules), newUserRewardRules) + var directPushReward md2.TeamRewardSettingStruct + utils.Unserialize([]byte(basicSettings.DirectPushReward), directPushReward) + resp := md.GetEggEnergyBasicResp{ BasicSetting: md.BasicSetting{ IsOpen: basicSettings.IsOpen, @@ -96,7 +99,12 @@ func GetEggEnergyBasic(c *gin.Context) { TeamEggEnergyCoinId: basicSettings.TeamEggEnergyCoinId, PersonEggPointsCoinId: basicSettings.PersonEggPointsCoinId, TeamEggPointsCoinId: basicSettings.TeamEggPointsCoinId, - DirectPushReward: basicSettings.DirectPushReward, + DirectPushReward: md2.TeamRewardSettingStruct{ + RewardDecrementValue: directPushReward.RewardDecrementValue, + RewardEndValue: directPushReward.RewardEndValue, + MemberSelfIsOpenGetTeamReward: directPushReward.MemberSelfIsOpenGetTeamReward, + OneRoundDuration: directPushReward.OneRoundDuration, + }, }, VideoRewardSetting: md.VideoRewardSetting{ VideoRewardIsOpen: basicSettings.VideoRewardIsOpen, @@ -176,6 +184,7 @@ func UpdateEggEnergyBasic(c *gin.Context) { exchangeRulesStr := utils.SerializeStr(req.ExchangeRules) rewardSystemStr := utils.SerializeStr(req.RewardSystem) newUserIncentiveRulesStr := utils.SerializeStr(req.NewUserIncentiveRules) + directPushRewardStr := utils.SerializeStr(req.BasicSetting.DirectPushReward) m := model.EggEnergyBasicSetting{ Id: req.SystemID, @@ -192,7 +201,7 @@ func UpdateEggEnergyBasic(c *gin.Context) { TotalUserForPerson: req.DataSetting.TotalUserForPerson, TotalUserForTeam: req.DataSetting.TotalUserForTeam, DestructionSetting: destructionSettingStr, - DirectPushReward: req.BasicSetting.DirectPushReward, + DirectPushReward: directPushRewardStr, PriceSetting: priceSettingStr, VideoRewardIsOpen: req.VideoRewardSetting.VideoRewardIsOpen, VideoRewardSystem: videoRewardSystemStr, diff --git a/app/md/institutional_management/egg_energy/md_basic.go b/app/md/institutional_management/egg_energy/md_basic.go index f435e40..c1f5f04 100644 --- a/app/md/institutional_management/egg_energy/md_basic.go +++ b/app/md/institutional_management/egg_energy/md_basic.go @@ -15,12 +15,12 @@ type VirtualCoin struct { // BasicSetting 基础设置 type BasicSetting struct { - IsOpen int `json:"is_open" ` // 是否开启(1:开启 0:关闭) - PersonEggEnergyCoinId int `json:"person_egg_energy_coin_id" ` // 个人蛋蛋能量对应虚拟币 id - TeamEggEnergyCoinId int `json:"team_egg_energy_coin_id" ` // 团队蛋蛋能量对应虚拟币 id - PersonEggPointsCoinId int `json:"person_egg_points_coin_id" ` // 个人蛋蛋积分对应虚拟币 id - TeamEggPointsCoinId int `json:"team_egg_points_coin_id" ` // 团队蛋蛋积分对应虚拟币 id - DirectPushReward string `json:"direct_push_reward" example:"直推奖励"` // 直推奖励 + IsOpen int `json:"is_open" ` // 是否开启(1:开启 0:关闭) + PersonEggEnergyCoinId int `json:"person_egg_energy_coin_id" ` // 个人蛋蛋能量对应虚拟币 id + TeamEggEnergyCoinId int `json:"team_egg_energy_coin_id" ` // 团队蛋蛋能量对应虚拟币 id + PersonEggPointsCoinId int `json:"person_egg_points_coin_id" ` // 个人蛋蛋积分对应虚拟币 id + TeamEggPointsCoinId int `json:"team_egg_points_coin_id" ` // 团队蛋蛋积分对应虚拟币 id + DirectPushReward md.TeamRewardSettingStruct `json:"direct_push_reward" example:"直推奖励"` // 直推奖励 } // VideoRewardSetting 视频奖励 diff --git a/app/router/router.go b/app/router/router.go index 350da37..5c2df76 100644 --- a/app/router/router.go +++ b/app/router/router.go @@ -51,9 +51,9 @@ func Init() *gin.Engine { func route(r *gin.RouterGroup) { r.GET("/test", hdl.Demo) r.POST("/login", hdl.Login) - r.Use(mw.Auth) // 以下接口需要JWT验证 + //r.Use(mw.Auth) // 以下接口需要JWT验证 rComm(r.Group("/comm")) - r.Use(mw.CheckPermission) // 检测权限 + //r.Use(mw.CheckPermission) // 检测权限 rInstitutionalManagement(r.Group("/institutionalManagement")) }