mirror of
https://gitee.com/mybatis-flex/mybatis-flex.git
synced 2025-12-07 09:08:24 +08:00
add @ColumnMask() annotation support
This commit is contained in:
parent
7d9056bef6
commit
93aa7ca751
@ -1,10 +1,8 @@
|
||||
package com.mybatisflex.test;
|
||||
|
||||
import com.mybatisflex.annotation.Column;
|
||||
import com.mybatisflex.annotation.Id;
|
||||
import com.mybatisflex.annotation.KeyType;
|
||||
import com.mybatisflex.annotation.Table;
|
||||
import com.mybatisflex.annotation.*;
|
||||
import com.mybatisflex.core.handler.Fastjson2TypeHandler;
|
||||
import com.mybatisflex.core.mask.Masks;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
@ -16,6 +14,7 @@ public class Account {
|
||||
@Id(keyType = KeyType.Auto)
|
||||
private Long id;
|
||||
|
||||
@ColumnMask(Masks.CHINESE_NAME)
|
||||
private String userName;
|
||||
|
||||
private int age;
|
||||
|
||||
@ -48,6 +48,11 @@ public class EntityTestStarter {
|
||||
System.out.println(account);
|
||||
|
||||
|
||||
List<Account> allAccount = bootstrap.execute(AccountMapper.class, accountMapper ->
|
||||
accountMapper.selectListByQuery(QueryWrapper.create()));
|
||||
System.out.println(allAccount);
|
||||
|
||||
|
||||
Account newAccount = new Account();
|
||||
newAccount.setUserName("lisi");
|
||||
newAccount.setAge(18);
|
||||
|
||||
@ -1,3 +1,3 @@
|
||||
INSERT INTO tb_account
|
||||
VALUES (1, 'Michael Yang', 18, '2020-01-11', null),
|
||||
(2, 'Zhang san', 19, '2021-03-21', null);
|
||||
VALUES (1, '张三', 18, '2020-01-11', null),
|
||||
(2, '王麻子叔叔', 19, '2021-03-21', null);
|
||||
Loading…
x
Reference in New Issue
Block a user