|
@@ -86,12 +86,12 @@ func GetEdbDataByCondition(source int, condition string, pars []interface{}) (it
|
|
|
}
|
|
|
|
|
|
// GetEdbDataByDate 根据数据日期获取指标数据
|
|
|
-func GetEdbDataByDate(source int, dataTime string) (item *EdbInfoSearchData, err error) {
|
|
|
+func GetEdbDataByDate(source int, edbCode, dataTime string) (item *EdbInfoSearchData, err error) {
|
|
|
o := orm.NewOrm()
|
|
|
tableName := GetEdbDataTableName(source)
|
|
|
- sql := ` SELECT * FROM %s WHERE 1=1 and data_time =? ORDER BY data_time DESC `
|
|
|
+ sql := ` SELECT * FROM %s WHERE 1=1 AND edb_code = ? AND data_time =? ORDER BY data_time DESC `
|
|
|
sql = fmt.Sprintf(sql, tableName)
|
|
|
- err = o.Raw(sql, dataTime).QueryRow(&item)
|
|
|
+ err = o.Raw(sql, edbCode, dataTime).QueryRow(&item)
|
|
|
return
|
|
|
}
|
|
|
|