Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibiz-boot-starters
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibiz-boot-starters
提交
4996ec51
提交
4996ec51
编写于
7月 27, 2022
作者:
sq3536
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
mapper类
上级
28baf0dd
变更
4
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
39 行增加
和
3 行删除
+39
-3
BaseFilter.java
...t/ibizsys/central/plugin/boot/core/filter/BaseFilter.java
+2
-2
IMPService.java
.../ibizsys/central/plugin/boot/core/service/IMPService.java
+2
-0
BaseServiceImpl.java
...entral/plugin/boot/core/service/impl/BaseServiceImpl.java
+1
-1
MPServiceImpl.java
.../central/plugin/boot/core/service/impl/MPServiceImpl.java
+34
-0
未找到文件。
ibiz-boot-starter/src/main/java/net/ibizsys/central/plugin/boot/core/filter/BaseFilter.java
浏览文件 @
4996ec51
...
@@ -192,8 +192,8 @@ public class BaseFilter<T> extends BaseData implements ISearchContextDTO {
...
@@ -192,8 +192,8 @@ public class BaseFilter<T> extends BaseData implements ISearchContextDTO {
SearchFieldCond
searchFieldCond
=
new
SearchFieldCond
();
SearchFieldCond
searchFieldCond
=
new
SearchFieldCond
();
searchFieldCond
.
setFieldName
(
strFieldName
);
searchFieldCond
.
setFieldName
(
strFieldName
);
searchFieldCond
.
setCondOp
(
strCondOp
);
searchFieldCond
.
setCondOp
(
strCondOp
);
if
(
!
Conditions
.
ISNULL
.
equals
(
strCondOp
)
if
(
Conditions
.
ISNULL
.
equals
(
strCondOp
)
&&
!
Conditions
.
ISNOTNULL
.
equals
(
strCondOp
))
{
||
Conditions
.
ISNOTNULL
.
equals
(
strCondOp
))
{
objValue
=
"1"
;
objValue
=
"1"
;
}
}
searchFieldCond
.
setParamMode
(
true
);
searchFieldCond
.
setParamMode
(
true
);
...
...
ibiz-boot-starter/src/main/java/net/ibizsys/central/plugin/boot/core/service/IMPService.java
浏览文件 @
4996ec51
...
@@ -22,6 +22,8 @@ public interface IMPService<T extends BaseData, F extends BaseFilter, M extends
...
@@ -22,6 +22,8 @@ public interface IMPService<T extends BaseData, F extends BaseFilter, M extends
return
null
;
return
null
;
}
}
Class
<
M
>
getMClass
();
default
List
<
T
>
list
(
QueryWrapper
<
T
>
queryWrapper
)
{
default
List
<
T
>
list
(
QueryWrapper
<
T
>
queryWrapper
)
{
return
this
.
getBaseMapper
().
selectList
(
queryWrapper
);
return
this
.
getBaseMapper
().
selectList
(
queryWrapper
);
}
}
...
...
ibiz-boot-starter/src/main/java/net/ibizsys/central/plugin/boot/core/service/impl/BaseServiceImpl.java
浏览文件 @
4996ec51
...
@@ -29,7 +29,7 @@ public abstract class BaseServiceImpl<T extends BaseData, F extends BaseFilter>
...
@@ -29,7 +29,7 @@ public abstract class BaseServiceImpl<T extends BaseData, F extends BaseFilter>
}
}
@PostConstruct
@PostConstruct
pr
ivate
void
postConstruct
()
throws
Exception
{
pr
otected
void
postConstruct
()
throws
Exception
{
Class
serviceClass
=
this
.
getClass
();
Class
serviceClass
=
this
.
getClass
();
while
(
serviceClass
!=
null
)
{
while
(
serviceClass
!=
null
)
{
if
(!
ObjectUtils
.
isEmpty
(
serviceClass
.
getInterfaces
()))
{
if
(!
ObjectUtils
.
isEmpty
(
serviceClass
.
getInterfaces
()))
{
...
...
ibiz-boot-starter/src/main/java/net/ibizsys/central/plugin/boot/core/service/impl/MPServiceImpl.java
浏览文件 @
4996ec51
...
@@ -3,9 +3,16 @@ package net.ibizsys.central.plugin.boot.core.service.impl;
...
@@ -3,9 +3,16 @@ package net.ibizsys.central.plugin.boot.core.service.impl;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
net.ibizsys.central.plugin.boot.core.domain.BaseData
;
import
net.ibizsys.central.plugin.boot.core.domain.BaseData
;
import
net.ibizsys.central.plugin.boot.core.filter.BaseFilter
;
import
net.ibizsys.central.plugin.boot.core.filter.BaseFilter
;
import
net.ibizsys.central.plugin.boot.core.runtime.BootServiceImpl
;
import
net.ibizsys.central.plugin.boot.core.service.IBaseService
;
import
net.ibizsys.central.plugin.boot.core.service.IMPService
;
import
net.ibizsys.central.plugin.boot.core.service.IMPService
;
import
net.ibizsys.central.plugin.boot.core.service.IServiceApiService
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
javax.annotation.PostConstruct
;
import
java.lang.reflect.ParameterizedType
;
public
abstract
class
MPServiceImpl
<
T
extends
BaseData
,
F
extends
BaseFilter
,
M
extends
BaseMapper
<
T
>>
extends
BaseServiceImpl
<
T
,
F
>
implements
IMPService
<
T
,
F
,
M
>
{
public
abstract
class
MPServiceImpl
<
T
extends
BaseData
,
F
extends
BaseFilter
,
M
extends
BaseMapper
<
T
>>
extends
BaseServiceImpl
<
T
,
F
>
implements
IMPService
<
T
,
F
,
M
>
{
...
@@ -15,5 +22,32 @@ public abstract class MPServiceImpl<T extends BaseData, F extends BaseFilter, M
...
@@ -15,5 +22,32 @@ public abstract class MPServiceImpl<T extends BaseData, F extends BaseFilter, M
return
this
.
baseMapper
;
return
this
.
baseMapper
;
}
}
private
Class
<
M
>
mClass
;
public
Class
<
M
>
getMClass
()
{
return
mClass
;
}
@PostConstruct
protected
void
postConstruct
()
throws
Exception
{
Class
serviceClass
=
this
.
getClass
();
while
(
serviceClass
!=
null
)
{
if
(!
ObjectUtils
.
isEmpty
(
serviceClass
.
getInterfaces
()))
{
Class
interfaceClass
=
serviceClass
.
getInterfaces
()[
0
];
if
(!
ObjectUtils
.
isEmpty
(
interfaceClass
.
getInterfaces
()))
{
if
(
interfaceClass
.
getInterfaces
()[
0
].
isAssignableFrom
(
IMPService
.
class
))
{
serviceClass
=
interfaceClass
;
break
;
}
}
}
serviceClass
=
serviceClass
.
getSuperclass
();
}
if
(!
ObjectUtils
.
isEmpty
(
serviceClass
.
getGenericInterfaces
()))
{
ParameterizedType
ptype
=
(
ParameterizedType
)
serviceClass
.
getGenericInterfaces
()[
0
];
mClass
=
(
Class
)
ptype
.
getActualTypeArguments
()[
2
];
}
super
.
postConstruct
();
}
}
}
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录