Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibznotify
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibznotify
提交
37490e69
提交
37490e69
编写于
12月 24, 2020
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ibiz4j 发布系统代码 [ibiz-notify,通知消息]
上级
0276d578
变更
5
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
137 行增加
和
16 行删除
+137
-16
MsgBodyServiceImpl.java
.../ibizlab/core/notify/service/impl/MsgBodyServiceImpl.java
+34
-3
MsgOpenAccessServiceImpl.java
...ab/core/notify/service/impl/MsgOpenAccessServiceImpl.java
+34
-3
MsgTemplateServiceImpl.java
...zlab/core/notify/service/impl/MsgTemplateServiceImpl.java
+34
-3
MsgUserAccountServiceImpl.java
...b/core/notify/service/impl/MsgUserAccountServiceImpl.java
+34
-3
pom.xml
ibznotify-dependencies/pom.xml
+1
-4
未找到文件。
ibznotify-core/src/main/java/cn/ibizlab/core/notify/service/impl/MsgBodyServiceImpl.java
浏览文件 @
37490e69
...
@@ -48,6 +48,9 @@ import org.springframework.util.StringUtils;
...
@@ -48,6 +48,9 @@ import org.springframework.util.StringUtils;
@Service
(
"MsgBodyServiceImpl"
)
@Service
(
"MsgBodyServiceImpl"
)
public
class
MsgBodyServiceImpl
extends
ServiceImpl
<
MsgBodyMapper
,
MsgBody
>
implements
IMsgBodyService
{
public
class
MsgBodyServiceImpl
extends
ServiceImpl
<
MsgBodyMapper
,
MsgBody
>
implements
IMsgBodyService
{
@Autowired
@Lazy
IMsgBodyService
proxyService
;
protected
int
batchSize
=
500
;
protected
int
batchSize
=
500
;
...
@@ -133,21 +136,49 @@ public class MsgBodyServiceImpl extends ServiceImpl<MsgBodyMapper, MsgBody> impl
...
@@ -133,21 +136,49 @@ public class MsgBodyServiceImpl extends ServiceImpl<MsgBodyMapper, MsgBody> impl
if
(
null
==
et
)
{
if
(
null
==
et
)
{
return
false
;
return
false
;
}
else
{
}
else
{
return
checkKey
(
et
)
?
this
.
update
(
et
)
:
this
.
create
(
et
);
return
checkKey
(
et
)
?
proxyService
.
update
(
et
)
:
proxyService
.
create
(
et
);
}
}
}
}
@Override
@Override
@Transactional
@Transactional
public
boolean
saveBatch
(
Collection
<
MsgBody
>
list
)
{
public
boolean
saveBatch
(
Collection
<
MsgBody
>
list
)
{
saveOrUpdateBatch
(
list
,
batchSize
);
List
<
MsgBody
>
create
=
new
ArrayList
<>();
List
<
MsgBody
>
update
=
new
ArrayList
<>();
for
(
MsgBody
et
:
list
)
{
if
(
ObjectUtils
.
isEmpty
(
et
.
getMsgId
())
||
ObjectUtils
.
isEmpty
(
getById
(
et
.
getMsgId
())))
{
create
.
add
(
et
);
}
else
{
update
.
add
(
et
);
}
}
if
(
create
.
size
()
>
0
)
{
proxyService
.
createBatch
(
create
);
}
if
(
update
.
size
()
>
0
)
{
proxyService
.
updateBatch
(
update
);
}
return
true
;
return
true
;
}
}
@Override
@Override
@Transactional
@Transactional
public
void
saveBatch
(
List
<
MsgBody
>
list
)
{
public
void
saveBatch
(
List
<
MsgBody
>
list
)
{
saveOrUpdateBatch
(
list
,
batchSize
);
List
<
MsgBody
>
create
=
new
ArrayList
<>();
List
<
MsgBody
>
update
=
new
ArrayList
<>();
for
(
MsgBody
et
:
list
)
{
if
(
ObjectUtils
.
isEmpty
(
et
.
getMsgId
())
||
ObjectUtils
.
isEmpty
(
getById
(
et
.
getMsgId
())))
{
create
.
add
(
et
);
}
else
{
update
.
add
(
et
);
}
}
if
(
create
.
size
()
>
0
)
{
proxyService
.
createBatch
(
create
);
}
if
(
update
.
size
()
>
0
)
{
proxyService
.
updateBatch
(
update
);
}
}
}
...
...
ibznotify-core/src/main/java/cn/ibizlab/core/notify/service/impl/MsgOpenAccessServiceImpl.java
浏览文件 @
37490e69
...
@@ -51,6 +51,9 @@ public class MsgOpenAccessServiceImpl extends ServiceImpl<MsgOpenAccessMapper, M
...
@@ -51,6 +51,9 @@ public class MsgOpenAccessServiceImpl extends ServiceImpl<MsgOpenAccessMapper, M
@Autowired
@Autowired
@Lazy
@Lazy
protected
cn
.
ibizlab
.
core
.
notify
.
service
.
IMsgTemplateService
msgtemplateService
;
protected
cn
.
ibizlab
.
core
.
notify
.
service
.
IMsgTemplateService
msgtemplateService
;
@Autowired
@Lazy
IMsgOpenAccessService
proxyService
;
protected
int
batchSize
=
500
;
protected
int
batchSize
=
500
;
...
@@ -136,21 +139,49 @@ public class MsgOpenAccessServiceImpl extends ServiceImpl<MsgOpenAccessMapper, M
...
@@ -136,21 +139,49 @@ public class MsgOpenAccessServiceImpl extends ServiceImpl<MsgOpenAccessMapper, M
if
(
null
==
et
)
{
if
(
null
==
et
)
{
return
false
;
return
false
;
}
else
{
}
else
{
return
checkKey
(
et
)
?
this
.
update
(
et
)
:
this
.
create
(
et
);
return
checkKey
(
et
)
?
proxyService
.
update
(
et
)
:
proxyService
.
create
(
et
);
}
}
}
}
@Override
@Override
@Transactional
@Transactional
public
boolean
saveBatch
(
Collection
<
MsgOpenAccess
>
list
)
{
public
boolean
saveBatch
(
Collection
<
MsgOpenAccess
>
list
)
{
saveOrUpdateBatch
(
list
,
batchSize
);
List
<
MsgOpenAccess
>
create
=
new
ArrayList
<>();
List
<
MsgOpenAccess
>
update
=
new
ArrayList
<>();
for
(
MsgOpenAccess
et
:
list
)
{
if
(
ObjectUtils
.
isEmpty
(
et
.
getId
())
||
ObjectUtils
.
isEmpty
(
getById
(
et
.
getId
())))
{
create
.
add
(
et
);
}
else
{
update
.
add
(
et
);
}
}
if
(
create
.
size
()
>
0
)
{
proxyService
.
createBatch
(
create
);
}
if
(
update
.
size
()
>
0
)
{
proxyService
.
updateBatch
(
update
);
}
return
true
;
return
true
;
}
}
@Override
@Override
@Transactional
@Transactional
public
void
saveBatch
(
List
<
MsgOpenAccess
>
list
)
{
public
void
saveBatch
(
List
<
MsgOpenAccess
>
list
)
{
saveOrUpdateBatch
(
list
,
batchSize
);
List
<
MsgOpenAccess
>
create
=
new
ArrayList
<>();
List
<
MsgOpenAccess
>
update
=
new
ArrayList
<>();
for
(
MsgOpenAccess
et
:
list
)
{
if
(
ObjectUtils
.
isEmpty
(
et
.
getId
())
||
ObjectUtils
.
isEmpty
(
getById
(
et
.
getId
())))
{
create
.
add
(
et
);
}
else
{
update
.
add
(
et
);
}
}
if
(
create
.
size
()
>
0
)
{
proxyService
.
createBatch
(
create
);
}
if
(
update
.
size
()
>
0
)
{
proxyService
.
updateBatch
(
update
);
}
}
}
...
...
ibznotify-core/src/main/java/cn/ibizlab/core/notify/service/impl/MsgTemplateServiceImpl.java
浏览文件 @
37490e69
...
@@ -51,6 +51,9 @@ public class MsgTemplateServiceImpl extends ServiceImpl<MsgTemplateMapper, MsgTe
...
@@ -51,6 +51,9 @@ public class MsgTemplateServiceImpl extends ServiceImpl<MsgTemplateMapper, MsgTe
@Autowired
@Autowired
@Lazy
@Lazy
protected
cn
.
ibizlab
.
core
.
notify
.
service
.
IMsgOpenAccessService
msgopenaccessService
;
protected
cn
.
ibizlab
.
core
.
notify
.
service
.
IMsgOpenAccessService
msgopenaccessService
;
@Autowired
@Lazy
IMsgTemplateService
proxyService
;
protected
int
batchSize
=
500
;
protected
int
batchSize
=
500
;
...
@@ -141,7 +144,7 @@ public class MsgTemplateServiceImpl extends ServiceImpl<MsgTemplateMapper, MsgTe
...
@@ -141,7 +144,7 @@ public class MsgTemplateServiceImpl extends ServiceImpl<MsgTemplateMapper, MsgTe
if
(
null
==
et
)
{
if
(
null
==
et
)
{
return
false
;
return
false
;
}
else
{
}
else
{
return
checkKey
(
et
)
?
this
.
update
(
et
)
:
this
.
create
(
et
);
return
checkKey
(
et
)
?
proxyService
.
update
(
et
)
:
proxyService
.
create
(
et
);
}
}
}
}
...
@@ -149,7 +152,21 @@ public class MsgTemplateServiceImpl extends ServiceImpl<MsgTemplateMapper, MsgTe
...
@@ -149,7 +152,21 @@ public class MsgTemplateServiceImpl extends ServiceImpl<MsgTemplateMapper, MsgTe
@Transactional
@Transactional
public
boolean
saveBatch
(
Collection
<
MsgTemplate
>
list
)
{
public
boolean
saveBatch
(
Collection
<
MsgTemplate
>
list
)
{
list
.
forEach
(
item
->
fillParentData
(
item
));
list
.
forEach
(
item
->
fillParentData
(
item
));
saveOrUpdateBatch
(
list
,
batchSize
);
List
<
MsgTemplate
>
create
=
new
ArrayList
<>();
List
<
MsgTemplate
>
update
=
new
ArrayList
<>();
for
(
MsgTemplate
et
:
list
)
{
if
(
ObjectUtils
.
isEmpty
(
et
.
getTid
())
||
ObjectUtils
.
isEmpty
(
getById
(
et
.
getTid
())))
{
create
.
add
(
et
);
}
else
{
update
.
add
(
et
);
}
}
if
(
create
.
size
()
>
0
)
{
proxyService
.
createBatch
(
create
);
}
if
(
update
.
size
()
>
0
)
{
proxyService
.
updateBatch
(
update
);
}
return
true
;
return
true
;
}
}
...
@@ -157,7 +174,21 @@ public class MsgTemplateServiceImpl extends ServiceImpl<MsgTemplateMapper, MsgTe
...
@@ -157,7 +174,21 @@ public class MsgTemplateServiceImpl extends ServiceImpl<MsgTemplateMapper, MsgTe
@Transactional
@Transactional
public
void
saveBatch
(
List
<
MsgTemplate
>
list
)
{
public
void
saveBatch
(
List
<
MsgTemplate
>
list
)
{
list
.
forEach
(
item
->
fillParentData
(
item
));
list
.
forEach
(
item
->
fillParentData
(
item
));
saveOrUpdateBatch
(
list
,
batchSize
);
List
<
MsgTemplate
>
create
=
new
ArrayList
<>();
List
<
MsgTemplate
>
update
=
new
ArrayList
<>();
for
(
MsgTemplate
et
:
list
)
{
if
(
ObjectUtils
.
isEmpty
(
et
.
getTid
())
||
ObjectUtils
.
isEmpty
(
getById
(
et
.
getTid
())))
{
create
.
add
(
et
);
}
else
{
update
.
add
(
et
);
}
}
if
(
create
.
size
()
>
0
)
{
proxyService
.
createBatch
(
create
);
}
if
(
update
.
size
()
>
0
)
{
proxyService
.
updateBatch
(
update
);
}
}
}
...
...
ibznotify-core/src/main/java/cn/ibizlab/core/notify/service/impl/MsgUserAccountServiceImpl.java
浏览文件 @
37490e69
...
@@ -48,6 +48,9 @@ import org.springframework.util.StringUtils;
...
@@ -48,6 +48,9 @@ import org.springframework.util.StringUtils;
@Service
(
"MsgUserAccountServiceImpl"
)
@Service
(
"MsgUserAccountServiceImpl"
)
public
class
MsgUserAccountServiceImpl
extends
ServiceImpl
<
MsgUserAccountMapper
,
MsgUserAccount
>
implements
IMsgUserAccountService
{
public
class
MsgUserAccountServiceImpl
extends
ServiceImpl
<
MsgUserAccountMapper
,
MsgUserAccount
>
implements
IMsgUserAccountService
{
@Autowired
@Lazy
IMsgUserAccountService
proxyService
;
protected
int
batchSize
=
500
;
protected
int
batchSize
=
500
;
...
@@ -133,21 +136,49 @@ public class MsgUserAccountServiceImpl extends ServiceImpl<MsgUserAccountMapper,
...
@@ -133,21 +136,49 @@ public class MsgUserAccountServiceImpl extends ServiceImpl<MsgUserAccountMapper,
if
(
null
==
et
)
{
if
(
null
==
et
)
{
return
false
;
return
false
;
}
else
{
}
else
{
return
checkKey
(
et
)
?
this
.
update
(
et
)
:
this
.
create
(
et
);
return
checkKey
(
et
)
?
proxyService
.
update
(
et
)
:
proxyService
.
create
(
et
);
}
}
}
}
@Override
@Override
@Transactional
@Transactional
public
boolean
saveBatch
(
Collection
<
MsgUserAccount
>
list
)
{
public
boolean
saveBatch
(
Collection
<
MsgUserAccount
>
list
)
{
saveOrUpdateBatch
(
list
,
batchSize
);
List
<
MsgUserAccount
>
create
=
new
ArrayList
<>();
List
<
MsgUserAccount
>
update
=
new
ArrayList
<>();
for
(
MsgUserAccount
et
:
list
)
{
if
(
ObjectUtils
.
isEmpty
(
et
.
getId
())
||
ObjectUtils
.
isEmpty
(
getById
(
et
.
getId
())))
{
create
.
add
(
et
);
}
else
{
update
.
add
(
et
);
}
}
if
(
create
.
size
()
>
0
)
{
proxyService
.
createBatch
(
create
);
}
if
(
update
.
size
()
>
0
)
{
proxyService
.
updateBatch
(
update
);
}
return
true
;
return
true
;
}
}
@Override
@Override
@Transactional
@Transactional
public
void
saveBatch
(
List
<
MsgUserAccount
>
list
)
{
public
void
saveBatch
(
List
<
MsgUserAccount
>
list
)
{
saveOrUpdateBatch
(
list
,
batchSize
);
List
<
MsgUserAccount
>
create
=
new
ArrayList
<>();
List
<
MsgUserAccount
>
update
=
new
ArrayList
<>();
for
(
MsgUserAccount
et
:
list
)
{
if
(
ObjectUtils
.
isEmpty
(
et
.
getId
())
||
ObjectUtils
.
isEmpty
(
getById
(
et
.
getId
())))
{
create
.
add
(
et
);
}
else
{
update
.
add
(
et
);
}
}
if
(
create
.
size
()
>
0
)
{
proxyService
.
createBatch
(
create
);
}
if
(
update
.
size
()
>
0
)
{
proxyService
.
updateBatch
(
update
);
}
}
}
...
...
ibznotify-dependencies/pom.xml
浏览文件 @
37490e69
...
@@ -31,9 +31,6 @@
...
@@ -31,9 +31,6 @@
<mybatis-plus.version>
3.3.1
</mybatis-plus.version>
<mybatis-plus.version>
3.3.1
</mybatis-plus.version>
<mybatis-plus-dynamic-datasource.version>
3.0.0
</mybatis-plus-dynamic-datasource.version>
<mybatis-plus-dynamic-datasource.version>
3.0.0
</mybatis-plus-dynamic-datasource.version>
<!-- Liquibase -->
<liquibase.version>
3.6.3
</liquibase.version>
<!-- Swagger2 -->
<!-- Swagger2 -->
<springfox-swagger.version>
2.9.2
</springfox-swagger.version>
<springfox-swagger.version>
2.9.2
</springfox-swagger.version>
...
@@ -60,7 +57,7 @@
...
@@ -60,7 +57,7 @@
<jsonwebtoken-jjwt.version>
0.9.1
</jsonwebtoken-jjwt.version>
<jsonwebtoken-jjwt.version>
0.9.1
</jsonwebtoken-jjwt.version>
<!--Liquibase数据库版本更新工具-->
<!--Liquibase数据库版本更新工具-->
<liquibase.version>
3.
8.7
</liquibase.version>
<liquibase.version>
3.
9.0
</liquibase.version>
<!--H2内存数据库-->
<!--H2内存数据库-->
<h2.version>
1.4.200
</h2.version>
<h2.version>
1.4.200
</h2.version>
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录