shenjiachi před 1 měsícem
rodič
revize
0eea4eb57f
5 změnil soubory, kde provedl 104 přidání a 84 odebrání
  1. +43
    -23
      app/hdl/institutional_management/egg_energy/hdl_user_coin.go
  2. +4
    -4
      app/router/router.go
  3. +19
    -19
      docs/docs.go
  4. +19
    -19
      docs/swagger.json
  5. +19
    -19
      docs/swagger.yaml

+ 43
- 23
app/hdl/institutional_management/egg_energy/hdl_user_coin.go Zobrazit soubor

@@ -9,18 +9,18 @@ import (
"github.com/gin-gonic/gin"
)

// GetActivePointsUserCoinList
// @Summary 制度中心-活跃积分持有者明细-活跃积分持有(获取)
// GetEggEnergyUserCoinList
// @Summary 制度中心-活跃积分持有者明细-蛋蛋能量明细(获取)
// @Tags 公排管理
// @Description 活跃积分持有(获取)
// @Description 蛋蛋能量明细(获取)
// @Accept json
// @Produce json
// @param Authorization header string true "验证参数Bearer和token空格拼接"
// @Param req body md.GetActivePointsUserCoinListReq false "落地页不填页大小默认20条数据"
// @Success 200 {object} md.GetActivePointsUserCoinListResp "成功返回"
// @Failure 400 {object} md.Response "具体错误"
// @Router /api/institutionalManagement/eggEnergy/userCoin/activePointsUserCoinList [post]
func GetActivePointsUserCoinList(c *gin.Context) {
// @Router /api/institutionalManagement/eggEnergy/userCoin/eggEnergyUserCoinList [post]
func GetEggEnergyUserCoinList(c *gin.Context) {
var req *md.GetActivePointsUserCoinListReq
if err1 := c.ShouldBindJSON(&req); err1 != nil {
e.OutErr(c, e.ERR_INVALID_ARGS, err1.Error())
@@ -33,16 +33,26 @@ func GetActivePointsUserCoinList(c *gin.Context) {
req.Page = 1
}

eggEnergyBasicSettingDb := implement.NewEggEnergyBasicSettingDb(db.Db)
eggEnergyBasicSetting, err := eggEnergyBasicSettingDb.EggEnergyBasicSettingGetOneByParams(map[string]interface{}{
"key": "is_open",
"value": 1,
})
if err != nil {
e.OutErr(c, e.ERR_DB_ORM, err.Error())
return
}

kindList := make([]md.VirtualCoinListNode, 2)
kind1 := md.VirtualCoinListNode{
Kind: 1,
CoinID: 1,
Name: "个人活跃账户币",
CoinID: eggEnergyBasicSetting.PersonEggEnergyCoinId,
Name: "个人蛋蛋能量",
}
kind2 := md.VirtualCoinListNode{
Kind: 2,
CoinID: 2,
Name: "团队活跃账户币",
CoinID: eggEnergyBasicSetting.TeamEggEnergyCoinId,
Name: "团队蛋蛋能量",
}
kindList[0] = kind1
kindList[1] = kind2
@@ -102,10 +112,10 @@ func GetActivePointsUserCoinList(c *gin.Context) {
e.OutSuc(c, resp, nil)
}

// GetActivePointsUserCoinFlowList
// @Summary 制度中心-活跃积分持有者明细-活跃积分持有流水(查询)
// GetEggEnergyUserCoinFlowList
// @Summary 制度中心-活跃积分持有者明细-蛋蛋能量流水(查询)
// @Tags 公排管理
// @Description 活跃积分持有流水(查询)
// @Description 蛋蛋能量流水(查询)
// @Accept json
// @Produce json
// @param Authorization header string true "验证参数Bearer和token空格拼接"
@@ -113,7 +123,7 @@ func GetActivePointsUserCoinList(c *gin.Context) {
// @Success 200 {object} md.GetActivePointsUserCoinFlowListResp "成功返回"
// @Failure 400 {object} md.Response "具体错误"
// @Router /api/institutionalManagement/eggEnergy/userCoin/activePointsUserCoinFlowList [post]
func GetActivePointsUserCoinFlowList(c *gin.Context) {
func GetEggEnergyUserCoinFlowList(c *gin.Context) {
var req *md.GetActivePointsUserCoinFlowListReq
if err1 := c.ShouldBindJSON(&req); err1 != nil {
e.OutErr(c, e.ERR_INVALID_ARGS, err1.Error())
@@ -167,7 +177,7 @@ func GetActivePointsUserCoinFlowList(c *gin.Context) {
e.OutSuc(c, resp, nil)
}

// GetGreenEnergyUserCoinList
// GetEggPointsUserCoinList
// @Summary 制度中心-绿色能量持有者明细-绿色能量(获取)
// @Tags 公排管理
// @Description 绿色能量(获取)
@@ -177,8 +187,8 @@ func GetActivePointsUserCoinFlowList(c *gin.Context) {
// @Param req body md.GetGreenEnergyUserCoinListReq false "落地页不填页大小默认20条数据"
// @Success 200 {object} md.GetGreenEnergyUserCoinListResp "成功返回"
// @Failure 400 {object} md.Response "具体错误"
// @Router /api/institutionalManagement/eggEnergy/userCoin/greenEnergyUserCoinList [post]
func GetGreenEnergyUserCoinList(c *gin.Context) {
// @Router /api/institutionalManagement/eggEnergy/userCoin/eggPointsUserCoinList [post]
func GetEggPointsUserCoinList(c *gin.Context) {
var req *md.GetGreenEnergyUserCoinListReq
if err1 := c.ShouldBindJSON(&req); err1 != nil {
e.OutErr(c, e.ERR_INVALID_ARGS, err1.Error())
@@ -191,16 +201,26 @@ func GetGreenEnergyUserCoinList(c *gin.Context) {
req.Page = 1
}

eggEnergyBasicSettingDb := implement.NewEggEnergyBasicSettingDb(db.Db)
eggEnergyBasicSetting, err := eggEnergyBasicSettingDb.EggEnergyBasicSettingGetOneByParams(map[string]interface{}{
"key": "is_open",
"value": 1,
})
if err != nil {
e.OutErr(c, e.ERR_DB_ORM, err.Error())
return
}

kindList := make([]md.VirtualCoinListNode, 2)
kind1 := md.VirtualCoinListNode{
Kind: 1,
CoinID: 3,
Name: "个人绿色能量币",
CoinID: eggEnergyBasicSetting.PersonEggPointsCoinId,
Name: "个人蛋蛋积分",
}
kind2 := md.VirtualCoinListNode{
Kind: 2,
CoinID: 4,
Name: "团队绿色能量币",
CoinID: eggEnergyBasicSetting.TeamEggPointsCoinId,
Name: "团队蛋蛋积分",
}
kindList[0] = kind1
kindList[1] = kind2
@@ -260,7 +280,7 @@ func GetGreenEnergyUserCoinList(c *gin.Context) {
e.OutSuc(c, resp, nil)
}

// GetGreenEnergyUserCoinFlowList
// GetEggPointsUserCoinFlowList
// @Summary 制度中心-绿色能量持有者明细-绿色能量持有流水(查询)
// @Tags 公排管理
// @Description 绿色能量持有流水(查询)
@@ -270,8 +290,8 @@ func GetGreenEnergyUserCoinList(c *gin.Context) {
// @Param req body md.GetGreenEnergyUserCoinFlowListReq true "至少传入 货币类型 ID 用户 UID 页数 每页大小"
// @Success 200 {object} md.GetGreenEnergyUserCoinFlowListResp "成功返回"
// @Failure 400 {object} md.Response "具体错误"
// @Router /api/institutionalManagement/eggEnergy/userCoin/greenEnergyUserCoinFlowList [post]
func GetGreenEnergyUserCoinFlowList(c *gin.Context) {
// @Router /api/institutionalManagement/eggEnergy/userCoin/getEggPointsUserCoinFlowList [post]
func GetEggPointsUserCoinFlowList(c *gin.Context) {
var req *md.GetGreenEnergyUserCoinFlowListReq
if err1 := c.ShouldBindJSON(&req); err1 != nil {
e.OutErr(c, e.ERR_INVALID_ARGS, err1.Error())


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

@@ -113,10 +113,10 @@ func rInstitutionalManagement(r *gin.RouterGroup) { //制度管理
rEggEnergy.POST("/updateVipSetting", egg_energy.UpdateEggEnergyVipSetting)
rEggEnergyUserCoin := rEggEnergy.Group("/userCoin")
{
rEggEnergyUserCoin.POST("/activePointsUserCoinList", egg_energy.GetActivePointsUserCoinList)
rEggEnergyUserCoin.POST("/activePointsUserCoinFlowList", egg_energy.GetActivePointsUserCoinFlowList)
rEggEnergyUserCoin.POST("/greenEnergyUserCoinList", egg_energy.GetGreenEnergyUserCoinList)
rEggEnergyUserCoin.POST("/greenEnergyUserCoinFlowList", egg_energy.GetGreenEnergyUserCoinFlowList)
rEggEnergyUserCoin.POST("/eggEnergyUserCoinList", egg_energy.GetEggEnergyUserCoinList)
rEggEnergyUserCoin.POST("/eggEnergyUserCoinFlowList", egg_energy.GetEggEnergyUserCoinFlowList)
rEggEnergyUserCoin.POST("/eggPointsUserCoinList", egg_energy.GetEggPointsUserCoinList)
rEggEnergyUserCoin.POST("/getEggPointsUserCoinFlowList", egg_energy.GetEggPointsUserCoinFlowList)
}
rEggEnergyAvailableEnergy := rEggEnergy.Group("/availableEnergy")
{


+ 19
- 19
docs/docs.go Zobrazit soubor

@@ -1045,7 +1045,7 @@ const docTemplate = `{
},
"/api/institutionalManagement/eggEnergy/userCoin/activePointsUserCoinFlowList": {
"post": {
"description": "活跃积分持有流水(查询)",
"description": "蛋蛋能量流水(查询)",
"consumes": [
"application/json"
],
@@ -1055,7 +1055,7 @@ const docTemplate = `{
"tags": [
"公排管理"
],
"summary": "制度中心-活跃积分持有者明细-活跃积分持有流水(查询)",
"summary": "制度中心-活跃积分持有者明细-蛋蛋能量流水(查询)",
"parameters": [
{
"type": "string",
@@ -1090,9 +1090,9 @@ const docTemplate = `{
}
}
},
"/api/institutionalManagement/eggEnergy/userCoin/activePointsUserCoinList": {
"/api/institutionalManagement/eggEnergy/userCoin/eggEnergyUserCoinList": {
"post": {
"description": "活跃积分持有(获取)",
"description": "蛋蛋能量明细(获取)",
"consumes": [
"application/json"
],
@@ -1102,7 +1102,7 @@ const docTemplate = `{
"tags": [
"公排管理"
],
"summary": "制度中心-活跃积分持有者明细-活跃积分持有(获取)",
"summary": "制度中心-活跃积分持有者明细-蛋蛋能量明细(获取)",
"parameters": [
{
"type": "string",
@@ -1136,9 +1136,9 @@ const docTemplate = `{
}
}
},
"/api/institutionalManagement/eggEnergy/userCoin/greenEnergyUserCoinFlowList": {
"/api/institutionalManagement/eggEnergy/userCoin/eggPointsUserCoinList": {
"post": {
"description": "绿色能量持有流水(查询)",
"description": "绿色能量(获取)",
"consumes": [
"application/json"
],
@@ -1148,7 +1148,7 @@ const docTemplate = `{
"tags": [
"公排管理"
],
"summary": "制度中心-绿色能量持有者明细-绿色能量持有流水(查询)",
"summary": "制度中心-绿色能量持有者明细-绿色能量(获取)",
"parameters": [
{
"type": "string",
@@ -1158,12 +1158,11 @@ const docTemplate = `{
"required": true
},
{
"description": "至少传入 货币类型 ID 用户 UID 页数 每页大小",
"description": "落地页不填页大小默认20条数据",
"name": "req",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/md.GetGreenEnergyUserCoinFlowListReq"
"$ref": "#/definitions/md.GetGreenEnergyUserCoinListReq"
}
}
],
@@ -1171,7 +1170,7 @@ const docTemplate = `{
"200": {
"description": "成功返回",
"schema": {
"$ref": "#/definitions/md.GetGreenEnergyUserCoinFlowListResp"
"$ref": "#/definitions/md.GetGreenEnergyUserCoinListResp"
}
},
"400": {
@@ -1183,9 +1182,9 @@ const docTemplate = `{
}
}
},
"/api/institutionalManagement/eggEnergy/userCoin/greenEnergyUserCoinList": {
"/api/institutionalManagement/eggEnergy/userCoin/getEggPointsUserCoinFlowList": {
"post": {
"description": "绿色能量(获取)",
"description": "绿色能量持有流水(查询)",
"consumes": [
"application/json"
],
@@ -1195,7 +1194,7 @@ const docTemplate = `{
"tags": [
"公排管理"
],
"summary": "制度中心-绿色能量持有者明细-绿色能量(获取)",
"summary": "制度中心-绿色能量持有者明细-绿色能量持有流水(查询)",
"parameters": [
{
"type": "string",
@@ -1205,11 +1204,12 @@ const docTemplate = `{
"required": true
},
{
"description": "落地页不填页大小默认20条数据",
"description": "至少传入 货币类型 ID 用户 UID 页数 每页大小",
"name": "req",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/md.GetGreenEnergyUserCoinListReq"
"$ref": "#/definitions/md.GetGreenEnergyUserCoinFlowListReq"
}
}
],
@@ -1217,7 +1217,7 @@ const docTemplate = `{
"200": {
"description": "成功返回",
"schema": {
"$ref": "#/definitions/md.GetGreenEnergyUserCoinListResp"
"$ref": "#/definitions/md.GetGreenEnergyUserCoinFlowListResp"
}
},
"400": {
@@ -6595,7 +6595,7 @@ const docTemplate = `{
"description": "兑换余额手续费",
"type": "string"
},
"vip_id": {
"vip_level_id": {
"description": "会员等级ID",
"type": "string"
},


+ 19
- 19
docs/swagger.json Zobrazit soubor

@@ -1038,7 +1038,7 @@
},
"/api/institutionalManagement/eggEnergy/userCoin/activePointsUserCoinFlowList": {
"post": {
"description": "活跃积分持有流水(查询)",
"description": "蛋蛋能量流水(查询)",
"consumes": [
"application/json"
],
@@ -1048,7 +1048,7 @@
"tags": [
"公排管理"
],
"summary": "制度中心-活跃积分持有者明细-活跃积分持有流水(查询)",
"summary": "制度中心-活跃积分持有者明细-蛋蛋能量流水(查询)",
"parameters": [
{
"type": "string",
@@ -1083,9 +1083,9 @@
}
}
},
"/api/institutionalManagement/eggEnergy/userCoin/activePointsUserCoinList": {
"/api/institutionalManagement/eggEnergy/userCoin/eggEnergyUserCoinList": {
"post": {
"description": "活跃积分持有(获取)",
"description": "蛋蛋能量明细(获取)",
"consumes": [
"application/json"
],
@@ -1095,7 +1095,7 @@
"tags": [
"公排管理"
],
"summary": "制度中心-活跃积分持有者明细-活跃积分持有(获取)",
"summary": "制度中心-活跃积分持有者明细-蛋蛋能量明细(获取)",
"parameters": [
{
"type": "string",
@@ -1129,9 +1129,9 @@
}
}
},
"/api/institutionalManagement/eggEnergy/userCoin/greenEnergyUserCoinFlowList": {
"/api/institutionalManagement/eggEnergy/userCoin/eggPointsUserCoinList": {
"post": {
"description": "绿色能量持有流水(查询)",
"description": "绿色能量(获取)",
"consumes": [
"application/json"
],
@@ -1141,7 +1141,7 @@
"tags": [
"公排管理"
],
"summary": "制度中心-绿色能量持有者明细-绿色能量持有流水(查询)",
"summary": "制度中心-绿色能量持有者明细-绿色能量(获取)",
"parameters": [
{
"type": "string",
@@ -1151,12 +1151,11 @@
"required": true
},
{
"description": "至少传入 货币类型 ID 用户 UID 页数 每页大小",
"description": "落地页不填页大小默认20条数据",
"name": "req",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/md.GetGreenEnergyUserCoinFlowListReq"
"$ref": "#/definitions/md.GetGreenEnergyUserCoinListReq"
}
}
],
@@ -1164,7 +1163,7 @@
"200": {
"description": "成功返回",
"schema": {
"$ref": "#/definitions/md.GetGreenEnergyUserCoinFlowListResp"
"$ref": "#/definitions/md.GetGreenEnergyUserCoinListResp"
}
},
"400": {
@@ -1176,9 +1175,9 @@
}
}
},
"/api/institutionalManagement/eggEnergy/userCoin/greenEnergyUserCoinList": {
"/api/institutionalManagement/eggEnergy/userCoin/getEggPointsUserCoinFlowList": {
"post": {
"description": "绿色能量(获取)",
"description": "绿色能量持有流水(查询)",
"consumes": [
"application/json"
],
@@ -1188,7 +1187,7 @@
"tags": [
"公排管理"
],
"summary": "制度中心-绿色能量持有者明细-绿色能量(获取)",
"summary": "制度中心-绿色能量持有者明细-绿色能量持有流水(查询)",
"parameters": [
{
"type": "string",
@@ -1198,11 +1197,12 @@
"required": true
},
{
"description": "落地页不填页大小默认20条数据",
"description": "至少传入 货币类型 ID 用户 UID 页数 每页大小",
"name": "req",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/md.GetGreenEnergyUserCoinListReq"
"$ref": "#/definitions/md.GetGreenEnergyUserCoinFlowListReq"
}
}
],
@@ -1210,7 +1210,7 @@
"200": {
"description": "成功返回",
"schema": {
"$ref": "#/definitions/md.GetGreenEnergyUserCoinListResp"
"$ref": "#/definitions/md.GetGreenEnergyUserCoinFlowListResp"
}
},
"400": {
@@ -6588,7 +6588,7 @@
"description": "兑换余额手续费",
"type": "string"
},
"vip_id": {
"vip_level_id": {
"description": "会员等级ID",
"type": "string"
},


+ 19
- 19
docs/swagger.yaml Zobrazit soubor

@@ -2467,7 +2467,7 @@ definitions:
exchange_account_balance_fee:
description: 兑换余额手续费
type: string
vip_id:
vip_level_id:
description: 会员等级ID
type: string
vip_level_name:
@@ -3271,7 +3271,7 @@ paths:
post:
consumes:
- application/json
description: 活跃积分持有流水(查询)
description: 蛋蛋能量流水(查询)
parameters:
- description: 验证参数Bearer和token空格拼接
in: header
@@ -3295,14 +3295,14 @@ paths:
description: 具体错误
schema:
$ref: '#/definitions/md.Response'
summary: 制度中心-活跃积分持有者明细-活跃积分持有流水(查询)
summary: 制度中心-活跃积分持有者明细-蛋蛋能量流水(查询)
tags:
- 公排管理
/api/institutionalManagement/eggEnergy/userCoin/activePointsUserCoinList:
/api/institutionalManagement/eggEnergy/userCoin/eggEnergyUserCoinList:
post:
consumes:
- application/json
description: 活跃积分持有(获取)
description: 蛋蛋能量明细(获取)
parameters:
- description: 验证参数Bearer和token空格拼接
in: header
@@ -3325,68 +3325,68 @@ paths:
description: 具体错误
schema:
$ref: '#/definitions/md.Response'
summary: 制度中心-活跃积分持有者明细-活跃积分持有(获取)
summary: 制度中心-活跃积分持有者明细-蛋蛋能量明细(获取)
tags:
- 公排管理
/api/institutionalManagement/eggEnergy/userCoin/greenEnergyUserCoinFlowList:
/api/institutionalManagement/eggEnergy/userCoin/eggPointsUserCoinList:
post:
consumes:
- application/json
description: 绿色能量持有流水(查询)
description: 绿色能量(获取)
parameters:
- description: 验证参数Bearer和token空格拼接
in: header
name: Authorization
required: true
type: string
- description: 至少传入 货币类型 ID 用户 UID 页数 每页大小
- description: 落地页不填页大小默认20条数据
in: body
name: req
required: true
schema:
$ref: '#/definitions/md.GetGreenEnergyUserCoinFlowListReq'
$ref: '#/definitions/md.GetGreenEnergyUserCoinListReq'
produces:
- application/json
responses:
"200":
description: 成功返回
schema:
$ref: '#/definitions/md.GetGreenEnergyUserCoinFlowListResp'
$ref: '#/definitions/md.GetGreenEnergyUserCoinListResp'
"400":
description: 具体错误
schema:
$ref: '#/definitions/md.Response'
summary: 制度中心-绿色能量持有者明细-绿色能量持有流水(查询)
summary: 制度中心-绿色能量持有者明细-绿色能量(获取)
tags:
- 公排管理
/api/institutionalManagement/eggEnergy/userCoin/greenEnergyUserCoinList:
/api/institutionalManagement/eggEnergy/userCoin/getEggPointsUserCoinFlowList:
post:
consumes:
- application/json
description: 绿色能量(获取)
description: 绿色能量持有流水(查询)
parameters:
- description: 验证参数Bearer和token空格拼接
in: header
name: Authorization
required: true
type: string
- description: 落地页不填页大小默认20条数据
- description: 至少传入 货币类型 ID 用户 UID 页数 每页大小
in: body
name: req
required: true
schema:
$ref: '#/definitions/md.GetGreenEnergyUserCoinListReq'
$ref: '#/definitions/md.GetGreenEnergyUserCoinFlowListReq'
produces:
- application/json
responses:
"200":
description: 成功返回
schema:
$ref: '#/definitions/md.GetGreenEnergyUserCoinListResp'
$ref: '#/definitions/md.GetGreenEnergyUserCoinFlowListResp'
"400":
description: 具体错误
schema:
$ref: '#/definitions/md.Response'
summary: 制度中心-绿色能量持有者明细-绿色能量(获取)
summary: 制度中心-绿色能量持有者明细-绿色能量持有流水(查询)
tags:
- 公排管理
/api/institutionalManagement/publicPlatoon/communityDividends/communityDividendsAdd:


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