|
@@ -132,14 +132,14 @@ type ReportMapping struct {
|
|
|
|
|
|
func GetReportMapping() (item []*ReportMapping, err error) {
|
|
|
o := orm.NewOrmUsingDB("hz_cygx")
|
|
|
- sql := ` SELECT * FROM cygx_report_mapping WHERE match_type_name != '' AND parent_id>0 `
|
|
|
+ sql := ` SELECT * FROM cygx_report_mapping WHERE match_type_name != '' `
|
|
|
_, err = o.Raw(sql).QueryRows(&item)
|
|
|
return
|
|
|
}
|
|
|
|
|
|
func GetReportMappingDetail(condition string, pars []interface{}) (item *ReportMapping, err error) {
|
|
|
o := orm.NewOrmUsingDB("hz_cygx")
|
|
|
- sql := ` SELECT * FROM cygx_report_mapping WHERE parent_id>0 ` + condition + ` LIMIT 1 `
|
|
|
+ sql := ` SELECT * FROM cygx_report_mapping WHERE 1=1 ` + condition + ` LIMIT 1 `
|
|
|
err = o.Raw(sql, pars).QueryRow(&item)
|
|
|
return
|
|
|
}
|