Browse Source

update

master
dengbiao 7 months ago
parent
commit
e9b3fce2f7
1 changed files with 23 additions and 9 deletions
  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 View File

@@ -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,


Loading…
Cancel
Save