@@ -89,6 +89,9 @@ func GetEggEnergyBasic(c *gin.Context) { | |||||
var newUserRewardRules md2.NewUserRewardRules | 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) | |||||
resp := md.GetEggEnergyBasicResp{ | resp := md.GetEggEnergyBasicResp{ | ||||
BasicSetting: md.BasicSetting{ | BasicSetting: md.BasicSetting{ | ||||
IsOpen: basicSettings.IsOpen, | IsOpen: basicSettings.IsOpen, | ||||
@@ -96,7 +99,12 @@ func GetEggEnergyBasic(c *gin.Context) { | |||||
TeamEggEnergyCoinId: basicSettings.TeamEggEnergyCoinId, | TeamEggEnergyCoinId: basicSettings.TeamEggEnergyCoinId, | ||||
PersonEggPointsCoinId: basicSettings.PersonEggPointsCoinId, | PersonEggPointsCoinId: basicSettings.PersonEggPointsCoinId, | ||||
TeamEggPointsCoinId: basicSettings.TeamEggPointsCoinId, | TeamEggPointsCoinId: basicSettings.TeamEggPointsCoinId, | ||||
DirectPushReward: basicSettings.DirectPushReward, | |||||
DirectPushReward: md2.TeamRewardSettingStruct{ | |||||
RewardDecrementValue: directPushReward.RewardDecrementValue, | |||||
RewardEndValue: directPushReward.RewardEndValue, | |||||
MemberSelfIsOpenGetTeamReward: directPushReward.MemberSelfIsOpenGetTeamReward, | |||||
OneRoundDuration: directPushReward.OneRoundDuration, | |||||
}, | |||||
}, | }, | ||||
VideoRewardSetting: md.VideoRewardSetting{ | VideoRewardSetting: md.VideoRewardSetting{ | ||||
VideoRewardIsOpen: basicSettings.VideoRewardIsOpen, | VideoRewardIsOpen: basicSettings.VideoRewardIsOpen, | ||||
@@ -176,6 +184,7 @@ func UpdateEggEnergyBasic(c *gin.Context) { | |||||
exchangeRulesStr := utils.SerializeStr(req.ExchangeRules) | exchangeRulesStr := utils.SerializeStr(req.ExchangeRules) | ||||
rewardSystemStr := utils.SerializeStr(req.RewardSystem) | rewardSystemStr := utils.SerializeStr(req.RewardSystem) | ||||
newUserIncentiveRulesStr := utils.SerializeStr(req.NewUserIncentiveRules) | newUserIncentiveRulesStr := utils.SerializeStr(req.NewUserIncentiveRules) | ||||
directPushRewardStr := utils.SerializeStr(req.BasicSetting.DirectPushReward) | |||||
m := model.EggEnergyBasicSetting{ | m := model.EggEnergyBasicSetting{ | ||||
Id: req.SystemID, | Id: req.SystemID, | ||||
@@ -192,7 +201,7 @@ func UpdateEggEnergyBasic(c *gin.Context) { | |||||
TotalUserForPerson: req.DataSetting.TotalUserForPerson, | TotalUserForPerson: req.DataSetting.TotalUserForPerson, | ||||
TotalUserForTeam: req.DataSetting.TotalUserForTeam, | TotalUserForTeam: req.DataSetting.TotalUserForTeam, | ||||
DestructionSetting: destructionSettingStr, | DestructionSetting: destructionSettingStr, | ||||
DirectPushReward: req.BasicSetting.DirectPushReward, | |||||
DirectPushReward: directPushRewardStr, | |||||
PriceSetting: priceSettingStr, | PriceSetting: priceSettingStr, | ||||
VideoRewardIsOpen: req.VideoRewardSetting.VideoRewardIsOpen, | VideoRewardIsOpen: req.VideoRewardSetting.VideoRewardIsOpen, | ||||
VideoRewardSystem: videoRewardSystemStr, | VideoRewardSystem: videoRewardSystemStr, | ||||
@@ -276,7 +285,7 @@ func GetEggCoreDataList(c *gin.Context) { | |||||
// @Produce json | // @Produce json | ||||
// @param Authorization header string true "验证参数Bearer和token空格拼接" | // @param Authorization header string true "验证参数Bearer和token空格拼接" | ||||
// @Param kind query string false "1:按天 2:按小时 3:按周" | // @Param kind query string false "1:按天 2:按小时 3:按周" | ||||
// @Success 200 {object} map[string]interface{} "具体数据" | |||||
// @Success 200 {object} md.GetPriceCurveResp "具体数据" | |||||
// @Failure 400 {object} md.Response "具体错误" | // @Failure 400 {object} md.Response "具体错误" | ||||
// @Router /api/institutionalManagement/eggEnergy/globalData/pointsCenterPriceCurve [get] | // @Router /api/institutionalManagement/eggEnergy/globalData/pointsCenterPriceCurve [get] | ||||
func GetPriceCurve(c *gin.Context) { | func GetPriceCurve(c *gin.Context) { | ||||
@@ -347,9 +356,9 @@ func GetPriceCurve(c *gin.Context) { | |||||
break | break | ||||
} | } | ||||
e.OutSuc(c, map[string]interface{}{ | |||||
"yData": yData, | |||||
"xData": xData, | |||||
e.OutSuc(c, md.GetPriceCurveResp{ | |||||
YData: yData, | |||||
XData: xData, | |||||
}, nil) | }, nil) | ||||
return | return | ||||
} | } | ||||
@@ -15,12 +15,12 @@ type VirtualCoin struct { | |||||
// BasicSetting 基础设置 | // BasicSetting 基础设置 | ||||
type BasicSetting struct { | 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 视频奖励 | // VideoRewardSetting 视频奖励 | ||||
@@ -72,6 +72,11 @@ type GetEggCoreDataListResp struct { | |||||
UserHoldTotalNums map[string]string `json:"user_hold_total_nums"` // 用户持有总量 | UserHoldTotalNums map[string]string `json:"user_hold_total_nums"` // 用户持有总量 | ||||
} | } | ||||
type GetPriceCurveResp struct { | |||||
XData []interface{} `json:"x_data"` | |||||
YData []interface{} `json:"y_data"` | |||||
} | |||||
type GetFundDataListReq struct { | type GetFundDataListReq struct { | ||||
Kind int `json:"kind"` // 数据类型 | Kind int `json:"kind"` // 数据类型 | ||||
StartAt string `json:"start_at" example:"开始时间"` | StartAt string `json:"start_at" example:"开始时间"` | ||||
@@ -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")) | ||||
} | } | ||||
@@ -353,8 +353,7 @@ const docTemplate = `{ | |||||
"200": { | "200": { | ||||
"description": "具体数据", | "description": "具体数据", | ||||
"schema": { | "schema": { | ||||
"type": "object", | |||||
"additionalProperties": true | |||||
"$ref": "#/definitions/md.GetPriceCurveResp" | |||||
} | } | ||||
}, | }, | ||||
"400": { | "400": { | ||||
@@ -2312,6 +2311,19 @@ const docTemplate = `{ | |||||
} | } | ||||
} | } | ||||
}, | }, | ||||
"md.GetPriceCurveResp": { | |||||
"type": "object", | |||||
"properties": { | |||||
"x_data": { | |||||
"type": "array", | |||||
"items": {} | |||||
}, | |||||
"y_data": { | |||||
"type": "array", | |||||
"items": {} | |||||
} | |||||
} | |||||
}, | |||||
"md.GetPublicPlatoonBasicResp": { | "md.GetPublicPlatoonBasicResp": { | ||||
"type": "object", | "type": "object", | ||||
"properties": { | "properties": { | ||||
@@ -346,8 +346,7 @@ | |||||
"200": { | "200": { | ||||
"description": "具体数据", | "description": "具体数据", | ||||
"schema": { | "schema": { | ||||
"type": "object", | |||||
"additionalProperties": true | |||||
"$ref": "#/definitions/md.GetPriceCurveResp" | |||||
} | } | ||||
}, | }, | ||||
"400": { | "400": { | ||||
@@ -2305,6 +2304,19 @@ | |||||
} | } | ||||
} | } | ||||
}, | }, | ||||
"md.GetPriceCurveResp": { | |||||
"type": "object", | |||||
"properties": { | |||||
"x_data": { | |||||
"type": "array", | |||||
"items": {} | |||||
}, | |||||
"y_data": { | |||||
"type": "array", | |||||
"items": {} | |||||
} | |||||
} | |||||
}, | |||||
"md.GetPublicPlatoonBasicResp": { | "md.GetPublicPlatoonBasicResp": { | ||||
"type": "object", | "type": "object", | ||||
"properties": { | "properties": { | ||||
@@ -730,6 +730,15 @@ definitions: | |||||
description: 持有该类型用户数 | description: 持有该类型用户数 | ||||
type: integer | type: integer | ||||
type: object | type: object | ||||
md.GetPriceCurveResp: | |||||
properties: | |||||
x_data: | |||||
items: {} | |||||
type: array | |||||
y_data: | |||||
items: {} | |||||
type: array | |||||
type: object | |||||
md.GetPublicPlatoonBasicResp: | md.GetPublicPlatoonBasicResp: | ||||
properties: | properties: | ||||
is_open: | is_open: | ||||
@@ -1364,8 +1373,7 @@ paths: | |||||
"200": | "200": | ||||
description: 具体数据 | description: 具体数据 | ||||
schema: | schema: | ||||
additionalProperties: true | |||||
type: object | |||||
$ref: '#/definitions/md.GetPriceCurveResp' | |||||
"400": | "400": | ||||
description: 具体错误 | description: 具体错误 | ||||
schema: | schema: | ||||