Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
H
hzsomms
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ZTGK
hzsomms
Commits
31cbe5f2
Commit
31cbe5f2
authored
Jul 07, 2023
by
hkl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:1.修改调整目录后报错
parent
d52bc4e3
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
457 additions
and
23 deletions
+457
-23
ISysBaseAPI.java
...rc/main/java/org/jeecg/common/system/api/ISysBaseAPI.java
+436
-0
pom.xml
jeecg-module-system/pom.xml
+0
-4
SystemSendMsgHandle.java
...eecg/modules/message/handle/impl/SystemSendMsgHandle.java
+21
-19
No files found.
jeecg-boot-base-core/src/main/java/org/jeecg/common/system/api/ISysBaseAPI.java
0 → 100644
View file @
31cbe5f2
This diff is collapsed.
Click to expand it.
jeecg-module-system/pom.xml
View file @
31cbe5f2
...
...
@@ -22,10 +22,6 @@
<artifactId>
TinyPinyin
</artifactId>
<version>
2.0.3.RELEASE
</version>
</dependency>
<dependency>
<groupId>
org.jeecgframework.boot
</groupId>
<artifactId>
jeecg-system-local-api
</artifactId>
</dependency>
<dependency>
<groupId>
org.hibernate
</groupId>
<artifactId>
hibernate-core
</artifactId>
...
...
jeecg-module-system/src/main/java/org/jeecg/modules/message/handle/impl/SystemSendMsgHandle.java
View file @
31cbe5f2
...
...
@@ -24,14 +24,14 @@ import java.util.Date;
import
java.util.Map
;
/**
* @Description: 发送系统消息
* @Author: wangshuai
* @Date: 2022年3月22日 18:48:20
*/
* @Description: 发送系统消息
* @Author: wangshuai
* @Date: 2022年3月22日 18:48:20
*/
@Component
(
"systemSendMsgHandle"
)
public
class
SystemSendMsgHandle
implements
ISendMsgHandle
{
public
static
final
String
FROM_USER
=
"system"
;
public
static
final
String
FROM_USER
=
"system"
;
@Resource
private
SysAnnouncementMapper
sysAnnouncementMapper
;
...
...
@@ -47,22 +47,24 @@ public class SystemSendMsgHandle implements ISendMsgHandle {
/**
* 该方法会发送3种消息:系统消息、企业微信 钉钉
*
* @param esReceiver 发送人
* @param esTitle 标题
* @param esContent 内容
* @param esTitle
标题
* @param esContent
内容
*/
@Override
public
void
sendMsg
(
String
esReceiver
,
String
esTitle
,
String
esContent
)
{
if
(
oConvertUtils
.
isEmpty
(
esReceiver
))
{
throw
new
JeecgBootException
(
"被发送人不能为空"
);
if
(
oConvertUtils
.
isEmpty
(
esReceiver
))
{
throw
new
JeecgBootException
(
"被发送人不能为空"
);
}
ISysBaseAPI
sysBaseApi
=
SpringContextUtils
.
getBean
(
ISysBaseAPI
.
class
);
MessageDTO
messageDTO
=
new
MessageDTO
(
FROM_USER
,
esReceiver
,
esTitle
,
esContent
);
MessageDTO
messageDTO
=
new
MessageDTO
(
FROM_USER
,
esReceiver
,
esTitle
,
esContent
);
sysBaseApi
.
sendSysAnnouncement
(
messageDTO
);
}
/**
* 仅发送系统消息
*
* @param messageDTO
*/
@Override
...
...
@@ -71,24 +73,24 @@ public class SystemSendMsgHandle implements ISendMsgHandle {
String
title
=
messageDTO
.
getTitle
();
String
content
=
messageDTO
.
getContent
();
String
fromUser
=
messageDTO
.
getFromUser
();
Map
<
String
,
Object
>
data
=
messageDTO
.
getData
();
Map
<
String
,
Object
>
data
=
messageDTO
.
getData
();
String
[]
arr
=
messageDTO
.
getToUser
().
split
(
","
);
for
(
String
username:
arr
)
{
for
(
String
username
:
arr
)
{
doSend
(
title
,
content
,
fromUser
,
username
,
data
);
}
}
private
void
doSend
(
String
title
,
String
msgContent
,
String
fromUser
,
String
toUser
,
Map
<
String
,
Object
>
data
){
private
void
doSend
(
String
title
,
String
msgContent
,
String
fromUser
,
String
toUser
,
Map
<
String
,
Object
>
data
)
{
SysAnnouncement
announcement
=
new
SysAnnouncement
();
if
(
data
!=
null
)
{
if
(
data
!=
null
)
{
//摘要信息
Object
msgAbstract
=
data
.
get
(
CommonConstant
.
NOTICE_MSG_SUMMARY
);
if
(
msgAbstract
!=
null
)
{
if
(
msgAbstract
!=
null
)
{
announcement
.
setMsgAbstract
(
msgAbstract
.
toString
());
}
// 任务节点ID
Object
taskId
=
data
.
get
(
CommonConstant
.
NOTICE_MSG_BUS_ID
);
if
(
taskId
!=
null
)
{
if
(
taskId
!=
null
)
{
announcement
.
setBusId
(
taskId
.
toString
());
announcement
.
setBusType
(
Vue3MessageHrefEnum
.
BPM_TASK
.
getBusType
());
}
...
...
@@ -108,10 +110,10 @@ public class SystemSendMsgHandle implements ISendMsgHandle {
String
userId
=
toUser
;
String
[]
userIds
=
userId
.
split
(
","
);
String
anntId
=
announcement
.
getId
();
for
(
int
i
=
0
;
i
<
userIds
.
length
;
i
++)
{
if
(
oConvertUtils
.
isNotEmpty
(
userIds
[
i
]))
{
for
(
int
i
=
0
;
i
<
userIds
.
length
;
i
++)
{
if
(
oConvertUtils
.
isNotEmpty
(
userIds
[
i
]))
{
SysUser
sysUser
=
userMapper
.
getUserByName
(
userIds
[
i
]);
if
(
sysUser
==
null
)
{
if
(
sysUser
==
null
)
{
continue
;
}
SysAnnouncementSend
announcementSend
=
new
SysAnnouncementSend
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment