shenjiachi před 1 měsícem
rodič
revize
650179833c
3 změnil soubory, kde provedl 26 přidání a 13 odebrání
  1. +7
    -7
      app/hdl/institutional_management/egg_energy/hdl_basic.go
  2. +14
    -1
      app/hdl/institutional_management/public_platoon/hdl_basic.go
  3. +5
    -5
      app/router/router.go

+ 7
- 7
app/hdl/institutional_management/egg_energy/hdl_basic.go Zobrazit soubor

@@ -72,25 +72,25 @@ func GetEggEnergyBasic(c *gin.Context) {
}

var videoRewardSystem md2.VideoRewardSystemStruct
utils.Unserialize([]byte(basicSettings.VideoRewardSystem), videoRewardSystem)
utils.Unserialize([]byte(basicSettings.VideoRewardSystem), &videoRewardSystem)

var destructionSetting md2.DestructionSettingStruct
utils.Unserialize([]byte(basicSettings.DestructionSetting), destructionSetting)
utils.Unserialize([]byte(basicSettings.DestructionSetting), &destructionSetting)

var priceSetting md2.PriceSettingStruct
utils.Unserialize([]byte(basicSettings.PriceSetting), priceSetting)
utils.Unserialize([]byte(basicSettings.PriceSetting), &priceSetting)

var exchangeRules md2.ExchangeRulesStruct
utils.Unserialize([]byte(basicSettings.ExchangeRules), exchangeRules)
utils.Unserialize([]byte(basicSettings.ExchangeRules), &exchangeRules)

var rewardSystem md2.RewardSystemStruct
utils.Unserialize([]byte(basicSettings.RewardSystem), rewardSystem)
utils.Unserialize([]byte(basicSettings.RewardSystem), &rewardSystem)

var newUserRewardRules md2.NewUserRewardRules
utils.Unserialize([]byte(basicSettings.NewUserIncentiveRules), newUserRewardRules)
utils.Unserialize([]byte(basicSettings.NewUserIncentiveRules), &newUserRewardRules)

var directPushReward md2.TeamRewardSettingStruct
utils.Unserialize([]byte(basicSettings.DirectPushReward), directPushReward)
utils.Unserialize([]byte(basicSettings.DirectPushReward), &directPushReward)

resp := md.GetEggEnergyBasicResp{
BasicSetting: md.BasicSetting{


+ 14
- 1
app/hdl/institutional_management/public_platoon/hdl_basic.go Zobrazit soubor

@@ -445,6 +445,20 @@ func AddFreePublishUser(c *gin.Context) {
return
}

freePunishWithUserDb := implement.NewPublicPlatoonFreePunishWithUserDb(db.Db)
userExist, err := freePunishWithUserDb.PublicPlatoonFreePunishWithUserGetOneByParams(map[string]interface{}{
"key": "uid",
"value": req.Uid,
})
if err != nil {
e.OutErr(c, e.ERR_DB_ORM, err.Error())
return
}
if userExist != nil {
e.OutErr(c, e.ERR_DB_ORM, "用户已在名单,无需重复添加")
return
}

userDb := implement.NewUserDb(db.Db)
user, err2 := userDb.UserGetOneByParams(map[string]interface{}{
"key": "id",
@@ -458,7 +472,6 @@ func AddFreePublishUser(c *gin.Context) {
e.OutErr(c, e.ERR_DB_ORM, errors.New("该用户不存在"))
}

freePunishWithUserDb := implement.NewPublicPlatoonFreePunishWithUserDb(db.Db)
var m model.PublicPlatoonFreePunishWithUser
m = model.PublicPlatoonFreePunishWithUser{
Uid: req.Uid,


+ 5
- 5
app/router/router.go Zobrazit soubor

@@ -52,9 +52,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"))
rSettCenter(r.Group("/settCenter"))
}
@@ -123,9 +123,9 @@ func rInstitutionalManagement(r *gin.RouterGroup) { //制度管理
}
rPlatformRevenue := rEggEnergy.Group("/platformRevenue")
{
rPlatformRevenue.POST("/SetVideoReward", egg_energy.SetVideoReward)
rPlatformRevenue.POST("/PlatformRevenueList", egg_energy.ListPlatformRevenue)
rPlatformRevenue.POST("/PlatformRevenueAdd", egg_energy.AddPlatformRevenue)
rPlatformRevenue.POST("/setVideoReward", egg_energy.SetVideoReward)
rPlatformRevenue.POST("/platformRevenueList", egg_energy.ListPlatformRevenue)
rPlatformRevenue.POST("/platformRevenueAdd", egg_energy.AddPlatformRevenue)
}
}
}


Načítá se…
Zrušit
Uložit