Parcourir la source

update basic setting

master
shenjiachi il y a 3 jours
Parent
révision
834f17d7ea
7 fichiers modifiés avec 1027 ajouts et 8 suppressions
  1. +174
    -0
      app/hdl/institutional_management/egg_energy/hdl_basic.go
  2. +24
    -3
      app/md/institutional_management/egg_energy/md_basic.go
  3. +3
    -0
      app/router/router.go
  4. +308
    -1
      docs/docs.go
  5. +308
    -1
      docs/swagger.json
  6. +208
    -2
      docs/swagger.yaml
  7. +2
    -1
      go.mod

+ 174
- 0
app/hdl/institutional_management/egg_energy/hdl_basic.go Voir le fichier

@@ -121,6 +121,7 @@ func GetEggEnergyBasic(c *gin.Context) {
TotalAngelInvestor: basicSettings.TotalAngelInvestor,
TotalOperateFund: basicSettings.TotalOperateFund,
TotalEcologicalDevelopment: basicSettings.TotalEcologicalDevelopment,
TotalTeamDividends: basicSettings.TotalTeamDividends,
TotalUserForPerson: basicSettings.TotalUserForPerson,
TotalUserForTeam: basicSettings.TotalUserForTeam,
},
@@ -208,6 +209,7 @@ func UpdateEggEnergyBasic(c *gin.Context) {
ExchangeRules: exchangeRulesStr,
RewardSystem: rewardSystemStr,
NewUserIncentiveRules: newUserIncentiveRulesStr,
TotalTeamDividends: req.DataSetting.TotalTeamDividends,
}

forceColums := []string{"is_open", "video_reward_is_open"}
@@ -221,6 +223,178 @@ func UpdateEggEnergyBasic(c *gin.Context) {
e.OutSuc(c, affected, nil)
}

// GetEggEnergyVipSetting
// @Summary 制度中心-蛋蛋能量-基础会员设置(获取)
// @Tags 蛋蛋能量
// @Description 基础会员设置(获取)
// @Accept json
// @Produce json
// @param Authorization header string true "验证参数Bearer和token空格拼接"
// @Success 200 {object} md.GetEggEnergyVipSettingResp "具体数据"
// @Failure 400 {object} md.Response "具体错误"
// @Router /api/institutionalManagement/eggEnergy/getVipSetting [get]
func GetEggEnergyVipSetting(c *gin.Context) {
basicSettingDb := implement.NewEggEnergyBasicSettingDb(db.Db)
basicSettings, err1 := basicSettingDb.EggEnergyBasicSettingGetOne()
if err1 != nil {
e.OutErr(c, e.ERR_DB_ORM, err1.Error())
return
}
if basicSettings == nil {
e.OutErr(c, e.ERR_NO_DATA, errors.New("未能获取基础设置"))
return
}

var vipEquitySetting []md2.VipEquitySettingStruct
utils.Unserialize([]byte(basicSettings.VipEquitySetting), &vipEquitySetting)

levelDb := implement.NewUserLevelDb(db.Db)
levels, err1 := levelDb.UserLevelAllByAsc()
if err1 != nil {
e.OutErr(c, e.ERR_DB_ORM, err1.Error())
return
}
levelsList := make([]map[string]interface{}, 0)
levelsMap := make(map[int]string)
for _, level := range levels {
levelsList = append(levelsList, map[string]interface{}{
"id": level.Id,
"name": level.LevelName,
})
levelsMap[level.Id] = level.LevelName
}

list := make([]md.VipEquitySettingNode, len(vipEquitySetting))
for i, settingStruct := range vipEquitySetting {
list[i].VipLevelName = levelsMap[utils.StrToInt(settingStruct.VipLevelId)]
list[i].ExchangeAccountBalanceFee = settingStruct.ExchangeAccountBalanceFee
list[i].DividendRatio = settingStruct.DividendRatio
}

resp := md.GetEggEnergyVipSettingResp{
LevelList: levelsList,
List: list,
}

e.OutSuc(c, resp, nil)
}

// AddEggEnergyVipSetting
// @Summary 制度中心-蛋蛋能量-会员设置(新增)
// @Tags 蛋蛋能量
// @Description 会员设置(新增)
// @Accept json
// @Produce json
// @param Authorization header string true "验证参数Bearer和token空格拼接"
// @Param req body md.UpdateEggEnergyVipSettingReq true "system_id 必填"
// @Success 200 {int} "修改数据条数"
// @Failure 400 {object} md.Response "具体错误"
// @Router /api/institutionalManagement/eggEnergy/addVipSetting [post]
func AddEggEnergyVipSetting(c *gin.Context) {
var req *md.AddEggEnergyVipSettingReq
if err1 := c.ShouldBindJSON(&req); err1 != nil {
e.OutErr(c, e.ERR_INVALID_ARGS, err1.Error())
return
}

setting := md2.VipEquitySettingStruct{
VipLevelId: req.VipLevelId,
ExchangeAccountBalanceFee: req.ExchangeAccountBalanceFee,
DividendRatio: req.DividendRatio,
}

basicSettingDb := implement.NewEggEnergyBasicSettingDb(db.Db)
basicSettings, err1 := basicSettingDb.EggEnergyBasicSettingGetOne()
if err1 != nil {
e.OutErr(c, e.ERR_DB_ORM, err1.Error())
return
}
if basicSettings == nil {
e.OutErr(c, e.ERR_NO_DATA, errors.New("未能获取基础设置"))
return
}

var vipEquitySetting []md2.VipEquitySettingStruct
utils.Unserialize([]byte(basicSettings.VipEquitySetting), &vipEquitySetting)

vipEquitySetting = append(vipEquitySetting, setting)
vipEquitySettingStr := utils.SerializeStr(vipEquitySetting)
basicSettings.VipEquitySetting = vipEquitySettingStr

session := db.Db.NewSession()
affected, err := basicSettingDb.EggEnergyBasicSettingUpdate(session, basicSettings.Id, basicSettings, "vip_equity_setting")
if err != nil {
e.OutErr(c, e.ERR_DB_ORM, err.Error())
return
}
e.OutSuc(c, affected, nil)
}

// UpdateEggEnergyVipSetting
// @Summary 制度中心-蛋蛋能量-会员设置(更新)
// @Tags 蛋蛋能量
// @Description 会员设置(更新)
// @Accept json
// @Produce json
// @param Authorization header string true "验证参数Bearer和token空格拼接"
// @Param req body md.UpdateEggEnergyVipSettingReq true "填入修改后的列表(会员等级名称、兑换余额手续费、分红比例)"
// @Success 200 {int} "修改数据条数"
// @Failure 400 {object} md.Response "具体错误"
// @Router /api/institutionalManagement/eggEnergy/updateVipSetting [post]
func UpdateEggEnergyVipSetting(c *gin.Context) {
var req *md.UpdateEggEnergyVipSettingReq
if err1 := c.ShouldBindJSON(&req); err1 != nil {
e.OutErr(c, e.ERR_INVALID_ARGS, err1.Error())
return
}

basicSettingDb := implement.NewEggEnergyBasicSettingDb(db.Db)
basicSettings, err1 := basicSettingDb.EggEnergyBasicSettingGetOne()
if err1 != nil {
e.OutErr(c, e.ERR_DB_ORM, err1.Error())
return
}
if basicSettings == nil {
e.OutErr(c, e.ERR_NO_DATA, errors.New("未能获取基础设置"))
return
}

levelDb := implement.NewUserLevelDb(db.Db)
levels, err1 := levelDb.UserLevelAllByAsc()
if err1 != nil {
e.OutErr(c, e.ERR_DB_ORM, err1.Error())
return
}
levelsList := make([]map[string]interface{}, 0)
levelsMap := make(map[string]int)
for _, level := range levels {
levelsList = append(levelsList, map[string]interface{}{
"id": level.Id,
"name": level.LevelName,
})
levelsMap[level.LevelName] = level.Id
}

vipEquitySetting := make([]md2.VipEquitySettingStruct, len(req.List))
for i, node := range req.List {
vipEquitySetting[i] = md2.VipEquitySettingStruct{
VipLevelId: utils.IntToStr(levelsMap[node.VipLevelName]),
ExchangeAccountBalanceFee: node.ExchangeAccountBalanceFee,
DividendRatio: node.DividendRatio,
}
}

vipEquitySettingStr := utils.SerializeStr(vipEquitySetting)
basicSettings.VipEquitySetting = vipEquitySettingStr
session := db.Db.NewSession()
affected, err := basicSettingDb.EggEnergyBasicSettingUpdate(session, basicSettings.Id, basicSettings, "vip_equity_setting")
if err != nil {
e.OutErr(c, e.ERR_DB_ORM, err.Error())
return
}
e.OutSuc(c, affected, nil)
}

// GetEggCoreDataList
// @Summary 制度中心-蛋蛋能量-数据概览(获取)
// @Tags 蛋蛋能量


+ 24
- 3
app/md/institutional_management/egg_energy/md_basic.go Voir le fichier

@@ -40,9 +40,9 @@ type DataSetting struct {
TotalAngelInvestor string `json:"total_angel_investor" example:"天使投资人"` // 天使投资人
TotalOperateFund string `json:"total_operate_fund" example:"运营资金"` // 运营资金
TotalEcologicalDevelopment string `json:"total_ecological_development" example:"当前价格"` // 生态建设
// TotalTeamDividends string`json:"total_team_dividends" example:"团队分红"` // 团队分红
TotalUserForPerson string `json:"total_user_for_person" example:"个人区域"` // 个人区域
TotalUserForTeam string `json:"total_user_for_team" example:"团队区域"` // 团队区域
TotalTeamDividends string `json:"total_team_dividends" example:"团队分红"` // 团队分红
TotalUserForPerson string `json:"total_user_for_person" example:"个人区域"` // 个人区域
TotalUserForTeam string `json:"total_user_for_team" example:"团队区域"` // 团队区域
}

type GetEggEnergyBasicResp struct {
@@ -69,6 +69,27 @@ type UpdateEggEnergyBasicReq struct {
NewUserIncentiveRules md.NewUserRewardRules `json:"new_user_incentive_rules"` // 新用户奖励规则 // 新用户奖励规则
}

type VipEquitySettingNode struct {
VipLevelName string `json:"vip_level_name"` // 会员等级名称
ExchangeAccountBalanceFee string `json:"exchange_account_balance_fee"` //兑换余额手续费
DividendRatio string `json:"dividend_ratio"` //分红比例
}

type GetEggEnergyVipSettingResp struct {
LevelList []map[string]interface{} `json:"level_list"` // 会员等级列表
List []VipEquitySettingNode `json:"list"` // 会员权益设置
}

type AddEggEnergyVipSettingReq struct {
VipLevelId string `json:"vip_level_id"` //会员等级id
ExchangeAccountBalanceFee string `json:"exchange_account_balance_fee"` //兑换余额手续费
DividendRatio string `json:"dividend_ratio"` //分红比例
}

type UpdateEggEnergyVipSettingReq struct {
List []VipEquitySettingNode `json:"list"` // 更新后数据
}

type GetEggCoreDataListResp struct {
PlanetTotalValue string `json:"planet_total_value" example:"星球价值"` // 星球价值
NowPrice string `json:"now_price" example:"当前价格"` // 当前价格


+ 3
- 0
app/router/router.go Voir le fichier

@@ -107,6 +107,9 @@ func rInstitutionalManagement(r *gin.RouterGroup) { //制度管理
rEggEnergy.GET("/getVirtualCoinList", egg_energy.GetVirtualCoinList)
rEggEnergy.GET("/getBasic", egg_energy.GetEggEnergyBasic)
rEggEnergy.POST("/updateBasic", egg_energy.UpdateEggEnergyBasic)
rEggEnergy.GET("/getVipSetting", egg_energy.GetEggEnergyVipSetting)
rEggEnergy.POST("/addVipSetting", egg_energy.AddEggEnergyVipSetting)
rEggEnergy.POST("/updateVipSetting", egg_energy.UpdateEggEnergyVipSetting)
rEggEnergyUserCoin := rEggEnergy.Group("/userCoin")
{
rEggEnergyUserCoin.POST("/activePointsUserCoinList", egg_energy.GetActivePointsUserCoinList)


+ 308
- 1
docs/docs.go Voir le fichier

@@ -186,6 +186,53 @@ const docTemplate = `{
}
}
},
"/api/institutionalManagement/eggEnergy/addVipSetting": {
"post": {
"description": "会员设置(新增)",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"蛋蛋能量"
],
"summary": "制度中心-蛋蛋能量-会员设置(新增)",
"parameters": [
{
"type": "string",
"description": "验证参数Bearer和token空格拼接",
"name": "Authorization",
"in": "header",
"required": true
},
{
"description": "system_id 必填",
"name": "req",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/md.UpdateEggEnergyVipSettingReq"
}
}
],
"responses": {
"200": {
"description": "修改数据条数",
"schema": {
"type": "int"
}
},
"400": {
"description": "具体错误",
"schema": {
"$ref": "#/definitions/md.Response"
}
}
}
}
},
"/api/institutionalManagement/eggEnergy/availableEnergy/list": {
"post": {
"description": "动态数据流水(获取)",
@@ -412,6 +459,44 @@ const docTemplate = `{
}
}
},
"/api/institutionalManagement/eggEnergy/getVipSetting": {
"get": {
"description": "基础会员设置(获取)",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"蛋蛋能量"
],
"summary": "制度中心-蛋蛋能量-基础会员设置(获取)",
"parameters": [
{
"type": "string",
"description": "验证参数Bearer和token空格拼接",
"name": "Authorization",
"in": "header",
"required": true
}
],
"responses": {
"200": {
"description": "具体数据",
"schema": {
"$ref": "#/definitions/md.GetEggEnergyVipSettingResp"
}
},
"400": {
"description": "具体错误",
"schema": {
"$ref": "#/definitions/md.Response"
}
}
}
}
},
"/api/institutionalManagement/eggEnergy/getVirtualCoinList": {
"get": {
"description": "查询所有币种(获取)",
@@ -864,6 +949,53 @@ const docTemplate = `{
}
}
},
"/api/institutionalManagement/eggEnergy/updateVipSetting": {
"post": {
"description": "会员设置(更新)",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"蛋蛋能量"
],
"summary": "制度中心-蛋蛋能量-会员设置(更新)",
"parameters": [
{
"type": "string",
"description": "验证参数Bearer和token空格拼接",
"name": "Authorization",
"in": "header",
"required": true
},
{
"description": "填入修改后的列表(会员等级名称、兑换余额手续费、分红比例)",
"name": "req",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/md.UpdateEggEnergyVipSettingReq"
}
}
],
"responses": {
"200": {
"description": "修改数据条数",
"schema": {
"type": "int"
}
},
"400": {
"description": "具体错误",
"schema": {
"$ref": "#/definitions/md.Response"
}
}
}
}
},
"/api/institutionalManagement/eggEnergy/userCoin/activePointsUserCoinFlowList": {
"post": {
"description": "活跃积分持有流水(查询)",
@@ -1559,6 +1691,53 @@ const docTemplate = `{
}
}
},
"/api/institutionalManagement/publicPlatoon/selectMember": {
"post": {
"description": "公排基础设置选择会员(查询)",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"公排管理"
],
"summary": "制度中心-公排管理-公排基础设置选择会员(查询)",
"parameters": [
{
"type": "string",
"description": "验证参数Bearer和token空格拼接",
"name": "Authorization",
"in": "header",
"required": true
},
{
"description": "分页信息必填",
"name": "req",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/md.SelectMemberReq"
}
}
],
"responses": {
"200": {
"description": "具体数据",
"schema": {
"$ref": "#/definitions/md.SelectMemberResp"
}
},
"400": {
"description": "具体错误",
"schema": {
"$ref": "#/definitions/md.Response"
}
}
}
}
},
"/api/institutionalManagement/publicPlatoon/updateBasic": {
"put": {
"description": "公排基础设置(修改)",
@@ -2247,13 +2426,18 @@ const docTemplate = `{
"type": "string",
"example": "运营资金"
},
"total_team_dividends": {
"description": "团队分红",
"type": "string",
"example": "团队分红"
},
"total_technology_team": {
"description": "技术团队",
"type": "string",
"example": "技术团队"
},
"total_user_for_person": {
"description": "TotalTeamDividends string` + "`" + `json:\"total_team_dividends\" example:\"团队分红\"` + "`" + ` // 团队分红",
"description": "个人区域",
"type": "string",
"example": "个人区域"
},
@@ -2878,6 +3062,26 @@ const docTemplate = `{
}
}
},
"md.GetEggEnergyVipSettingResp": {
"type": "object",
"properties": {
"level_list": {
"description": "会员等级列表",
"type": "array",
"items": {
"type": "object",
"additionalProperties": true
}
},
"list": {
"description": "会员权益设置",
"type": "array",
"items": {
"$ref": "#/definitions/md.VipEquitySettingNode"
}
}
}
},
"md.GetFreePublishUserReq": {
"type": "object",
"properties": {
@@ -3680,6 +3884,80 @@ const docTemplate = `{
}
}
},
"md.SelectMemberNode": {
"type": "object",
"properties": {
"avatar": {
"description": "会员头像",
"type": "string"
},
"level": {
"description": "会员等级",
"type": "string"
},
"nickname": {
"description": "会员昵称",
"type": "string"
},
"phone": {
"description": "会员手机号",
"type": "string"
},
"uid": {
"description": "会员 ID",
"type": "integer"
}
}
},
"md.SelectMemberReq": {
"type": "object",
"properties": {
"level": {
"description": "会员等级",
"type": "integer"
},
"limit": {
"description": "每页大小",
"type": "integer"
},
"nickname": {
"description": "会员昵称",
"type": "string"
},
"page": {
"description": "页数",
"type": "integer"
},
"phone": {
"description": "会员手机号",
"type": "string"
},
"uid": {
"description": "会员 ID",
"type": "integer"
}
}
},
"md.SelectMemberResp": {
"type": "object",
"properties": {
"list": {
"description": "会员数据",
"type": "array",
"items": {
"$ref": "#/definitions/md.SelectMemberNode"
}
},
"paginate": {
"description": "分页信息",
"allOf": [
{
"$ref": "#/definitions/applet_app_md_institutional_management_public_platoon.Paginate"
}
]
}
}
},
"md.SetBasicReq": {
"type": "object",
"properties": {
@@ -4091,6 +4369,18 @@ const docTemplate = `{
}
}
},
"md.UpdateEggEnergyVipSettingReq": {
"type": "object",
"properties": {
"list": {
"description": "更新后数据",
"type": "array",
"items": {
"$ref": "#/definitions/md.VipEquitySettingNode"
}
}
}
},
"md.UpdatePublicPlatoonBasicReq": {
"type": "object",
"properties": {
@@ -4820,6 +5110,23 @@ const docTemplate = `{
}
}
},
"md.VipEquitySettingNode": {
"type": "object",
"properties": {
"dividend_ratio": {
"description": "分红比例",
"type": "string"
},
"exchange_account_balance_fee": {
"description": "兑换余额手续费",
"type": "string"
},
"vip_level_name": {
"description": "会员等级名称",
"type": "string"
}
}
},
"md.VirtualCoin": {
"type": "object",
"properties": {


+ 308
- 1
docs/swagger.json Voir le fichier

@@ -179,6 +179,53 @@
}
}
},
"/api/institutionalManagement/eggEnergy/addVipSetting": {
"post": {
"description": "会员设置(新增)",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"蛋蛋能量"
],
"summary": "制度中心-蛋蛋能量-会员设置(新增)",
"parameters": [
{
"type": "string",
"description": "验证参数Bearer和token空格拼接",
"name": "Authorization",
"in": "header",
"required": true
},
{
"description": "system_id 必填",
"name": "req",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/md.UpdateEggEnergyVipSettingReq"
}
}
],
"responses": {
"200": {
"description": "修改数据条数",
"schema": {
"type": "int"
}
},
"400": {
"description": "具体错误",
"schema": {
"$ref": "#/definitions/md.Response"
}
}
}
}
},
"/api/institutionalManagement/eggEnergy/availableEnergy/list": {
"post": {
"description": "动态数据流水(获取)",
@@ -405,6 +452,44 @@
}
}
},
"/api/institutionalManagement/eggEnergy/getVipSetting": {
"get": {
"description": "基础会员设置(获取)",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"蛋蛋能量"
],
"summary": "制度中心-蛋蛋能量-基础会员设置(获取)",
"parameters": [
{
"type": "string",
"description": "验证参数Bearer和token空格拼接",
"name": "Authorization",
"in": "header",
"required": true
}
],
"responses": {
"200": {
"description": "具体数据",
"schema": {
"$ref": "#/definitions/md.GetEggEnergyVipSettingResp"
}
},
"400": {
"description": "具体错误",
"schema": {
"$ref": "#/definitions/md.Response"
}
}
}
}
},
"/api/institutionalManagement/eggEnergy/getVirtualCoinList": {
"get": {
"description": "查询所有币种(获取)",
@@ -857,6 +942,53 @@
}
}
},
"/api/institutionalManagement/eggEnergy/updateVipSetting": {
"post": {
"description": "会员设置(更新)",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"蛋蛋能量"
],
"summary": "制度中心-蛋蛋能量-会员设置(更新)",
"parameters": [
{
"type": "string",
"description": "验证参数Bearer和token空格拼接",
"name": "Authorization",
"in": "header",
"required": true
},
{
"description": "填入修改后的列表(会员等级名称、兑换余额手续费、分红比例)",
"name": "req",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/md.UpdateEggEnergyVipSettingReq"
}
}
],
"responses": {
"200": {
"description": "修改数据条数",
"schema": {
"type": "int"
}
},
"400": {
"description": "具体错误",
"schema": {
"$ref": "#/definitions/md.Response"
}
}
}
}
},
"/api/institutionalManagement/eggEnergy/userCoin/activePointsUserCoinFlowList": {
"post": {
"description": "活跃积分持有流水(查询)",
@@ -1552,6 +1684,53 @@
}
}
},
"/api/institutionalManagement/publicPlatoon/selectMember": {
"post": {
"description": "公排基础设置选择会员(查询)",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"公排管理"
],
"summary": "制度中心-公排管理-公排基础设置选择会员(查询)",
"parameters": [
{
"type": "string",
"description": "验证参数Bearer和token空格拼接",
"name": "Authorization",
"in": "header",
"required": true
},
{
"description": "分页信息必填",
"name": "req",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/md.SelectMemberReq"
}
}
],
"responses": {
"200": {
"description": "具体数据",
"schema": {
"$ref": "#/definitions/md.SelectMemberResp"
}
},
"400": {
"description": "具体错误",
"schema": {
"$ref": "#/definitions/md.Response"
}
}
}
}
},
"/api/institutionalManagement/publicPlatoon/updateBasic": {
"put": {
"description": "公排基础设置(修改)",
@@ -2240,13 +2419,18 @@
"type": "string",
"example": "运营资金"
},
"total_team_dividends": {
"description": "团队分红",
"type": "string",
"example": "团队分红"
},
"total_technology_team": {
"description": "技术团队",
"type": "string",
"example": "技术团队"
},
"total_user_for_person": {
"description": "TotalTeamDividends string`json:\"total_team_dividends\" example:\"团队分红\"` // 团队分红",
"description": "个人区域",
"type": "string",
"example": "个人区域"
},
@@ -2871,6 +3055,26 @@
}
}
},
"md.GetEggEnergyVipSettingResp": {
"type": "object",
"properties": {
"level_list": {
"description": "会员等级列表",
"type": "array",
"items": {
"type": "object",
"additionalProperties": true
}
},
"list": {
"description": "会员权益设置",
"type": "array",
"items": {
"$ref": "#/definitions/md.VipEquitySettingNode"
}
}
}
},
"md.GetFreePublishUserReq": {
"type": "object",
"properties": {
@@ -3673,6 +3877,80 @@
}
}
},
"md.SelectMemberNode": {
"type": "object",
"properties": {
"avatar": {
"description": "会员头像",
"type": "string"
},
"level": {
"description": "会员等级",
"type": "string"
},
"nickname": {
"description": "会员昵称",
"type": "string"
},
"phone": {
"description": "会员手机号",
"type": "string"
},
"uid": {
"description": "会员 ID",
"type": "integer"
}
}
},
"md.SelectMemberReq": {
"type": "object",
"properties": {
"level": {
"description": "会员等级",
"type": "integer"
},
"limit": {
"description": "每页大小",
"type": "integer"
},
"nickname": {
"description": "会员昵称",
"type": "string"
},
"page": {
"description": "页数",
"type": "integer"
},
"phone": {
"description": "会员手机号",
"type": "string"
},
"uid": {
"description": "会员 ID",
"type": "integer"
}
}
},
"md.SelectMemberResp": {
"type": "object",
"properties": {
"list": {
"description": "会员数据",
"type": "array",
"items": {
"$ref": "#/definitions/md.SelectMemberNode"
}
},
"paginate": {
"description": "分页信息",
"allOf": [
{
"$ref": "#/definitions/applet_app_md_institutional_management_public_platoon.Paginate"
}
]
}
}
},
"md.SetBasicReq": {
"type": "object",
"properties": {
@@ -4084,6 +4362,18 @@
}
}
},
"md.UpdateEggEnergyVipSettingReq": {
"type": "object",
"properties": {
"list": {
"description": "更新后数据",
"type": "array",
"items": {
"$ref": "#/definitions/md.VipEquitySettingNode"
}
}
}
},
"md.UpdatePublicPlatoonBasicReq": {
"type": "object",
"properties": {
@@ -4813,6 +5103,23 @@
}
}
},
"md.VipEquitySettingNode": {
"type": "object",
"properties": {
"dividend_ratio": {
"description": "分红比例",
"type": "string"
},
"exchange_account_balance_fee": {
"description": "兑换余额手续费",
"type": "string"
},
"vip_level_name": {
"description": "会员等级名称",
"type": "string"
}
}
},
"md.VirtualCoin": {
"type": "object",
"properties": {


+ 208
- 2
docs/swagger.yaml Voir le fichier

@@ -196,13 +196,16 @@ definitions:
description: 运营资金
example: 运营资金
type: string
total_team_dividends:
description: 团队分红
example: 团队分红
type: string
total_technology_team:
description: 技术团队
example: 技术团队
type: string
total_user_for_person:
description: TotalTeamDividends string`json:"total_team_dividends" example:"团队分红"`
// 团队分红
description: 个人区域
example: 个人区域
type: string
total_user_for_team:
@@ -623,6 +626,20 @@ definitions:
- $ref: '#/definitions/md.VideoRewardSetting'
description: 视频奖励
type: object
md.GetEggEnergyVipSettingResp:
properties:
level_list:
description: 会员等级列表
items:
additionalProperties: true
type: object
type: array
list:
description: 会员权益设置
items:
$ref: '#/definitions/md.VipEquitySettingNode'
type: array
type: object
md.GetFreePublishUserReq:
properties:
limit:
@@ -1180,6 +1197,57 @@ definitions:
type: object
type: array
type: object
md.SelectMemberNode:
properties:
avatar:
description: 会员头像
type: string
level:
description: 会员等级
type: string
nickname:
description: 会员昵称
type: string
phone:
description: 会员手机号
type: string
uid:
description: 会员 ID
type: integer
type: object
md.SelectMemberReq:
properties:
level:
description: 会员等级
type: integer
limit:
description: 每页大小
type: integer
nickname:
description: 会员昵称
type: string
page:
description: 页数
type: integer
phone:
description: 会员手机号
type: string
uid:
description: 会员 ID
type: integer
type: object
md.SelectMemberResp:
properties:
list:
description: 会员数据
items:
$ref: '#/definitions/md.SelectMemberNode'
type: array
paginate:
allOf:
- $ref: '#/definitions/applet_app_md_institutional_management_public_platoon.Paginate'
description: 分页信息
type: object
md.SetBasicReq:
properties:
oss_access_key_id:
@@ -1456,6 +1524,14 @@ definitions:
- $ref: '#/definitions/md.VideoRewardSetting'
description: 视频奖励
type: object
md.UpdateEggEnergyVipSettingReq:
properties:
list:
description: 更新后数据
items:
$ref: '#/definitions/md.VipEquitySettingNode'
type: array
type: object
md.UpdatePublicPlatoonBasicReq:
properties:
is_open:
@@ -1975,6 +2051,18 @@ definitions:
description: 奖励X个活跃积分
type: string
type: object
md.VipEquitySettingNode:
properties:
dividend_ratio:
description: 分红比例
type: string
exchange_account_balance_fee:
description: 兑换余额手续费
type: string
vip_level_name:
description: 会员等级名称
type: string
type: object
md.VirtualCoin:
properties:
create_at:
@@ -2164,6 +2252,37 @@ paths:
summary: Demo测试
tags:
- Demo
/api/institutionalManagement/eggEnergy/addVipSetting:
post:
consumes:
- application/json
description: 会员设置(新增)
parameters:
- description: 验证参数Bearer和token空格拼接
in: header
name: Authorization
required: true
type: string
- description: system_id 必填
in: body
name: req
required: true
schema:
$ref: '#/definitions/md.UpdateEggEnergyVipSettingReq'
produces:
- application/json
responses:
"200":
description: 修改数据条数
schema:
type: int
"400":
description: 具体错误
schema:
$ref: '#/definitions/md.Response'
summary: 制度中心-蛋蛋能量-会员设置(新增)
tags:
- 蛋蛋能量
/api/institutionalManagement/eggEnergy/availableEnergy/list:
post:
consumes:
@@ -2313,6 +2432,31 @@ paths:
summary: 制度中心-蛋蛋能量-基础设置(获取)
tags:
- 蛋蛋能量
/api/institutionalManagement/eggEnergy/getVipSetting:
get:
consumes:
- application/json
description: 基础会员设置(获取)
parameters:
- description: 验证参数Bearer和token空格拼接
in: header
name: Authorization
required: true
type: string
produces:
- application/json
responses:
"200":
description: 具体数据
schema:
$ref: '#/definitions/md.GetEggEnergyVipSettingResp'
"400":
description: 具体错误
schema:
$ref: '#/definitions/md.Response'
summary: 制度中心-蛋蛋能量-基础会员设置(获取)
tags:
- 蛋蛋能量
/api/institutionalManagement/eggEnergy/getVirtualCoinList:
get:
consumes:
@@ -2611,6 +2755,37 @@ paths:
summary: 制度中心-蛋蛋能量-基础设置(更新)
tags:
- 蛋蛋能量
/api/institutionalManagement/eggEnergy/updateVipSetting:
post:
consumes:
- application/json
description: 会员设置(更新)
parameters:
- description: 验证参数Bearer和token空格拼接
in: header
name: Authorization
required: true
type: string
- description: 填入修改后的列表(会员等级名称、兑换余额手续费、分红比例)
in: body
name: req
required: true
schema:
$ref: '#/definitions/md.UpdateEggEnergyVipSettingReq'
produces:
- application/json
responses:
"200":
description: 修改数据条数
schema:
type: int
"400":
description: 具体错误
schema:
$ref: '#/definitions/md.Response'
summary: 制度中心-蛋蛋能量-会员设置(更新)
tags:
- 蛋蛋能量
/api/institutionalManagement/eggEnergy/userCoin/activePointsUserCoinFlowList:
post:
consumes:
@@ -3070,6 +3245,37 @@ paths:
summary: 制度中心-公排管理-关系分布图(获取)
tags:
- 公排管理
/api/institutionalManagement/publicPlatoon/selectMember:
post:
consumes:
- application/json
description: 公排基础设置选择会员(查询)
parameters:
- description: 验证参数Bearer和token空格拼接
in: header
name: Authorization
required: true
type: string
- description: 分页信息必填
in: body
name: req
required: true
schema:
$ref: '#/definitions/md.SelectMemberReq'
produces:
- application/json
responses:
"200":
description: 具体数据
schema:
$ref: '#/definitions/md.SelectMemberResp'
"400":
description: 具体错误
schema:
$ref: '#/definitions/md.Response'
summary: 制度中心-公排管理-公排基础设置选择会员(查询)
tags:
- 公排管理
/api/institutionalManagement/publicPlatoon/updateBasic:
put:
consumes:


+ 2
- 1
go.mod Voir le fichier

@@ -72,6 +72,7 @@ require (
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/golang/snappy v0.0.4 // indirect
github.com/google/go-cmp v0.5.9 // indirect
github.com/gookit/color v1.3.8 // indirect
github.com/gorilla/context v1.1.1 // indirect
github.com/gorilla/securecookie v1.1.1 // indirect
@@ -86,7 +87,7 @@ require (
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/onsi/ginkgo v1.16.5 // indirect
github.com/onsi/gomega v1.19.0 // indirect
github.com/onsi/gomega v1.27.8 // indirect
github.com/pelletier/go-toml/v2 v2.2.1 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/saintfish/chardet v0.0.0-20230101081208-5e3ef4b5456d // indirect


Chargement…
Annuler
Enregistrer