mirror of
https://gitee.com/best_handsome/mybatis-plus-join
synced 2025-07-11 00:02:22 +08:00
1.5.1
This commit is contained in:
parent
6a5983aad4
commit
7e3ee68d73
@ -47,12 +47,12 @@ QQ群:680016987 或者
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.github.yulichang</groupId>
|
<groupId>com.github.yulichang</groupId>
|
||||||
<artifactId>mybatis-plus-join-boot-starter</artifactId>
|
<artifactId>mybatis-plus-join-boot-starter</artifactId>
|
||||||
<version>1.5.0</version>
|
<version>1.5.1</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
```
|
```
|
||||||
- Gradle
|
- Gradle
|
||||||
```
|
```
|
||||||
implementation 'com.github.yulichang:mybatis-plus-join-boot-starter:1.5.0'
|
implementation 'com.github.yulichang:mybatis-plus-join-boot-starter:1.5.1'
|
||||||
```
|
```
|
||||||
或者clone代码到本地执行 mvn install, 再引入以上依赖
|
或者clone代码到本地执行 mvn install, 再引入以上依赖
|
||||||
<br>
|
<br>
|
||||||
|
@ -47,12 +47,12 @@ QQ群:680016987 或者
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.github.yulichang</groupId>
|
<groupId>com.github.yulichang</groupId>
|
||||||
<artifactId>mybatis-plus-join-boot-starter</artifactId>
|
<artifactId>mybatis-plus-join-boot-starter</artifactId>
|
||||||
<version>1.5.0</version>
|
<version>1.5.1</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
```
|
```
|
||||||
- Gradle
|
- Gradle
|
||||||
```
|
```
|
||||||
implementation 'com.github.yulichang:mybatis-plus-join-boot-starter:1.5.0'
|
implementation 'com.github.yulichang:mybatis-plus-join-boot-starter:1.5.1'
|
||||||
```
|
```
|
||||||
或者clone代码到本地执行 mvn install, 再引入以上依赖
|
或者clone代码到本地执行 mvn install, 再引入以上依赖
|
||||||
<br>
|
<br>
|
||||||
|
@ -30,7 +30,7 @@ public class MPJInterceptorConfig {
|
|||||||
System.out.println(" _ _ |_ _ _|_. ___ _ | _ . _ . _ \n" +
|
System.out.println(" _ _ |_ _ _|_. ___ _ | _ . _ . _ \n" +
|
||||||
"| | |\\/|_)(_| | |_\\ |_)||_|_\\ | (_) | | | \n" +
|
"| | |\\/|_)(_| | |_\\ |_)||_|_\\ | (_) | | | \n" +
|
||||||
" / | /\n" +
|
" / | /\n" +
|
||||||
" 1.5.0");
|
" 1.5.1");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -49,7 +49,7 @@
|
|||||||
</scm>
|
</scm>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<revision>1.5.0</revision>
|
<revision>1.5.1</revision>
|
||||||
<mybatis.plus.version>3.5.8</mybatis.plus.version>
|
<mybatis.plus.version>3.5.8</mybatis.plus.version>
|
||||||
|
|
||||||
<jdkVersion>17</jdkVersion>
|
<jdkVersion>17</jdkVersion>
|
||||||
|
@ -1,13 +1,7 @@
|
|||||||
package com.github.yulichang.mybatisplusjoin.solon.plugin.base;
|
package com.github.yulichang.mybatisplusjoin.solon.plugin.base;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
||||||
import com.baomidou.mybatisplus.solon.service.IService;
|
import com.baomidou.mybatisplus.solon.service.IService;
|
||||||
import com.baomidou.mybatisplus.solon.toolkit.SqlHelper;
|
import com.github.yulichang.base.JoinService;
|
||||||
import com.github.yulichang.base.MPJBaseMapper;
|
|
||||||
import com.github.yulichang.interfaces.MPJBaseJoin;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 基础service
|
* 基础service
|
||||||
@ -15,85 +9,6 @@ import java.util.Map;
|
|||||||
*
|
*
|
||||||
* @author yulichang
|
* @author yulichang
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings({"unused"})
|
public interface MPJBaseService<T> extends IService<T>, JoinService<T> {
|
||||||
public interface MPJBaseService<T> extends IService<T> {
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据 Wrapper 条件,连表删除
|
|
||||||
*
|
|
||||||
* @param wrapper joinWrapper
|
|
||||||
*/
|
|
||||||
default boolean deleteJoin(MPJBaseJoin<T> wrapper) {
|
|
||||||
return SqlHelper.retBool(((MPJBaseMapper<T>) getBaseMapper()).deleteJoin(wrapper));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据 whereEntity 条件,更新记录
|
|
||||||
*
|
|
||||||
* @param entity 实体对象 (set 条件值,可以为 null)
|
|
||||||
* @param wrapper 实体对象封装操作类(可以为 null,里面的 entity 用于生成 where 语句)
|
|
||||||
*/
|
|
||||||
default boolean updateJoin(T entity, MPJBaseJoin<T> wrapper) {
|
|
||||||
return SqlHelper.retBool(((MPJBaseMapper<T>) getBaseMapper()).updateJoin(entity, wrapper));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据 whereEntity 条件,更新记录 (null字段也会更新 !!!)
|
|
||||||
*
|
|
||||||
* @param entity 实体对象 (set 条件值,可以为 null)
|
|
||||||
* @param wrapper 实体对象封装操作类(可以为 null,里面的 entity 用于生成 where 语句)
|
|
||||||
*/
|
|
||||||
default boolean updateJoinAndNull(T entity, MPJBaseJoin<T> wrapper) {
|
|
||||||
return SqlHelper.retBool(((MPJBaseMapper<T>) getBaseMapper()).updateJoinAndNull(entity, wrapper));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据 Wrapper 条件,查询总记录数
|
|
||||||
*/
|
|
||||||
default Long selectJoinCount(MPJBaseJoin<T> wrapper) {
|
|
||||||
return ((MPJBaseMapper<T>) getBaseMapper()).selectJoinCount(wrapper);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 连接查询返回一条记录
|
|
||||||
*/
|
|
||||||
default <DTO> DTO selectJoinOne(Class<DTO> clazz, MPJBaseJoin<T> wrapper) {
|
|
||||||
return ((MPJBaseMapper<T>) getBaseMapper()).selectJoinOne(clazz, wrapper);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 连接查询返回集合
|
|
||||||
*/
|
|
||||||
default <DTO> List<DTO> selectJoinList(Class<DTO> clazz, MPJBaseJoin<T> wrapper) {
|
|
||||||
return ((MPJBaseMapper<T>) getBaseMapper()).selectJoinList(clazz, wrapper);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 连接查询返回集合并分页
|
|
||||||
*/
|
|
||||||
default <DTO, P extends IPage<DTO>> P selectJoinListPage(P page, Class<DTO> clazz, MPJBaseJoin<T> wrapper) {
|
|
||||||
return ((MPJBaseMapper<T>) getBaseMapper()).selectJoinPage(page, clazz, wrapper);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 连接查询返回Map
|
|
||||||
*/
|
|
||||||
default Map<String, Object> selectJoinMap(MPJBaseJoin<T> wrapper) {
|
|
||||||
return ((MPJBaseMapper<T>) getBaseMapper()).selectJoinMap(wrapper);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 连接查询返回Map集合
|
|
||||||
*/
|
|
||||||
default List<Map<String, Object>> selectJoinMaps(MPJBaseJoin<T> wrapper) {
|
|
||||||
return ((MPJBaseMapper<T>) getBaseMapper()).selectJoinMaps(wrapper);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 连接查询返回Map集合并分页
|
|
||||||
*/
|
|
||||||
default <P extends IPage<Map<String, Object>>> P selectJoinMapsPage(P page, MPJBaseJoin<T> wrapper) {
|
|
||||||
return ((MPJBaseMapper<T>) getBaseMapper()).selectJoinMapsPage(page, wrapper);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user