@@ -50,7 +50,8 @@ func DeleteByExpr(ptrStructOrTableName interface{}, where map[string]interface{}
}
// 插入
-func InsertData(o orm.Ormer, ptrStructOrTableName interface{}) error {
+func InsertData(ptrStructOrTableName interface{}) error {
+ o := orm.NewOrm()
_, err := o.Insert(ptrStructOrTableName)
return err