Browse Source

update 一个圈圈

master
DengBiao 8 months ago
parent
commit
329234b4bc
2 changed files with 12 additions and 2 deletions
  1. +10
    -0
      rule/one_circles/one_circles_public_platoon_give_activty_coin.go
  2. +2
    -2
      rule/one_circles/one_circles_sign_in_green_energy_settlement.go

+ 10
- 0
rule/one_circles/one_circles_public_platoon_give_activty_coin.go View File

@@ -85,6 +85,16 @@ func SettlementPublicGiveActivityCoin(engine *xorm.Engine, masterId string, uid


fatherUid := zhios_order_relate_utils.IntToStr(tmpOneCirclesPublicPlatoonUserRelation.Uid) fatherUid := zhios_order_relate_utils.IntToStr(tmpOneCirclesPublicPlatoonUserRelation.Uid)
fatherReward := rewardSystemMap[k+1] fatherReward := rewardSystemMap[k+1]
//判断是否活跃
var m model.OneCirclesGreenEnergySignIn
has, err33 := engine.Where("uid =?", fatherUid).And("start_time >=?", time.Now().Format("2006-01-02")+"00:00:00").Get(&m)
if err33 != nil {
return err33
}
if !has {
//不活跃不需要奖励
continue
}
//判断是否满足奖励条件 //判断是否满足奖励条件
userCount, _, err2 := db.SumUserRelateByParentUid(engine, fatherUid) userCount, _, err2 := db.SumUserRelateByParentUid(engine, fatherUid)
if err2 != nil { if err2 != nil {


+ 2
- 2
rule/one_circles/one_circles_sign_in_green_energy_settlement.go View File

@@ -100,9 +100,9 @@ func SettlementSignInGreenEnergy(engine *xorm.Engine, masterId string) (err erro
if parentRewardValue <= rewardEndValue { if parentRewardValue <= rewardEndValue {
break break
} }
//判断是否活跃
//TODO::判断是否活跃
var m model.OneCirclesGreenEnergySignIn 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)
has, err3333333 := engine.Where("uid =?", relate.ParentUid).And("start_time >=?", time.Now().Format("2006-01-02")+"00:00:00").Get(&m)
if err3333333 != nil { if err3333333 != nil {
_ = session.Rollback() _ = session.Rollback()
fmt.Println("err:::::3333333", err3333333) fmt.Println("err:::::3333333", err3333333)


Loading…
Cancel
Save