feat(utils): 添加ByteBuffer变长数字编解码和防抖器功能
- 在ByteBufferUtils中添加getVarLong、getVarInt、getVarShort读取变长数字功能 - 在ByteBufferUtils中添加putVarLong、putVarInt、putVarShort写入变长数字功能 - 新增Debouncer防抖器类用于防止短时间内重复执行任务 - 更新build.gradle.kts中mybatis-plus-core依赖版本至3.5.15 - 优化FileUtils中文件操作方法,增加Path和File类型的扩展函数 - 添加字节转义字符常量定义和hex字符串转换工具方法
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2025 mingliqiye
|
||||
* Copyright 2026 mingliqiye
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -16,13 +16,16 @@
|
||||
* ProjectName mingli-utils
|
||||
* ModuleName mingli-utils.main
|
||||
* CurrentFile QueryWrapper.kt
|
||||
* LastUpdate 2025-09-20 14:21:44
|
||||
* LastUpdate 2026-01-14 13:00:31
|
||||
* UpdateUser MingLiPro
|
||||
*/
|
||||
|
||||
package com.mingliqiye.utils.mybatisplus
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper
|
||||
|
||||
/**
|
||||
@@ -39,4 +42,31 @@ interface BaseMapperQuery<T> : BaseMapper<T> {
|
||||
fun queryWrapper(): QueryWrapper<T> {
|
||||
return QueryWrapper<T>()
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建并返回一个新的UpdateWrapper实例
|
||||
*
|
||||
* @return UpdateWrapper<T> 返回类型化的更新包装器实例
|
||||
*/
|
||||
fun updateWrapper(): UpdateWrapper<T> {
|
||||
return UpdateWrapper<T>()
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建并返回一个新的LambdaQueryWrapper实例
|
||||
*
|
||||
* @return LambdaQueryWrapper<T> 返回类型化的Lambda查询包装器实例
|
||||
*/
|
||||
fun lambdaQueryWrapper(): LambdaQueryWrapper<T> {
|
||||
return LambdaQueryWrapper<T>()
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建并返回一个新的LambdaUpdateWrapper实例
|
||||
*
|
||||
* @return LambdaUpdateWrapper<T> 返回类型化的Lambda更新包装器实例
|
||||
*/
|
||||
fun lambdaUpdateWrapper(): LambdaUpdateWrapper<T> {
|
||||
return LambdaUpdateWrapper<T>()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user