Bläddra i källkod

update

master
DengBiao 11 månader sedan
förälder
incheckning
bcb86e9dc3
1 ändrade filer med 6 tillägg och 0 borttagningar
  1. +6
    -0
      rule/one_circles/one_circles_auto_release_green_energy.go

+ 6
- 0
rule/one_circles/one_circles_auto_release_green_energy.go Visa fil

@@ -7,11 +7,17 @@ import (
"errors"
"fmt"
"github.com/shopspring/decimal"
"time"
"xorm.io/xorm"
)

// AutoReleaseExchangeGreenEnergy 结算绿色能量自动释放成可用绿色能量
func AutoReleaseExchangeGreenEnergy(engine *xorm.Engine, masterId string) (err error) {
now := time.Now()
if now.Hour() > 1 && now.Hour() > 8 {
//TODO::只在凌晨一点 ~ 凌晨 8 点运行
return errors.New("非运行时间")
}
//1、查找 `one_circles_green_energy_basic_setting` 基础设置 && `one_circles_public_platoon_basic_setting` 基础设置
oneCirclesGreenEnergyBasicSetting, err := db.OneCirclesGreenEnergyBasicSettingGetOneByParams(engine, map[string]interface{}{
"key": "is_open",


Laddar…
Avbryt
Spara