extend joint filter

This commit is contained in:
wanyaoqi
2018-08-29 17:55:13 +08:00
parent 1a02439127
commit e2d4054367
5 changed files with 44 additions and 15 deletions
+2 -2
View File
@@ -264,9 +264,9 @@ func applyListItemsGeneralJointFilters(manager IModelManager, q *sqlchemy.SQuery
if cond != nil {
sq = sq.Filter(cond)
if filterAny {
q = q.Filter(sqlchemy.OR(sqlchemy.In(q.Field("id"), sq)))
q = q.Filter(sqlchemy.OR(sqlchemy.In(q.Field(jfc.OriginKey), sq)))
} else {
q = q.Filter(sqlchemy.AND(sqlchemy.In(q.Field("id"), sq)))
q = q.Filter(sqlchemy.AND(sqlchemy.In(q.Field(jfc.OriginKey), sq)))
}
}
}