generated from mingliqiye/lib-tem
feat(utils): 添加 MyBatis-Plus 查询包装器支持
在 build.gradle.kts 中替换 JNA依赖为 mybatis-plus-core,并新增BaseMapperQuery 接口,提供通用的 QueryWrapper 实例创建方法,便于MyBatis-Plus 相关操作的统一封装与复用
This commit is contained in:
parent
578f0a3e89
commit
5eed682aa1
@ -16,7 +16,7 @@
|
|||||||
* ProjectName mingli-utils
|
* ProjectName mingli-utils
|
||||||
* ModuleName mingli-utils
|
* ModuleName mingli-utils
|
||||||
* CurrentFile build.gradle.kts
|
* CurrentFile build.gradle.kts
|
||||||
* LastUpdate 2025-09-19 09:39:33
|
* LastUpdate 2025-09-20 14:16:07
|
||||||
* UpdateUser MingLiPro
|
* UpdateUser MingLiPro
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -77,7 +77,7 @@ dependencies {
|
|||||||
compileOnly("com.google.code.gson:gson:2.13.1")
|
compileOnly("com.google.code.gson:gson:2.13.1")
|
||||||
compileOnly("org.mybatis:mybatis:3.5.19")
|
compileOnly("org.mybatis:mybatis:3.5.19")
|
||||||
compileOnly("com.alibaba.fastjson2:fastjson2:2.0.58")
|
compileOnly("com.alibaba.fastjson2:fastjson2:2.0.58")
|
||||||
compileOnly("net.java.dev.jna:jna:5.17.0")
|
compileOnly("com.baomidou:mybatis-plus-core:3.0.1")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -213,5 +213,3 @@ tasks.processResources {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -16,13 +16,13 @@
|
|||||||
# ProjectName mingli-utils
|
# ProjectName mingli-utils
|
||||||
# ModuleName mingli-utils
|
# ModuleName mingli-utils
|
||||||
# CurrentFile gradle.properties
|
# CurrentFile gradle.properties
|
||||||
# LastUpdate 2025-09-20 14:01:07
|
# LastUpdate 2025-09-20 14:22:07
|
||||||
# UpdateUser MingLiPro
|
# UpdateUser MingLiPro
|
||||||
#
|
#
|
||||||
JDKVERSIONS=1.8
|
JDKVERSIONS=1.8
|
||||||
GROUPSID=com.mingliqiye.utils
|
GROUPSID=com.mingliqiye.utils
|
||||||
ARTIFACTID=mingli-utils
|
ARTIFACTID=mingli-utils
|
||||||
VERSIONS=4.1.6
|
VERSIONS=4.1.7
|
||||||
signing.keyId=B22AA93B
|
signing.keyId=B22AA93B
|
||||||
signing.password=
|
signing.password=
|
||||||
signing.secretKeyRingFile=secret.gpg
|
signing.secretKeyRingFile=secret.gpg
|
||||||
|
|||||||
@ -0,0 +1,42 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2025 mingliqiye
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*
|
||||||
|
* ProjectName mingli-utils
|
||||||
|
* ModuleName mingli-utils.main
|
||||||
|
* CurrentFile QueryWrapper.kt
|
||||||
|
* LastUpdate 2025-09-20 14:21:44
|
||||||
|
* UpdateUser MingLiPro
|
||||||
|
*/
|
||||||
|
|
||||||
|
package com.mingliqiye.utils.mybatisplus
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper
|
||||||
|
|
||||||
|
/**
|
||||||
|
* BaseMapperQuery接口扩展了BaseMapper,提供了通用的查询包装器功能
|
||||||
|
*
|
||||||
|
* @param T 实体类类型
|
||||||
|
*/
|
||||||
|
interface BaseMapperQuery<T> : BaseMapper<T> {
|
||||||
|
/**
|
||||||
|
* 创建并返回一个新的QueryWrapper实例
|
||||||
|
*
|
||||||
|
* @return QueryWrapper<T> 返回类型化的查询包装器实例
|
||||||
|
*/
|
||||||
|
fun queryWrapper(): QueryWrapper<T> {
|
||||||
|
return QueryWrapper<T>()
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user