|
|
@@ -84,10 +84,9 @@ func OneCirclesGreenEnergyPriceUpdate(session *xorm.Session, id interface{}, One |
|
|
|
} |
|
|
|
|
|
|
|
// OneCirclesGreenEnergyPriceGetOneByParamsBySession 通过传入的参数查询数据(单条) |
|
|
|
func OneCirclesGreenEnergyPriceGetOneByParamsBySession(session *xorm.Session, params map[string]interface{}) (*model.OneCirclesGreenEnergyPrice, error) { |
|
|
|
func OneCirclesGreenEnergyPriceGetOneByParamsBySession(session *xorm.Session, date, hour string) (*model.OneCirclesGreenEnergyPrice, error) { |
|
|
|
var m model.OneCirclesGreenEnergyPrice |
|
|
|
var query = fmt.Sprintf("%s =?", params["key"]) |
|
|
|
has, err := session.Where(query, params["value"]).Desc("hour").Get(&m) |
|
|
|
has, err := session.Where("date =? and hour =?", date, hour).Get(&m) |
|
|
|
if err != nil { |
|
|
|
return nil, zhios_order_relate_logx.Error(err) |
|
|
|
} |
|
|
|