fix javadoc warning

This commit is contained in:
Timi
2026-01-04 17:27:36 +08:00
parent ec7f4ecaa9
commit a9156e07f4
32 changed files with 587 additions and 11 deletions

View File

@@ -14,6 +14,8 @@ import java.util.List;
/**
* 基本 SQL 映射,子接口可以不实现
*
* @param <T> 实体类型
* @param <P> 主键类型
* @author 夜雨
* @version 2021-07-16 09:40
*/
@@ -27,17 +29,23 @@ public interface BaseMapper<T, P> {
*/
enum OrderType {
/** 升序 */
ASC,
/** 降序 */
DESC
}
/** 未删除条件 */
String NOT_DELETE = " AND `deleted_at` IS NULL ";
/** 限制一条 */
String LIMIT_1 = " LIMIT 1";
/** 当前时间戳毫秒 */
String UNIX_TIME = " FLOOR(UNIX_TIMESTAMP(NOW(3)) * 1000) ";
/** 分页限制 */
String PAGE = NOT_DELETE + " LIMIT #{offset}, #{limit}";
/**
@@ -71,6 +79,11 @@ public interface BaseMapper<T, P> {
return result;
}
/**
* 查询全部数据
*
* @return 数据列表
*/
@SelectProvider(type = SQLProvider.class, method = "selectAll")
List<T> selectAll();
@@ -92,9 +105,21 @@ public interface BaseMapper<T, P> {
@SelectProvider(type = SQLProvider.class, method = "select")
T select(P id);
/**
* 根据示例查询单条数据
*
* @param t 示例对象
* @return 数据对象
*/
@SelectProvider(type = SQLProvider.class, method = "selectByExample")
T selectByExample(T t);
/**
* 根据示例查询全部数据
*
* @param t 示例对象
* @return 数据列表
*/
@SelectProvider(type = SQLProvider.class, method = "selectAllByExample")
List<T> selectAllByExample(T t);
@@ -106,6 +131,11 @@ public interface BaseMapper<T, P> {
@UpdateProvider(type = SQLProvider.class, method = "update")
void update(T t);
/**
* 选择性更新
*
* @param t 数据对象
*/
@UpdateProvider(type = SQLProvider.class, method = "updateSelective")
void updateSelective(T t);
@@ -117,6 +147,11 @@ public interface BaseMapper<T, P> {
@UpdateProvider(type = SQLProvider.class, method = "delete")
void delete(P id);
/**
* 根据示例批量逻辑删除
*
* @param t 示例对象
*/
@UpdateProvider(type = SQLProvider.class, method = "deleteAllByExample")
void deleteAllByExample(T t);