| 接口 | 说明 |
|---|---|
| BaseMapper<T> |
mapper 的基础增删查改
|
| MagicCreateLangMapper<T> |
自定义sql处理
|
| MapperManage |
对表数据进行正删改查,若要更新更复杂的sql,请使用mapper.xml进行编写
|
| 类 | 说明 |
|---|---|
| BaseMapperDriver |
curd
|
| MagicCreateLangDriver |
QueryWrapper 等查询前处理 |
| MagicEntity |
实体对象信息
|
| MapperManageImpl | |
| Query | |
| QueryColumn | |
| QueryWrapper<T> |
查询包装对象:
QueryWrapper<UserEntity> query = mapperManage.createQuery(
"select * from t_user where id>#{id}",
UserEntity.class);
query.addParam("id", 2);
List<UserEntity> list = query.getList();
System.out.println(list);
|
| UpadateWrapper |
更新包装对象,例1 :
UpadateWrapper update = mapperManage.createUpdate("update t_user set password=#{p} where id=#{id}");
update.addParam("p", System.currentTimeMillis()).addParam("id", 1);
int execute = update.execute();
log.info("受影响行数: {}", execute);
例2:
UpadateWrapper update = mapperManage.createUpdate("insert into t_user(id,username) values (2,#{un})");
update.addParam("un", "lk");
int execute = update.execute();
log.info("受影响行数: {}", execute);
|
| 枚举 | 说明 |
|---|---|
| Condition |
Copyright © 2024 lingkang. All rights reserved.