Преглед на файлове

Merge remote-tracking branch 'origin/master'

master
huangjiajun преди 5 месеца
родител
ревизия
49d2884770
променени са 1 файла, в които са добавени 10 реда и са изтрити 5 реда
  1. +10
    -5
      rule/one_circles/one_circles_sign_in_green_energy_settlement.go

+ 10
- 5
rule/one_circles/one_circles_sign_in_green_energy_settlement.go Целия файл

@@ -60,11 +60,11 @@ func SettlementSignInGreenEnergy(engine *xorm.Engine, masterId string, ch *rabbi
ids = append(ids, v.Id) ids = append(ids, v.Id)
} }
//6、更新 `one_circles_green_energy_sign_in` 中的 is_completed 状态 //6、更新 `one_circles_green_energy_sign_in` 中的 is_completed 状态
if len(ids) > 0 {
_, err = engine.In("id", ids).Update(&model.OneCirclesGreenEnergySignIn{
IsCompleted: 1,
})
}
//if len(ids) > 0 {
// _, err = engine.In("id", ids).Update(&model.OneCirclesGreenEnergySignIn{
// IsCompleted: 1,
// })
//}
page++ page++
time.Sleep(time.Millisecond * time.Duration(rand.Intn(1000))) time.Sleep(time.Millisecond * time.Duration(rand.Intn(1000)))
} }
@@ -213,6 +213,11 @@ func HandleSettlementSignInGreenEnergy(engine *xorm.Engine, masterId string, id
} }
} }


//6、更新 `one_circles_green_energy_sign_in` 中的 is_completed 状态
_, err = session.Where("id = ?", id).Update(&model.OneCirclesGreenEnergySignIn{
IsCompleted: 1,
})

err = session.Commit() err = session.Commit()
if err != nil { if err != nil {
_ = session.Rollback() _ = session.Rollback()


Зареждане…
Отказ
Запис