doc: update doc

This commit is contained in:
开源海哥 2023-07-18 10:31:19 +08:00
parent 49c873ede2
commit 52bb04ce3f

View File

@ -111,7 +111,7 @@ Account account = UpdateEntity.of(Account.class, 100);
account.setUserName(null); account.setUserName(null);
// 通过 UpdateWrapper 操作 account 数据 // 通过 UpdateWrapper 操作 account 数据
UpdateWrapper wrapper = (UpdateWrapper)account; UpdateWrapper wrapper = UpdateWrapper.of(account);
wrapper.setRaw("age", "age + 1") wrapper.setRaw("age", "age + 1")
accountMapper.update(account); accountMapper.update(account);
@ -135,7 +135,7 @@ Account account = UpdateEntity.of(Account.class, 100);
account.setUserName("Michael"); account.setUserName("Michael");
// 通过 UpdateWrapper 操作 account 数据 // 通过 UpdateWrapper 操作 account 数据
UpdateWrapper wrapper = (UpdateWrapper)account; UpdateWrapper wrapper = UpdateWrapper.of(account);
wrapper.set(ACCOUNT.AGE, ACCOUNT.AGE.add(1)) wrapper.set(ACCOUNT.AGE, ACCOUNT.AGE.add(1))
accountMapper.update(account); accountMapper.update(account);
@ -157,7 +157,7 @@ Account account = UpdateEntity.of(Account.class, 100);
account.setUserName("Michael"); account.setUserName("Michael");
// 通过 UpdateWrapper 操作 account 数据 // 通过 UpdateWrapper 操作 account 数据
UpdateWrapper wrapper = (UpdateWrapper)account; UpdateWrapper wrapper = UpdateWrapper.of(account);
wrapper.set(ACCOUNT.AGE, select().from(...)) wrapper.set(ACCOUNT.AGE, select().from(...))
accountMapper.update(account); accountMapper.update(account);