|
@@ -212,7 +212,7 @@ type SmartReportResource struct {
|
|
|
}
|
|
|
|
|
|
func GetResourceItemById(id int) (item *SmartReportResource, err error) {
|
|
|
- o := orm.NewOrmUsingDB("rddp")
|
|
|
+ o := orm.NewOrm()
|
|
|
sql := fmt.Sprintf(`SELECT * FROM smart_report_resource WHERE resource_id = ? LIMIT 1`)
|
|
|
err = o.Raw(sql, id).QueryRow(&item)
|
|
|
return
|