|
@@ -251,3 +251,19 @@ func GetEdbDataListAllV1(condition string, pars []interface{}, source, order int
|
|
|
_, err = o.Raw(sql, pars).QueryRows(&item)
|
|
|
return
|
|
|
}
|
|
|
+
|
|
|
+// GetEdbInfoByCondition 获取指标列表
|
|
|
+func GetEdbInfoByCondition(condition string, pars []interface{}, order int) (item []*EdbInfo, err error) {
|
|
|
+ o := orm.NewOrm()
|
|
|
+ sql := ` SELECT * FROM edb_info WHERE 1=1 `
|
|
|
+ if condition != "" {
|
|
|
+ sql += condition
|
|
|
+ }
|
|
|
+ if order == 1 {
|
|
|
+ sql += ` ORDER BY end_date ASC `
|
|
|
+ } else {
|
|
|
+ sql += ` ORDER BY edb_info_id ASC `
|
|
|
+ }
|
|
|
+ _, err = o.Raw(sql, pars).QueryRows(&item)
|
|
|
+ return
|
|
|
+}
|