|
|
@@ -28,3 +28,12 @@ func (e EggEnergyPriceDb) EggEnergyPriceList(startAt string, endAt string, hour |
|
|
|
} |
|
|
|
return m, nil |
|
|
|
} |
|
|
|
|
|
|
|
func (e EggEnergyPriceDb) EggEnergyPriceGetLastOne() (*model.EggEnergyPrice, bool, error) { |
|
|
|
var m model.EggEnergyPrice |
|
|
|
exist, err := e.Db.Desc("id").Get(&m) |
|
|
|
if err != nil { |
|
|
|
return nil, false, zhios_order_relate_logx.Error(err.Error()) |
|
|
|
} |
|
|
|
return &m, exist, nil |
|
|
|
} |