From 57157fb769d27d98d9fa6c944c500511618feab6 Mon Sep 17 00:00:00 2001 From: dengbiao Date: Fri, 21 Jun 2024 21:16:11 +0800 Subject: [PATCH 1/2] update --- ...one_circles_deal_available_green_energy_points.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/rule/one_circles/one_circles_deal_available_green_energy_points.go b/rule/one_circles/one_circles_deal_available_green_energy_points.go index 4467b67..ad2a8fb 100644 --- a/rule/one_circles/one_circles_deal_available_green_energy_points.go +++ b/rule/one_circles/one_circles_deal_available_green_energy_points.go @@ -224,12 +224,12 @@ func DealAvailableGreenEnergyCoin(session *xorm.Session, kind int, amount, amoun starLevelDividends, _ := decimal.NewFromString(destructionSetting.StarLevelDividends) //星级分红百分比 afterStarLevelDividendsValues := starLevelDividendsNums.Add(amountFeeValue.Mul(starLevelDividends.Div(decimalRate))).RoundFloor(8).String() - var afterCommunityDividendsValues = chain.CommunityDividends - if chain.CommunityDividends != "" { - communityDividendsNums, _ := decimal.NewFromString(chain.CommunityDividends) - communityDividends, _ := decimal.NewFromString(destructionSetting.CommunityDividends) //社区分红百分比 - afterCommunityDividendsValues = communityDividendsNums.Add(amountFeeValue.Mul(communityDividends.Div(decimalRate))).RoundFloor(8).String() - } + //var afterCommunityDividendsValues = chain.CommunityDividends + //if chain.CommunityDividends != "" { + communityDividendsNums, _ := decimal.NewFromString(chain.CommunityDividends) + communityDividends, _ := decimal.NewFromString(destructionSetting.CommunityDividends) //社区分红百分比 + afterCommunityDividendsValues := communityDividendsNums.Add(amountFeeValue.Mul(communityDividends.Div(decimalRate))).RoundFloor(8).String() + //} destructionQuantityNums, _ := decimal.NewFromString(chain.DestructionQuantityNums) destructionQuantity, _ := decimal.NewFromString(destructionSetting.DestructionQuantity) //销毁百分比 From 77a2bc0a37a1ee9305dcb4268c55513a922717a4 Mon Sep 17 00:00:00 2001 From: dengbiao Date: Fri, 21 Jun 2024 21:31:42 +0800 Subject: [PATCH 2/2] update --- ...e_circles_deal_available_green_energy_points.go | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/rule/one_circles/one_circles_deal_available_green_energy_points.go b/rule/one_circles/one_circles_deal_available_green_energy_points.go index ad2a8fb..499a044 100644 --- a/rule/one_circles/one_circles_deal_available_green_energy_points.go +++ b/rule/one_circles/one_circles_deal_available_green_energy_points.go @@ -56,6 +56,8 @@ func DealAvailableGreenEnergyCoin(session *xorm.Session, kind int, amount, amoun oneCirclesAvailableGreenEnergyPointsFlow.AfterPublicWelfareAndCharityValues = chain.PublicWelfareAndCharity oneCirclesAvailableGreenEnergyPointsFlow.BeforeStarLevelDividendsValues = chain.StarLevelDividends //星级分红 oneCirclesAvailableGreenEnergyPointsFlow.AfterStarLevelDividendsValues = chain.StarLevelDividends + oneCirclesAvailableGreenEnergyPointsFlow.BeforeCommunityDividends = chain.CommunityDividends //社区分红 + oneCirclesAvailableGreenEnergyPointsFlow.AfterCommunityDividends = chain.CommunityDividends oneCirclesAvailableGreenEnergyPointsFlow.BeforeDestructionQuantityValues = chain.DestructionQuantityNums //销毁数量 oneCirclesAvailableGreenEnergyPointsFlow.AfterDestructionQuantityValues = chain.DestructionQuantityNums @@ -224,12 +226,12 @@ func DealAvailableGreenEnergyCoin(session *xorm.Session, kind int, amount, amoun starLevelDividends, _ := decimal.NewFromString(destructionSetting.StarLevelDividends) //星级分红百分比 afterStarLevelDividendsValues := starLevelDividendsNums.Add(amountFeeValue.Mul(starLevelDividends.Div(decimalRate))).RoundFloor(8).String() - //var afterCommunityDividendsValues = chain.CommunityDividends - //if chain.CommunityDividends != "" { - communityDividendsNums, _ := decimal.NewFromString(chain.CommunityDividends) - communityDividends, _ := decimal.NewFromString(destructionSetting.CommunityDividends) //社区分红百分比 - afterCommunityDividendsValues := communityDividendsNums.Add(amountFeeValue.Mul(communityDividends.Div(decimalRate))).RoundFloor(8).String() - //} + var afterCommunityDividendsValues = chain.CommunityDividends + if chain.CommunityDividends != "" { + communityDividendsNums, _ := decimal.NewFromString(chain.CommunityDividends) + communityDividends, _ := decimal.NewFromString(destructionSetting.CommunityDividends) //社区分红百分比 + afterCommunityDividendsValues = communityDividendsNums.Add(amountFeeValue.Mul(communityDividends.Div(decimalRate))).RoundFloor(8).String() + } destructionQuantityNums, _ := decimal.NewFromString(chain.DestructionQuantityNums) destructionQuantity, _ := decimal.NewFromString(destructionSetting.DestructionQuantity) //销毁百分比