Ver a proveniência

update 一个圈圈

master
DengBiao há 10 meses
ascendente
cometimento
7920b3660f
2 ficheiros alterados com 14 adições e 7 eliminações
  1. +2
    -7
      rule/one_circles/one_circles_public_platoon_give_activty_coin.go
  2. +12
    -0
      rule/one_circles/one_circles_sign_in_green_energy_settlement.go

+ 2
- 7
rule/one_circles/one_circles_public_platoon_give_activty_coin.go Ver ficheiro

@@ -90,13 +90,8 @@ func SettlementPublicGiveActivityCoin(engine *xorm.Engine, masterId string, uid
if err2 != nil {
return err2
}
//判断是否活跃
var m model.OneCirclesGreenEnergySignIn
has, err3 := engine.Where("uid =?", fatherUid).And("end_time >=?", time.Now().Format("2006-01-02 15:04:05")).Get(&m)
if err != nil {
return err3
}
if has && userCount >= zhios_order_relate_utils.StrToInt64(fatherReward.RewardCondition) {

if userCount >= zhios_order_relate_utils.StrToInt64(fatherReward.RewardCondition) {
fatherRewardValue := rewardValue * (zhios_order_relate_utils.StrToFloat64(fatherReward.RewardValue) / 100)
rewardFather = append(rewardFather, struct {
Uid int `json:"uid"` //用户id


+ 12
- 0
rule/one_circles/one_circles_sign_in_green_energy_settlement.go Ver ficheiro

@@ -100,6 +100,18 @@ func SettlementSignInGreenEnergy(engine *xorm.Engine, masterId string) (err erro
if parentRewardValue <= rewardEndValue {
break
}
//判断是否活跃
var m model.OneCirclesGreenEnergySignIn
has, err3333333 := engine.Where("uid =?", relate.ParentUid).And("end_time >=?", time.Now().Format("2006-01-02 15:04:05")).Get(&m)
if err3333333 != nil {
_ = session.Rollback()
fmt.Println("err:::::3333333", err3333333)
return err3333333
}
if !has {
//不活跃不需要奖励
continue
}
parentRewardValue = parentRewardValue * rewardDecrement
err = DealUserCoin(session, md.DealUserCoinReq{
Kind: "add",


Carregando…
Cancelar
Guardar