mirror of
https://gitee.com/mybatis-flex/mybatis-flex.git
synced 2025-12-07 00:58:24 +08:00
v1.2.1 release (^.^)YYa!!
This commit is contained in:
parent
af6c37ec59
commit
ac07997fab
@ -11,7 +11,7 @@ import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
@Table(value = "tb_account", dataSource = "ds2", onSet = AccountOnSetListener.class)
|
||||
public class Account extends BaseAccount implements Serializable, AgeAware {
|
||||
public class Account extends BaseEntity implements Serializable, AgeAware {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
||||
@ -1,6 +1,4 @@
|
||||
package com.mybatisflex.test;
|
||||
|
||||
import com.mybatisflex.core.BaseMapper;
|
||||
|
||||
public interface AccountMapper extends BaseMapper<Account> {
|
||||
public interface AccountMapper extends MyBaseMapper<Account> {
|
||||
}
|
||||
|
||||
@ -0,0 +1,4 @@
|
||||
package com.mybatisflex.test;
|
||||
|
||||
public class BaseEntity {
|
||||
}
|
||||
@ -52,9 +52,9 @@ public class EntityTestStarter {
|
||||
|
||||
|
||||
AccountMapper accountMapper = bootstrap.getMapper(AccountMapper.class);
|
||||
MyAccountMapper myAccountMapper = bootstrap.getMapper(MyAccountMapper.class);
|
||||
// MyAccountMapper myAccountMapper = bootstrap.getMapper(MyAccountMapper.class);
|
||||
|
||||
List<Account> accounts1 = myAccountMapper.selectAll();
|
||||
// List<Account> accounts1 = myAccountMapper.selectAll();
|
||||
|
||||
// QueryWrapper wrapper = QueryWrapper.create().select().from(ACCOUNT)
|
||||
// .and(ACCOUNT.ID.ge(100).and(ACCOUNT.ID.ge(200)))
|
||||
|
||||
@ -71,9 +71,9 @@ public class MultiDataSourceTester {
|
||||
System.out.println("tx: " + success);
|
||||
DataSourceKey.clear();
|
||||
|
||||
AccountMapper mapper = MybatisFlexBootstrap.getInstance().getMapper(AccountMapper.class);
|
||||
List<Account> accounts = mapper.selectAll();
|
||||
System.out.println(accounts);
|
||||
// AccountMapper mapper = MybatisFlexBootstrap.getInstance().getMapper(AccountMapper.class);
|
||||
// List<Account> accounts = mapper.selectAll();
|
||||
// System.out.println(accounts);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,6 @@
|
||||
package com.mybatisflex.test;
|
||||
|
||||
import com.mybatisflex.core.BaseMapper;
|
||||
|
||||
public interface MyBaseMapper<T extends BaseEntity> extends BaseMapper<T> {
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user