Browse Source

update

master
shenjiachi 5 days ago
parent
commit
d5b2c2c60f
1 changed files with 15 additions and 2 deletions
  1. +15
    -2
      app/hdl/institutional_management/egg_energy/hdl_basic.go

+ 15
- 2
app/hdl/institutional_management/egg_energy/hdl_basic.go View File

@@ -1,14 +1,17 @@
package egg_energy package egg_energy


import ( import (
"applet/app/cfg"
"applet/app/db" "applet/app/db"
"applet/app/e" "applet/app/e"
md "applet/app/md/institutional_management/egg_energy" md "applet/app/md/institutional_management/egg_energy"
"applet/app/utils" "applet/app/utils"
"code.fnuoos.com/EggPlanet/egg_models.git/src/implement" "code.fnuoos.com/EggPlanet/egg_models.git/src/implement"
"code.fnuoos.com/EggPlanet/egg_models.git/src/model" "code.fnuoos.com/EggPlanet/egg_models.git/src/model"
rule "code.fnuoos.com/EggPlanet/egg_system_rules.git"
"code.fnuoos.com/EggPlanet/egg_system_rules.git/rule/egg_energy/enum" "code.fnuoos.com/EggPlanet/egg_system_rules.git/rule/egg_energy/enum"
md2 "code.fnuoos.com/EggPlanet/egg_system_rules.git/rule/egg_energy/md" md2 "code.fnuoos.com/EggPlanet/egg_system_rules.git/rule/egg_energy/md"
"code.fnuoos.com/EggPlanet/egg_system_rules.git/rule/egg_energy/svc"
"errors" "errors"
"fmt" "fmt"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
@@ -524,8 +527,18 @@ func UpdateEggEnergyCoreData(c *gin.Context) {
return return
} }


coreDataDb := implement.NewEggEnergyCoreDataDb(db.Db)
session := db.Db.NewSession()
engine := db.Db
coreDataDb := implement.NewEggEnergyCoreDataDb(engine)
rule.Init(cfg.RedisAddr)
_, cb, err := svc.GetEggEnergyCoreData(engine)
if err != nil {
return
}
if cb != nil {
defer cb() // 释放锁
}

session := engine.NewSession()
defer session.Close() defer session.Close()


m := model.EggEnergyCoreData{ m := model.EggEnergyCoreData{


Loading…
Cancel
Save