添加认证/权限接口.

This commit is contained in:
lijiahang
2023-07-17 10:27:53 +08:00
parent 90b9dba7ed
commit 90bf59135f
19 changed files with 437 additions and 96 deletions

View File

@@ -13,8 +13,14 @@ public interface ErrorMessage {
String ID_MISSING = "id 不能为空";
String INVALID_PARAM = "参数错误";
String DATA_PRESENT = "数据已存在";
String NAME_PRESENT = "名称已存在";
String CODE_PRESENT = "编码已存在";
String DATA_ABSENT = "数据不存在";
String USERNAME_PASSWORD_ERROR = "用户名或密码错误";

View File

@@ -18,6 +18,43 @@ import java.util.Collection;
*/
public interface IMapper<T> extends BaseMapper<T> {
/**
* 获取 ValidateLambdaWrapper 对象
*
* @return 获取 wrapper
*/
default LambdaQueryWrapper<T> wrapper() {
return Conditions.wrapper();
}
/**
* 获取 DataQuery 对象
*
* @return DataQuery
*/
default DataQuery<T> of() {
return DataQuery.of(this);
}
/**
* 获取 DataQuery 对象
*
* @param wrapper wrapper
* @return DataQuery
*/
default DataQuery<T> of(LambdaQueryWrapper<T> wrapper) {
return DataQuery.of(this, wrapper);
}
/**
* 获取 CacheQuery 对象
*
* @return CacheQuery
*/
default CacheQuery<T> cache() {
return CacheQuery.of(this);
}
/**
* 批量插入
*
@@ -91,39 +128,4 @@ public interface IMapper<T> extends BaseMapper<T> {
return Db.saveOrUpdateBatch(entities, size);
}
/**
* @return 获取 wrapper
*/
default LambdaQueryWrapper<T> wrapper() {
return Conditions.wrapper();
}
/**
* 获取 DataQuery 对象
*
* @return DataQuery
*/
default DataQuery<T> of() {
return DataQuery.of(this);
}
/**
* 获取 DataQuery 对象
*
* @param wrapper wrapper
* @return DataQuery
*/
default DataQuery<T> of(LambdaQueryWrapper<T> wrapper) {
return DataQuery.of(this, wrapper);
}
/**
* 获取 CacheQuery 对象
*
* @return CacheQuery
*/
default CacheQuery<T> cache() {
return CacheQuery.of(this);
}
}