浏览代码

update

master
DengBiao 11 个月前
父节点
当前提交
7c905f1813
共有 1 个文件被更改,包括 4 次插入8 次删除
  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 查看文件

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


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


//3、统计签到结束的用户数据 //3、统计签到结束的用户数据
now := time.Now() now := time.Now()
@@ -136,12 +137,6 @@ func CalcNowSignInGreenEnergy(engine *xorm.Engine, oneCirclesGreenEnergyBasicSet
return 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 var signInRewards []*md2.SignInRewardStruct
err = json.Unmarshal([]byte(oneCirclesGreenEnergyBasicSetting.VipEquitySetting), &signInRewards) err = json.Unmarshal([]byte(oneCirclesGreenEnergyBasicSetting.VipEquitySetting), &signInRewards)
@@ -160,7 +155,8 @@ func CalcNowSignInGreenEnergy(engine *xorm.Engine, oneCirclesGreenEnergyBasicSet


for _, v := range signInRewards { for _, v := range signInRewards {
if zhios_order_relate_utils.StrToInt64(v.VipMemberEndNums) <= userCount && userCount <= zhios_order_relate_utils.StrToInt64(v.VipMemberStartNums) { 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 return


正在加载...
取消
保存