Ver a proveniência

update

master
dengbiao há 1 semana
ascendente
cometimento
1f8160187f
5 ficheiros alterados com 85 adições e 11 eliminações
  1. +53
    -0
      app/hdl/institutional_management/egg_energy/hdl_available_energy.go
  2. +11
    -0
      app/hdl/institutional_management/egg_energy/hdl_basic.go
  3. +5
    -5
      app/hdl/institutional_management/egg_energy/hdl_user_coin.go
  4. +14
    -5
      app/router/router.go
  5. +2
    -1
      go.mod

+ 53
- 0
app/hdl/institutional_management/egg_energy/hdl_available_energy.go Ver ficheiro

@@ -0,0 +1,53 @@
package egg_energy

import (
"applet/app/e"
"code.fnuoos.com/EggPlanet/egg_system_rules.git/rule/egg_energy/enum"
"fmt"
"github.com/gin-gonic/gin"
)

func DynamicDataFlowList(c *gin.Context) {

var kindList = []map[string]interface{}{
{
"name": enum.EggEnergyAvailableEnergyFlowKind.String(enum.PersonalActivePointRedemption),
"value": enum.PersonalActivePointRedemption,
},
{
"name": enum.EggEnergyAvailableEnergyFlowKind.String(enum.TeamActivePointRedemption),
"value": enum.TeamActivePointRedemption,
},
{
"name": enum.EggEnergyAvailableEnergyFlowKind.String(enum.AccountBalanceExchangeEggEnergy),
"value": enum.AccountBalanceExchangeEggEnergy,
},
{
"name": enum.EggEnergyAvailableEnergyFlowKind.String(enum.EggEnergyExchangeAccountBalance),
"value": enum.EggEnergyExchangeAccountBalance,
},
{
"name": enum.EggEnergyAvailableEnergyFlowKind.String(enum.SettlementStarLevelDividends),
"value": enum.SettlementStarLevelDividends,
},
{
"name": enum.EggEnergyAvailableEnergyFlowKind.String(enum.CommunityDividends),
"value": enum.CommunityDividends,
},
{
"name": enum.EggEnergyAvailableEnergyFlowKind.String(enum.PlatformProfitability),
"value": enum.PlatformProfitability,
},
{
"name": enum.EggEnergyAvailableEnergyFlowKind.String(enum.MarketplaceMerchantNumsAutoExchangeMarketplaceMerchantFunds),
"value": enum.MarketplaceMerchantNumsAutoExchangeMarketplaceMerchantFunds,
},
{
"name": enum.EggEnergyAvailableEnergyFlowKind.String(enum.MarketplaceMerchantFundsAutoExchangeMarketplaceMerchantNums),
"value": enum.MarketplaceMerchantFundsAutoExchangeMarketplaceMerchantNums,
},
}

fmt.Println(kindList)
e.OutSuc(c, kindList, nil)
}

+ 11
- 0
app/hdl/institutional_management/egg_energy/hdl_basic.go Ver ficheiro

@@ -0,0 +1,11 @@
package egg_energy

import "github.com/gin-gonic/gin"

func GetEggEnergyBasic(c *gin.Context) {

}

func UpdateEggEnergyBasic(c *gin.Context) {

}

app/hdl/institutional_management/egg_Energy/hdl_basic.go → app/hdl/institutional_management/egg_energy/hdl_user_coin.go Ver ficheiro

@@ -1,4 +1,4 @@
package egg_Energy
package egg_energy

import (
"applet/app/db"
@@ -19,7 +19,7 @@ import (
// @Param req body md.GetActivePointsUserCoinListReq false "落地页不填页大小默认20条数据"
// @Success 200 {object} md.GetActivePointsUserCoinListResp "成功返回"
// @Failure 400 {object} md.Response "具体错误"
// @Router /api/institutionalManagement/eggEnergy/activePointsUserCoinList [post]
// @Router /api/institutionalManagement/eggEnergy/userCoin/activePointsUserCoinList [post]
func GetActivePointsUserCoinList(c *gin.Context) {
var req *md.GetActivePointsUserCoinListReq
if err1 := c.ShouldBindJSON(&req); err1 != nil {
@@ -111,7 +111,7 @@ func GetActivePointsUserCoinList(c *gin.Context) {
// @Param req body md.GetActivePointsUserCoinFlowListReq true "至少传入 货币类型 ID 用户 UID 页数 每页大小"
// @Success 200 {object} md.GetActivePointsUserCoinFlowListResp "成功返回"
// @Failure 400 {object} md.Response "具体错误"
// @Router /api/institutionalManagement/eggEnergy/activePointsUserCoinFlowList [post]
// @Router /api/institutionalManagement/eggEnergy/userCoin/activePointsUserCoinFlowList [post]
func GetActivePointsUserCoinFlowList(c *gin.Context) {
var req *md.GetActivePointsUserCoinFlowListReq
if err1 := c.ShouldBindJSON(&req); err1 != nil {
@@ -176,7 +176,7 @@ 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/greenEnergyUserCoinList [post]
// @Router /api/institutionalManagement/eggEnergy/userCoin/greenEnergyUserCoinList [post]
func GetGreenEnergyUserCoinList(c *gin.Context) {
var req *md.GetGreenEnergyUserCoinListReq
if err1 := c.ShouldBindJSON(&req); err1 != nil {
@@ -268,7 +268,7 @@ 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/greenEnergyUserCoinFlowList [post]
// @Router /api/institutionalManagement/eggEnergy/userCoin/greenEnergyUserCoinFlowList [post]
func GetGreenEnergyUserCoinFlowList(c *gin.Context) {
var req *md.GetGreenEnergyUserCoinFlowListReq
if err1 := c.ShouldBindJSON(&req); err1 != nil {

+ 14
- 5
app/router/router.go Ver ficheiro

@@ -4,7 +4,7 @@ import (
"applet/app/cfg"
"applet/app/hdl"
"applet/app/hdl/comm"
"applet/app/hdl/institutional_management/egg_Energy"
"applet/app/hdl/institutional_management/egg_energy"
"applet/app/hdl/institutional_management/public_platoon"
"applet/app/mw"
_ "applet/docs"
@@ -84,10 +84,19 @@ func rInstitutionalManagement(r *gin.RouterGroup) { //制度管理
}
rEggEnergy := r.Group("/eggEnergy")
{
rEggEnergy.POST("/activePointsUserCoinList", egg_Energy.GetActivePointsUserCoinList)
rEggEnergy.POST("/activePointsUserCoinFlowList", egg_Energy.GetActivePointsUserCoinFlowList)
rEggEnergy.POST("/greenEnergyUserCoinList", egg_Energy.GetGreenEnergyUserCoinList)
rEggEnergy.POST("/greenEnergyUserCoinFlowList", egg_Energy.GetGreenEnergyUserCoinFlowList)
rEggEnergy.GET("/getBasic", egg_energy.GetEggEnergyBasic)
rEggEnergy.POST("/updateBasic", egg_energy.UpdateEggEnergyBasic)
rEggEnergyUserCoin := rPublicPlatoon.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)
}
rEggEnergyAvailableEnergy := rPublicPlatoon.Group("/availableEnergy")
{
rEggEnergyAvailableEnergy.POST("/list", egg_energy.DynamicDataFlowList)
}
}
}



+ 2
- 1
go.mod Ver ficheiro

@@ -32,7 +32,7 @@ require (
)

require (
code.fnuoos.com/EggPlanet/egg_models.git v0.2.0
code.fnuoos.com/EggPlanet/egg_models.git v0.2.1-0.20241112032738-ca9b07ba7b24
code.fnuoos.com/go_rely_warehouse/zyos_go_mq.git v0.0.5
github.com/go-sql-driver/mysql v1.8.1
github.com/gocolly/colly v1.2.0
@@ -40,6 +40,7 @@ require (
)

require (
code.fnuoos.com/EggPlanet/egg_system_rules.git v0.0.2 // indirect
filippo.io/edwards25519 v1.1.0 // indirect
github.com/BurntSushi/toml v1.4.0 // indirect
github.com/KyleBanks/depth v1.2.1 // indirect


Carregando…
Cancelar
Guardar