mirror of
https://gitee.com/mybatis-flex/mybatis-flex.git
synced 2025-12-08 09:38:26 +08:00
test:测试注释修改
This commit is contained in:
parent
08873f3196
commit
da10a6beca
@ -57,11 +57,11 @@ fun main() {
|
|||||||
it }.toList().batchInsert()
|
it }.toList().batchInsert()
|
||||||
|
|
||||||
println("批量插入后————————")
|
println("批量插入后————————")
|
||||||
ACCOUNT.all<Account>().stream().peek { println(it) }.toList().filter { it.id!!.rem(2) == 0 }.batchDeleteById()
|
ACCOUNT.all<Account>().stream().peek { println(it) }.toList().filter { it.id.rem(2) == 0 }.batchDeleteById()
|
||||||
|
|
||||||
println("批量删除后————————")
|
println("批量删除后————————")
|
||||||
//使用DB对象查询时无需指定from表
|
//使用DB对象查询时需指定from表
|
||||||
DB.query<Account> {from(ACCOUNT)}.stream().peek { println(it) }.toList().filter { it.id!!.rem(3) == 0 }.map { it.userName = "哈哈"
|
DB.query<Account> {from(ACCOUNT)}.stream().peek { println(it) }.toList().filter { it.id.rem(3) == 0 }.map { it.userName = "哈哈"
|
||||||
it }.batchUpdate()
|
it }.batchUpdate()
|
||||||
|
|
||||||
println("批量更新后————————")
|
println("批量更新后————————")
|
||||||
@ -76,6 +76,9 @@ interface AccountMapper : BaseMapper<Account> {
|
|||||||
fun findByAge(age: Int, vararg ids: Int): List<Account> = queryList {
|
fun findByAge(age: Int, vararg ids: Int): List<Account> = queryList {
|
||||||
select(ACCOUNT.ALL_COLUMNS)
|
select(ACCOUNT.ALL_COLUMNS)
|
||||||
from(ACCOUNT)
|
from(ACCOUNT)
|
||||||
|
from {
|
||||||
|
select()
|
||||||
|
}
|
||||||
where(ACCOUNT) {
|
where(ACCOUNT) {
|
||||||
(AGE `=` age) and `if`(true) {
|
(AGE `=` age) and `if`(true) {
|
||||||
ID `in` ids.asList()
|
ID `in` ids.asList()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user