Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
haoban-manage3.0
Overview
Overview
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
haoban3.0
haoban-manage3.0
Commits
77b7430d
Commit
77b7430d
authored
Mar 15, 2023
by
王祖波
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
好办消息通知
parent
ed8de6e4
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
8 deletions
+15
-8
WxEnterpriseQwDTO.java
...java/com/gic/haoban/manage/api/dto/WxEnterpriseQwDTO.java
+10
-0
WxEnterpriseServiceImpl.java
.../manage/service/service/impl/WxEnterpriseServiceImpl.java
+1
-0
NoticeMessageApiServiceImpl.java
...rvice/service/notify/out/NoticeMessageApiServiceImpl.java
+4
-8
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/dto/WxEnterpriseQwDTO.java
View file @
77b7430d
...
@@ -14,6 +14,8 @@ public class WxEnterpriseQwDTO implements Serializable {
...
@@ -14,6 +14,8 @@ public class WxEnterpriseQwDTO implements Serializable {
private
String
memberCorpid
;
private
String
memberCorpid
;
// 第三方
// 第三方
private
String
thirdCorpid
;
private
String
thirdCorpid
;
// 好办小程序应用id
private
String
agentId
;
// 第三方使用的加密的userid
// 第三方使用的加密的userid
public
boolean
needOpenUserId3th
()
{
public
boolean
needOpenUserId3th
()
{
...
@@ -63,4 +65,12 @@ public class WxEnterpriseQwDTO implements Serializable {
...
@@ -63,4 +65,12 @@ public class WxEnterpriseQwDTO implements Serializable {
public
void
setThirdCorpid
(
String
thirdCorpid
)
{
public
void
setThirdCorpid
(
String
thirdCorpid
)
{
this
.
thirdCorpid
=
thirdCorpid
;
this
.
thirdCorpid
=
thirdCorpid
;
}
}
public
String
getAgentId
()
{
return
agentId
;
}
public
void
setAgentId
(
String
agentId
)
{
this
.
agentId
=
agentId
;
}
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/impl/WxEnterpriseServiceImpl.java
View file @
77b7430d
...
@@ -79,6 +79,7 @@ public class WxEnterpriseServiceImpl implements WxEnterpriseService {
...
@@ -79,6 +79,7 @@ public class WxEnterpriseServiceImpl implements WxEnterpriseService {
Integer
appType
=
app
.
getApplicationType
()
;
Integer
appType
=
app
.
getApplicationType
()
;
if
(
appType
==
2
)
{
if
(
appType
==
2
)
{
qw
.
setThirdCorpid
(
app
.
getCorpid
());
qw
.
setThirdCorpid
(
app
.
getCorpid
());
qw
.
setAgentId
(
app
.
getAgentId
());
}
else
if
(
appType
.
equals
(
3
))
{
}
else
if
(
appType
.
equals
(
3
))
{
qw
.
setDkCorpid
(
app
.
getCorpid
());
qw
.
setDkCorpid
(
app
.
getCorpid
());
}
else
if
(
appType
.
equals
(
4
))
{
}
else
if
(
appType
.
equals
(
4
))
{
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/notify/out/NoticeMessageApiServiceImpl.java
View file @
77b7430d
...
@@ -22,6 +22,7 @@ import com.gic.haoban.manage.api.service.StaffApiService;
...
@@ -22,6 +22,7 @@ import com.gic.haoban.manage.api.service.StaffApiService;
import
com.gic.haoban.manage.api.service.StaffClerkRelationApiService
;
import
com.gic.haoban.manage.api.service.StaffClerkRelationApiService
;
import
com.gic.haoban.manage.api.service.WxEnterpriseRelatedApiService
;
import
com.gic.haoban.manage.api.service.WxEnterpriseRelatedApiService
;
import
com.gic.haoban.manage.service.service.WxEnterpriseRelatedService
;
import
com.gic.haoban.manage.service.service.WxEnterpriseRelatedService
;
import
com.gic.wechat.api.dto.qywx.QywxTemplateCardSendMessageDTO
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.collections.MapUtils
;
import
org.apache.commons.collections.MapUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
...
@@ -240,15 +241,9 @@ public class NoticeMessageApiServiceImpl implements NoticeMessageApiService {
...
@@ -240,15 +241,9 @@ public class NoticeMessageApiServiceImpl implements NoticeMessageApiService {
}
}
noticeMessageService
.
addNoticeMessageBatch
(
noticeMessageBOList
);
noticeMessageService
.
addNoticeMessageBatch
(
noticeMessageBOList
);
Qywx
XcxSendMessageDTO
messageDTO
=
new
QywxXcx
SendMessageDTO
();
Qywx
TemplateCardSendMessageDTO
messageDTO
=
new
QywxTemplateCard
SendMessageDTO
();
String
data
=
notifyMessageBatchQDTO
.
getExtendContent
()
!=
null
?
JSONObject
.
toJSONString
(
notifyMessageBatchQDTO
.
getExtendContent
())
:
null
;
String
data
=
notifyMessageBatchQDTO
.
getExtendContent
()
!=
null
?
JSONObject
.
toJSONString
(
notifyMessageBatchQDTO
.
getExtendContent
())
:
null
;
String
title
=
StringUtils
.
isNotBlank
(
notifyMessageBatchQDTO
.
getTitle
())
?
notifyMessageBatchQDTO
.
getTitle
()
:
messageTypeEnum
.
getName
();
String
title
=
StringUtils
.
isNotBlank
(
notifyMessageBatchQDTO
.
getTitle
())
?
notifyMessageBatchQDTO
.
getTitle
()
:
messageTypeEnum
.
getName
();
List
<
ItemDTO
>
items
=
contentList
.
stream
().
map
(
bo
->
{
ItemDTO
item
=
new
ItemDTO
();
item
.
setKey
(
bo
.
getKey
());
item
.
setValue
(
bo
.
getVal
());
return
item
;
}).
collect
(
Collectors
.
toList
());
if
(
StringUtils
.
isNotBlank
(
data
))
{
if
(
StringUtils
.
isNotBlank
(
data
))
{
try
{
try
{
data
=
URLEncoder
.
encode
(
data
,
StandardCharsets
.
UTF_8
.
name
());
data
=
URLEncoder
.
encode
(
data
,
StandardCharsets
.
UTF_8
.
name
());
...
@@ -262,10 +257,11 @@ public class NoticeMessageApiServiceImpl implements NoticeMessageApiService {
...
@@ -262,10 +257,11 @@ public class NoticeMessageApiServiceImpl implements NoticeMessageApiService {
}
}
appUrl
+=
"&data="
+
data
;
appUrl
+=
"&data="
+
data
;
messageDTO
.
setAppid
(
config
.
getAppid
());
messageDTO
.
setAppid
(
config
.
getAppid
());
messageDTO
.
setAgentId
(
Integer
.
parseInt
(
qwDTO
.
getAgentId
()));
messageDTO
.
setUserIds
(
wxUserIdList
);
messageDTO
.
setUserIds
(
wxUserIdList
);
messageDTO
.
setPage
(
appUrl
);
messageDTO
.
setPage
(
appUrl
);
messageDTO
.
setTitle
(
StringUtils
.
isNotBlank
(
title
)?
title:
messageTypeEnum
.
getName
());
messageDTO
.
setTitle
(
StringUtils
.
isNotBlank
(
title
)?
title:
messageTypeEnum
.
getName
());
messageDTO
.
set
Items
(
items
);
messageDTO
.
set
Content
(
contentList
.
get
(
0
).
getVal
()
);
boolean
sendMessage
=
qywxSuiteApiService
.
sendMessage
(
qwDTO
.
getThirdCorpid
(),
config
.
getWxSuiteid
(),
messageDTO
);
boolean
sendMessage
=
qywxSuiteApiService
.
sendMessage
(
qwDTO
.
getThirdCorpid
(),
config
.
getWxSuiteid
(),
messageDTO
);
NotifyMessageMQDTO
mqdto
=
new
NotifyMessageMQDTO
();
NotifyMessageMQDTO
mqdto
=
new
NotifyMessageMQDTO
();
List
<
String
>
clerkIdList
=
list
.
stream
().
map
(
StaffClerkRelationDTO:
:
getClerkId
).
collect
(
Collectors
.
toList
());
List
<
String
>
clerkIdList
=
list
.
stream
().
map
(
StaffClerkRelationDTO:
:
getClerkId
).
collect
(
Collectors
.
toList
());
...
...
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