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
f8d1acb0
Commit
f8d1acb0
authored
Nov 11, 2022
by
徐高华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
群发
parent
ac1159a7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
QywxSendServiceImpl.java
...oban/manage/service/service/impl/QywxSendServiceImpl.java
+5
-6
No files found.
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/impl/QywxSendServiceImpl.java
View file @
f8d1acb0
...
...
@@ -74,7 +74,6 @@ public class QywxSendServiceImpl implements QywxSendService {
@Autowired
private
TabHaobanStaffClerkRelationMapper
tabHaobanStaffClerkRelationMapper
;
@Override
public
ServiceResponse
<
String
>
sendMessage
(
String
wxEnterpriseId
,
String
staffId
,
List
<
String
>
extendUserList
,
List
<
String
>
materialIdList
)
{
...
...
@@ -112,13 +111,13 @@ public class QywxSendServiceImpl implements QywxSendService {
JSONResponse
respon
=
qywxSuiteApiService
.
sendExternalMessage
(
qwDTO
.
getThirdCorpid
(),
config
.
getWxSuiteid
(),
messageDTO
);
log
.
info
(
"群发消息={},返回={}"
,
JSON
.
toJSONString
(
messageDTO
),
JSON
.
toJSONString
(
respon
));
String
error
=
respon
.
getErrorMessage
()
;
Map
<
String
,
Object
>
returnMap
=
respon
.
getReturnMap
();
String
msgIdKey
=
"msgid"
;
String
msgId
=
returnMap
.
get
(
msgIdKey
)
==
null
?
""
:
returnMap
.
get
(
msgIdKey
).
toString
();
if
(
StringUtils
.
isNotEmpty
(
msgId
))
{
return
ServiceResponse
.
success
(
msgId
);
}
String
error
=
respon
.
getErrorMessage
();
return
ServiceResponse
.
failure
(
"9999"
,
error
);
}
...
...
@@ -128,7 +127,7 @@ public class QywxSendServiceImpl implements QywxSendService {
String
imageUrl
=
dto
.
getImgUrl
();
int
type
=
dto
.
getMaterialType
();
String
md5
=
Md5Util
.
MD5
(
imageUrl
);
TabMaterialContent
tab
=
this
.
tabMaterialContentMapper
.
selectByUrl
(
wxEnterpriseId
,
md5
,
mediaType
);
TabMaterialContent
tab
=
this
.
tabMaterialContentMapper
.
selectByUrl
(
wxEnterpriseId
,
md5
,
mediaType
);
if
(
null
!=
tab
)
{
materialIdList
.
add
(
tab
.
getMaterialId
());
}
else
{
...
...
@@ -159,8 +158,8 @@ public class QywxSendServiceImpl implements QywxSendService {
text
.
setContent
(
dto
.
getContent
());
moment
.
setText
(
text
);
List
<
String
>
sendUser
=
new
ArrayList
<>();
if
(
CollectionUtils
.
isEmpty
(
clerkIdList
))
{
return
ServiceResponse
.
failure
(
"9999"
,
"无导购"
)
;
if
(
CollectionUtils
.
isEmpty
(
clerkIdList
))
{
return
ServiceResponse
.
failure
(
"9999"
,
"无导购"
);
}
List
<
StaffClerkRelationDTO
>
clerkList
=
this
.
tabHaobanStaffClerkRelationMapper
.
listByClerkIds
(
clerkIdList
,
wxEnterpriseId
);
...
...
@@ -199,7 +198,7 @@ public class QywxSendServiceImpl implements QywxSendService {
if
(
CollectionUtils
.
isNotEmpty
(
materialIdList
))
{
materialIdList
.
forEach
(
materialId
->
{
MaterialDTO
material
=
materialService
.
getHasChangeMadieMaterialById
(
materialId
,
from
);
log
.
info
(
"JSON={}"
,
JSON
.
toJSONString
(
material
));
log
.
info
(
"JSON={}"
,
JSON
.
toJSONString
(
material
));
if
(
material
==
null
)
{
return
;
}
...
...
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