Skip to content

Commit

Permalink
Merge branch 'master' into frontend
Browse files Browse the repository at this point in the history
  • Loading branch information
ramory-l committed Jan 6, 2021
2 parents b835307 + de57059 commit ea13272
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -275,8 +275,9 @@
SELECT *
FROM "user"
WHERE id != #{userId} AND id NOT IN (SELECT "to" FROM black_list WHERE "from" = #{userId})
<if test="form.man">AND gender ilike 'man'</if>
<if test="form.woman">AND gender ilike 'woman'</if>
<if test="form.man and !form.woman">AND gender ilike 'man'</if>
<if test="form.woman and !form.man">AND gender ilike 'woman'</if>
<if test="form.man and form.woman">AND gender ILIKE 'man' OR gender ILIKE 'woman'</if>
<if test="!form.man and !form.woman">AND gender ILIKE 'man' OR gender ILIKE 'woman'</if>
<if test="form.rateFrom != null">AND rate &gt;= #{form.rateFrom}</if>
<if test="form.rateTo != null">AND rate &lt;= #{form.rateTo}</if>) as users
Expand Down

0 comments on commit ea13272

Please sign in to comment.