Browse Source

update

master
DengBiao 11 months ago
parent
commit
7c905f1813
1 changed files with 4 additions and 8 deletions
  1. +4
    -8
      rule/one_circles/one_circles_sign_in_green_energy_settlement.go

+ 4
- 8
rule/one_circles/one_circles_sign_in_green_energy_settlement.go View File

@@ -41,10 +41,11 @@ func SettlementSignInGreenEnergy(engine *xorm.Engine, masterId string) (err erro
fmt.Println("rewardEndValue>>>>>>>>>>>>", rewardEndValue)

//2、获取当前签到收益
err, rewardValue := CalcNowSignInGreenEnergy(engine, oneCirclesGreenEnergyBasicSetting)
err, reward := CalcNowSignInGreenEnergy(engine, oneCirclesGreenEnergyBasicSetting)
if err != nil {
return err
}
rewardValue := zhios_order_relate_utils.Float64ToStrPrec8(zhios_order_relate_utils.StrToFloat64(reward) * float64(oneRoundDuration) * 60 * 60)

//3、统计签到结束的用户数据
now := time.Now()
@@ -136,12 +137,6 @@ func CalcNowSignInGreenEnergy(engine *xorm.Engine, oneCirclesGreenEnergyBasicSet
return
}
}
var teamRewardSetting *md2.TeamRewardSettingStruct
err = json.Unmarshal([]byte(oneCirclesGreenEnergyBasicSetting.VipEquitySetting), &teamRewardSetting)
if err != nil {
return
}
var oneRoundDuration = zhios_order_relate_utils.StrToInt(teamRewardSetting.OneRoundDuration)

var signInRewards []*md2.SignInRewardStruct
err = json.Unmarshal([]byte(oneCirclesGreenEnergyBasicSetting.VipEquitySetting), &signInRewards)
@@ -160,7 +155,8 @@ func CalcNowSignInGreenEnergy(engine *xorm.Engine, oneCirclesGreenEnergyBasicSet

for _, v := range signInRewards {
if zhios_order_relate_utils.StrToInt64(v.VipMemberEndNums) <= userCount && userCount <= zhios_order_relate_utils.StrToInt64(v.VipMemberStartNums) {
rewardValue = zhios_order_relate_utils.Float64ToStrPrec8(zhios_order_relate_utils.StrToFloat64(v.RewardValue) * float64(oneRoundDuration) * 60 * 60)
//rewardValue = zhios_order_relate_utils.Float64ToStrPrec8(zhios_order_relate_utils.StrToFloat64(v.RewardValue) * float64(oneRoundDuration) * 60 * 60)
rewardValue = v.RewardValue
}
}
return


Loading…
Cancel
Save