Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
admpub committed Nov 5, 2022
1 parent b0c517c commit f217519
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/sqlbuilder/relation.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ func parseRelationExtraParam(v string) interface{} {
return v
}

func buildCondPrepare(fieldInfo *reflectx.FieldInfo, cond db.Compound) db.Compound {
func buildCondPrepare(fieldInfo *reflectx.FieldInfo, cond db.Cond) db.Compound {
where, ok := fieldInfo.Options[`where`] // where=col1:val1&col2:val2&col3:val3
if !ok {
return cond
Expand All @@ -137,9 +137,9 @@ func buildCondPrepare(fieldInfo *reflectx.FieldInfo, cond db.Compound) db.Compou
r.setWhere(kvs)
}
conds := []db.Compound{cond}
for colName, colValue := range *kvs {
for _, item := range *kvs {
conds = append(conds, db.Cond{
colName: colValue,
item.k: item.v,
})
}
return db.And(conds...)
Expand Down

0 comments on commit f217519

Please sign in to comment.