Bläddra i källkod

update

master
shenjiachi 1 vecka sedan
förälder
incheckning
a5da521ba8
1 ändrade filer med 7 tillägg och 3 borttagningar
  1. +7
    -3
      app/hdl/institutional_management/egg_energy/hdl_basic.go

+ 7
- 3
app/hdl/institutional_management/egg_energy/hdl_basic.go Visa fil

@@ -543,6 +543,9 @@ func GetPriceCurve(c *gin.Context) {
kind := c.DefaultQuery("kind", "1")
now := time.Now()

var yData []interface{}
var xData []interface{}

priceDb := implement.NewEggEnergyPriceDb(db.Db)
m, has, err := priceDb.EggEnergyPriceGetLastOne()
if err != nil {
@@ -550,12 +553,13 @@ func GetPriceCurve(c *gin.Context) {
return
}
if has == false {
e.OutErr(c, e.ERR_NO_DATA, "未查询到数据")
e.OutSuc(c, md.GetPriceCurveResp{
YData: yData,
XData: xData,
}, nil)
return
}

var yData []interface{}
var xData []interface{}
switch kind {
case "1":
var date = now.AddDate(0, 0, -30).Format("2006-01-02")


Laddar…
Avbryt
Spara