Skip to content

Commit

Permalink
1.4.13
Browse files Browse the repository at this point in the history
  • Loading branch information
yulichang committed May 31, 2024
1 parent 9500ff6 commit 2838731
Showing 1 changed file with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,22 @@ void applyFunc() {
.list();

list.forEach(System.out::println);

ThreadLocalUtils.set("SELECT t.pid, t.`name`, t.`json`, t.sex, t.head_img, t.create_time, t.address_id, " +
"t.address_id2, t.del, t.create_by, t.update_by FROM `user` t " +
"LEFT JOIN address t1 ON (t1.user_id = t.id) WHERE t.del = false AND t1.del = false " +
"AND (concat(t.id, t1.user_id, ?) IS NOT NULL " +
"AND concat(t.id, t1.user_id, ?) IS NOT NULL)");
List<UserDO> list1 = JoinWrappers.lambda(UserDO.class)
.selectAll(UserDO.class, UserDO::getId)
.leftJoin(AddressDO.class, AddressDO::getUserId, UserDO::getId)
.applyFunc("concat(%s,%s,{0}) is not null", arg -> arg.accept(UserDO::getId, AddressDO::getUserId), "12")
.applyFunc("concat(%s,%s,{0}) is not null", arg -> arg.accept(
Fun.f("t", UserDO::getId),
Fun.f("t1", AddressDO::getUserId)), "12")
.list();

list1.forEach(System.out::println);
}

}

0 comments on commit 2838731

Please sign in to comment.