Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
yulichang committed Oct 30, 2024
1 parent 56ef6c5 commit 7209345
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,8 @@ public String getTableNameEnc(String tableName) {
*/
public MPJLambdaQueryWrapper<T> lambda() {
return new MPJLambdaQueryWrapper<>(getEntity(), getEntityClass(), from, sqlSelect, paramNameSeq, paramNameValuePairs,
expression, lastSql, sqlComment, getSqlFirstField(), selectColumns, ignoreColumns, selectDistinct, ifExists);
expression, lastSql, sqlComment, getSqlFirstField(), selectColumns, ignoreColumns, selectDistinct, ifExists)
.setAlias(this.alias);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,4 +128,17 @@ void test6() {
System.out.println(userDO);
}

@Test
void test7() {
ThreadLocalUtils.set("SELECT tt.id AS idea, tt.user_id AS uuid, tt.tenant_id FROM user_tenant tt WHERE (tt.id <= ?) AND tt.tenant_id = 1");
MPJQueryWrapper<UserTenantDO> wrapper = new MPJQueryWrapper<UserTenantDO>()
.setAlias("tt")
.selectAll(UserTenantDO.class,"tt")
.le("tt.id ", 10);
System.out.println(wrapper.getAlias());
List<UserTenantDO> userDO = userTenantMapper.selectJoinList(UserTenantDO.class, wrapper.lambda());
System.out.println(wrapper.getAlias());
System.out.println(userDO);
}

}

0 comments on commit 7209345

Please sign in to comment.