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 5, 2021
2 parents f1231e4 + ecb759e commit dcc6214
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@
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' AND 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
INNER JOIN user_ref_tags urt ON id = urt.user_id
Expand Down
4 changes: 2 additions & 2 deletions generator/src/main/java/org/example/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,13 @@ private static void createOtherData(List<User> users) {
String jwt = authorize(user.getUsername(), user.getPassword());
Set<Integer> likeSet = new HashSet<>();
for (int likeCount = 0; likeCount < 15; likeCount++) {
int randomLike = random(users.size() - 1, 0);
int randomLike = random(users.size() - 1, 1);
likeSet.add(randomLike);
}
likeSet.forEach(like -> createLike(user.getId(), like, jwt));

for (int guestCount = 0; guestCount < 15; guestCount++) {
int randomGuest = random(users.size() - 1, 0);
int randomGuest = random(users.size() - 1, 1);
createGuest(user.getId(), randomGuest, jwt);
}

Expand Down

0 comments on commit dcc6214

Please sign in to comment.