This commit is contained in:
suyl
2021-07-21 14:30:08 +08:00
parent b5355149e7
commit 7aabe0b988
3 changed files with 4 additions and 5 deletions

View File

@@ -94,11 +94,8 @@ func Update(db *sqlx.DB, obj interface{}, fields ...string) (err error) {
if direct.Field(0).Int() == 0 {
return err
} else {
fmt.Println("11111111", direct.Field(0).Int())
sqlParams = append(sqlParams, direct.Field(0).Int())
}
fmt.Println(sql.String())
fmt.Println(sqlParams)
_, err = db.DB.Exec(sql.String(), sqlParams...)
return err
}