Parcourir la source

Merge remote-tracking branch 'origin/master'

master
huangjiajun il y a 8 mois
Parent
révision
f5fdfb314c
2 fichiers modifiés avec 8 ajouts et 2 suppressions
  1. +7
    -1
      rule/one_circles/one_circles_public_platoon_give_activty_coin.go
  2. +1
    -1
      rule/one_circles/one_circles_sign_in_green_energy_settlement.go

+ 7
- 1
rule/one_circles/one_circles_public_platoon_give_activty_coin.go Voir le fichier

@@ -90,7 +90,13 @@ func SettlementPublicGiveActivityCoin(engine *xorm.Engine, masterId string, uid
if err2 != nil {
return err2
}
if userCount >= zhios_order_relate_utils.StrToInt64(fatherReward.RewardCondition) {
//判断是否活跃
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) {
fatherRewardValue := rewardValue * (zhios_order_relate_utils.StrToFloat64(fatherReward.RewardValue) / 100)
rewardFather = append(rewardFather, struct {
Uid int `json:"uid"` //用户id


+ 1
- 1
rule/one_circles/one_circles_sign_in_green_energy_settlement.go Voir le fichier

@@ -200,7 +200,7 @@ func CalcTodayGreenEnergyPriceRises(engine *xorm.Engine, oneCirclesGreenEnergyBa

//2、查找昨日价格
var m model.OneCirclesGreenEnergyPrice
if has, err1 := engine.Where("date =?", now.AddDate(0, 0, -1).Format("2006-01-02")).Desc("hour").Get(&m); err1 != nil || has == false {
if has, err1 := engine.Where("date =?", now.AddDate(0, 0, -1).Format("2006-01-02")).And("hour = 23").Get(&m); err1 != nil || has == false {
err = err1
return
}


Chargement…
Annuler
Enregistrer