mirror of
https://gitee.com/mybatis-flex/mybatis-flex.git
synced 2025-12-06 16:48:24 +08:00
test: 测试优化 exists 方法。
This commit is contained in:
parent
1078865a20
commit
563ac10887
@ -16,6 +16,7 @@
|
||||
|
||||
package com.mybatisflex.test.service;
|
||||
|
||||
import com.mybatisflex.core.query.QueryWrapper;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
@ -42,4 +43,15 @@ class ArticleServiceTest {
|
||||
.forEach(System.out::println);
|
||||
}
|
||||
|
||||
@Test
|
||||
void testExists() {
|
||||
QueryWrapper queryWrapper = QueryWrapper.create()
|
||||
.select(ARTICLE.DEFAULT_COLUMNS)
|
||||
.from(ARTICLE)
|
||||
.where(ARTICLE.ACCOUNT_ID.eq(1))
|
||||
.orderBy(ARTICLE.ACCOUNT_ID.desc());
|
||||
boolean exists = articleService.exists(queryWrapper);
|
||||
System.out.println(exists);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user