MybatisPlus條件構造器Wrapper

2022-05-18 21:16:39 字數 776 閱讀 5767

我們寫一些複雜的sql就可以使用它來替代!

1、測試一: 查詢name不為空的使用者,並且郵箱不為空的使用者,年齡大於等於12

@test

void

contextloads()

2、測試二:查詢名字狂神說(bilibili中搜尋,講的很好)

@test

void

test2()

3、測試三: 查詢年齡在 20 ~ 30 歲之間的使用者

@test

void

test3()

4、測試四:查詢年齡在 20 ~ 30 歲之間的使用者

@test

void

test4()

5、測試五:id 在子查詢中查出來

@test

void

test5()

6、測試六:通過id進行排序

@test

void

test6()

使用新增構造器來分頁

public pagefindlistusers(integer index, integer size) throws

exception

04 MyBatisPlus條件構造器

runwith springrunner.class springboottest public class 注意 以下條件構造器的方法入參中的column均表示資料庫字段 test public void testdelete sql update user set deleted 1 where...

MyBatisPlus 條件查詢構造器(四)

1 mybatisplus 入門 一 2 mybatisplus 準備 二 3 mybatisplus crud 三 4 mybatisplus 條件查詢構造器 四 runwith springrunner.class springboottest public class 注意 以下條件構造器的方...

04 MyBatisPlus條件構造器

注意 以下條件構造器的方法入參中的column均表示資料庫字段 test public void testdelete sql update user set deleted 1 where deleted 0 and name is null and age and email is not nu...