mirror of
https://gitee.com/best_handsome/mybatis-plus-join
synced 2025-07-11 00:02:22 +08:00
first
This commit is contained in:
parent
b668d64c71
commit
1f29d3c16d
@ -26,6 +26,7 @@
|
||||
查询user表中的head_img,name和user_address表中的address,tel
|
||||

|
||||
对应sql
|
||||
|
||||

|
||||
|
||||
#### selectAll(UserEntity.class) 查询UserEntity全部字段
|
||||
@ -33,6 +34,7 @@
|
||||
查询user全部字段和user_address表中的address,tel
|
||||

|
||||
对应sql
|
||||
|
||||

|
||||
|
||||
#### as(UserEntity::getHeadImg,UserDTO::getUserHeadImg)
|
||||
@ -40,6 +42,7 @@
|
||||
查询字段head_img as userHeadImg
|
||||

|
||||
对应sql
|
||||
|
||||

|
||||
|
||||
#### 左连接 leftJoin(UserEntity::getId,UserAddressEntity::getUserId,right -> right)
|
||||
@ -52,6 +55,7 @@ user left join user_address on user.id = User_address.user_id
|
||||
|
||||

|
||||
对应sql
|
||||
|
||||

|
||||
|
||||
#### [参考测试类](https://gitee.com/best_handsome/mybatis-plus-join/blob/master/src/test/java/com/example/mp/MpJoinTest.java)
|
||||
|
Loading…
x
Reference in New Issue
Block a user