From 41a062ffe5f8081328937289a8b90c70ec220772 Mon Sep 17 00:00:00 2001
From: liuxiaolong <liuxiaolong@aiotlink.com>
Date: 星期二, 30 六月 2020 11:48:33 +0800
Subject: [PATCH] fix

---
 models/userCar.go |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/models/userCar.go b/models/userCar.go
index bd9c7b7..82a76ab 100644
--- a/models/userCar.go
+++ b/models/userCar.go
@@ -19,7 +19,7 @@
 
 func (uc *UserCar) GetByUserId(userId string) (all []UserCar,err error) {
 	o := orm.NewOrm()
-	_, err = o.Raw("select * from ? where userId=?", uc.TableName(), userId).QueryRows(&all)
+	_, err = o.QueryTable(uc.TableName()).Filter("userId", userId).All(&all)
 	if err != nil {
 		return nil, err
 	}

--
Gitblit v1.8.0