Merge pull request #1084 from tiansin/master

feat: 🐛 fix GetWhereConditionOfStruct where AND
This commit is contained in:
John Guo
2020-12-25 20:36:54 +08:00
committed by GitHub

View File

@ -326,7 +326,7 @@ func GetWhereConditionOfStruct(pointer interface{}) (where string, args []interf
return array[0], []interface{}{field.Value()}, nil
}
if len(where) > 0 {
where += " "
where += " AND "
}
where += field.TagValue + "=?"
args = append(args, field.Value())