Browse Source

update

master
shenjiachi 1 month ago
parent
commit
650179833c
3 changed files with 26 additions and 13 deletions
  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 View File

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


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


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


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


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
utils.Unserialize([]byte(basicSettings.NewUserIncentiveRules), newUserRewardRules)
utils.Unserialize([]byte(basicSettings.NewUserIncentiveRules), &newUserRewardRules)


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


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


+ 14
- 1
app/hdl/institutional_management/public_platoon/hdl_basic.go View File

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


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


+ 5
- 5
app/router/router.go View File

@@ -52,9 +52,9 @@ func Init() *gin.Engine {
func route(r *gin.RouterGroup) { func route(r *gin.RouterGroup) {
r.GET("/test", hdl.Demo) r.GET("/test", hdl.Demo)
r.POST("/login", hdl.Login) r.POST("/login", hdl.Login)
r.Use(mw.Auth) // 以下接口需要JWT验证
//r.Use(mw.Auth) // 以下接口需要JWT验证
rComm(r.Group("/comm")) rComm(r.Group("/comm"))
r.Use(mw.CheckPermission) // 检测权限
//r.Use(mw.CheckPermission) // 检测权限
rInstitutionalManagement(r.Group("/institutionalManagement")) rInstitutionalManagement(r.Group("/institutionalManagement"))
rSettCenter(r.Group("/settCenter")) rSettCenter(r.Group("/settCenter"))
} }
@@ -123,9 +123,9 @@ func rInstitutionalManagement(r *gin.RouterGroup) { //制度管理
} }
rPlatformRevenue := rEggEnergy.Group("/platformRevenue") 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)
} }
} }
} }


Loading…
Cancel
Save