Bladeren bron

update

master
dengbiao 7 maanden geleden
bovenliggende
commit
e9b3fce2f7
1 gewijzigde bestanden met toevoegingen van 23 en 9 verwijderingen
  1. +23
    -9
      rule/one_circles/one_circles_sign_in_green_energy_settlement.go

+ 23
- 9
rule/one_circles/one_circles_sign_in_green_energy_settlement.go Bestand weergeven

@@ -159,16 +159,30 @@ func HandleSettlementSignInGreenEnergy(engine *xorm.Engine, masterId string, id
}
//TODO::判断是否活跃
var m model.OneCirclesGreenEnergySignIn
has, err3333333 := engine.Where("uid =?", relate.ParentUid).And("end_time >=?", endTime).Get(&m)
if err3333333 != nil {
_ = session.Rollback()
fmt.Println("err:::::3333333", err3333333)
return err3333333
}
if !has {
//不活跃不需要奖励
continue
if endTime != "" {
has, err3333333 := engine.Where("uid =?", relate.ParentUid).And("end_time >=?", endTime).Get(&m)
if err3333333 != nil {
_ = session.Rollback()
fmt.Println("err:::::3333333", err3333333)
return err3333333
}
if !has {
//不活跃不需要奖励
continue
}
} else {
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
}
}

err = DealUserCoin(session, md.DealUserCoinReq{
Kind: "add",
Mid: masterId,


Laden…
Annuleren
Opslaan