mirror of
https://gitee.com/mybatis-flex/mybatis-flex.git
synced 2025-12-07 00:58:24 +08:00
test: add issues test
This commit is contained in:
parent
26dc943344
commit
aa0d9adfb6
@ -23,6 +23,7 @@ import com.mybatisflex.core.mybatis.Mappers;
|
|||||||
import com.mybatisflex.core.query.If;
|
import com.mybatisflex.core.query.If;
|
||||||
import com.mybatisflex.core.query.QueryWrapper;
|
import com.mybatisflex.core.query.QueryWrapper;
|
||||||
import com.mybatisflex.core.row.DbChain;
|
import com.mybatisflex.core.row.DbChain;
|
||||||
|
import com.mybatisflex.core.update.UpdateChain;
|
||||||
import com.mybatisflex.core.update.UpdateWrapper;
|
import com.mybatisflex.core.update.UpdateWrapper;
|
||||||
import com.mybatisflex.core.util.UpdateEntity;
|
import com.mybatisflex.core.util.UpdateEntity;
|
||||||
import com.mybatisflex.mapper.ArticleMapper;
|
import com.mybatisflex.mapper.ArticleMapper;
|
||||||
@ -139,7 +140,7 @@ public class AccountTester {
|
|||||||
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testUpdate() {
|
public void testUpdate1() {
|
||||||
List<Account> accounts = accountMapper.selectAll();
|
List<Account> accounts = accountMapper.selectAll();
|
||||||
System.out.println(accounts);
|
System.out.println(accounts);
|
||||||
|
|
||||||
@ -154,7 +155,25 @@ public class AccountTester {
|
|||||||
|
|
||||||
accounts = accountMapper.selectAll();
|
accounts = accountMapper.selectAll();
|
||||||
System.out.println(accounts);
|
System.out.println(accounts);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testUpdate2() {
|
||||||
|
List<Account> accounts = accountMapper.selectAll();
|
||||||
|
System.out.println(accounts);
|
||||||
|
|
||||||
|
|
||||||
|
UpdateChain.of(Account.class)
|
||||||
|
.set(Account::getUserName,"zhangsan123")
|
||||||
|
// .leftJoin(ARTICLE).on(ARTICLE.ACCOUNT_ID.eq(ACCOUNT.ID))
|
||||||
|
.where(Account::getId).eq(1)
|
||||||
|
// .and(ARTICLE.ID.ge(0))
|
||||||
|
.limit(1)
|
||||||
|
.remove();
|
||||||
|
|
||||||
|
accounts = accountMapper.selectAll();
|
||||||
|
System.out.println(accounts);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
2
pom.xml
2
pom.xml
@ -48,7 +48,7 @@
|
|||||||
<module>mybatis-flex-solon-plugin</module>
|
<module>mybatis-flex-solon-plugin</module>
|
||||||
<module>mybatis-flex-test</module>
|
<module>mybatis-flex-test</module>
|
||||||
<module>mybatis-flex-processor</module>
|
<module>mybatis-flex-processor</module>
|
||||||
<module>mybatis-flex-kotlin</module>
|
<!-- <module>mybatis-flex-kotlin</module>-->
|
||||||
</modules>
|
</modules>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user