shenjiachi преди 1 седмица
родител
ревизия
6793684ae8
променени са 3 файла, в които са добавени 19 реда и са изтрити 10 реда
  1. +11
    -2
      app/hdl/institutional_management/egg_energy/hdl_basic.go
  2. +6
    -6
      app/md/institutional_management/egg_energy/md_basic.go
  3. +2
    -2
      app/router/router.go

+ 11
- 2
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,


+ 6
- 6
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 视频奖励


+ 2
- 2
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"))
}



Зареждане…
Отказ
Запис