瀏覽代碼

update

master
shenjiachi 1 周之前
父節點
當前提交
a5da521ba8
共有 1 個檔案被更改,包括 7 行新增3 行删除
  1. +7
    -3
      app/hdl/institutional_management/egg_energy/hdl_basic.go

+ 7
- 3
app/hdl/institutional_management/egg_energy/hdl_basic.go 查看文件

@@ -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")


Loading…
取消
儲存