From 0e3ff8c91a124220ace27762552e0f291b6bd265 Mon Sep 17 00:00:00 2001 From: shenjiachi Date: Fri, 22 Nov 2024 11:13:26 +0800 Subject: [PATCH] update --- .../institutional_management/egg_energy/hdl_basic.go | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/app/hdl/institutional_management/egg_energy/hdl_basic.go b/app/hdl/institutional_management/egg_energy/hdl_basic.go index db7c0d8..de8541b 100644 --- a/app/hdl/institutional_management/egg_energy/hdl_basic.go +++ b/app/hdl/institutional_management/egg_energy/hdl_basic.go @@ -399,9 +399,19 @@ func GetEggCoreDataList(c *gin.Context) { return } + settingDb := implement.NewEggEnergyBasicSettingDb(db.Db) + setting, err := settingDb.EggEnergyBasicSettingGetOne() + if err != nil { + e.OutErr(c, e.ERR_DB_ORM, nil) + return + } + var userHoldTotalNums float64 for _, result := range results { - userHoldTotalNums += utils.StrToFloat64(result["total"]) + switch utils.StrToInt(result["coin_id"]) { + case setting.PersonEggEnergyCoinId, setting.TeamEggEnergyCoinId, setting.PersonEggPointsCoinId, setting.TeamEggPointsCoinId: + userHoldTotalNums += utils.StrToFloat64(result["total"]) + } } resp := md.GetEggCoreDataListResp{