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
dc559dac
Commit
dc559dac
authored
Dec 04, 2024
by
徐高华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
社群群发
parent
5c165903
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
13 deletions
+7
-13
GroupChatPlanServiceImpl.java
...e/service/service/chat/impl/GroupChatPlanServiceImpl.java
+7
-13
No files found.
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/chat/impl/GroupChatPlanServiceImpl.java
View file @
dc559dac
...
@@ -713,8 +713,8 @@ public class GroupChatPlanServiceImpl implements GroupChatPlanService {
...
@@ -713,8 +713,8 @@ public class GroupChatPlanServiceImpl implements GroupChatPlanService {
private
String
getQwMsgId
(
String
staffId
,
Date
sendTime
,
GroupMessageServiceImpl
.
GroupMsgChatType
groupMsgChatType
)
{
private
String
getQwMsgId
(
String
staffId
,
Date
sendTime
,
GroupMessageServiceImpl
.
GroupMsgChatType
groupMsgChatType
)
{
Date
startTime
=
DateUtil
.
addNumForMinute
(
sendTime
,-
5
)
;
Date
startTime
=
DateUtil
.
addNumForMinute
(
sendTime
,-
1
)
;
Date
endTime
=
DateUtil
.
addNumForMinute
(
sendTime
,
5
)
;
Date
endTime
=
DateUtil
.
addNumForMinute
(
sendTime
,
1
)
;
TabHaobanStaff
staff
=
this
.
staffMapper
.
selectByPrimaryKey
(
staffId
)
;
TabHaobanStaff
staff
=
this
.
staffMapper
.
selectByPrimaryKey
(
staffId
)
;
String
wxEnterpriseId
=
staff
.
getWxEnterpriseId
()
;
String
wxEnterpriseId
=
staff
.
getWxEnterpriseId
()
;
WxEnterpriseQwDTO
qwDTO
=
this
.
wxEnterpriseService
.
getQwInfo
(
wxEnterpriseId
)
;
WxEnterpriseQwDTO
qwDTO
=
this
.
wxEnterpriseService
.
getQwInfo
(
wxEnterpriseId
)
;
...
@@ -725,7 +725,6 @@ public class GroupChatPlanServiceImpl implements GroupChatPlanService {
...
@@ -725,7 +725,6 @@ public class GroupChatPlanServiceImpl implements GroupChatPlanService {
// 发送到群
// 发送到群
List
<
QywxGroupMessageInfoDTO
>
msgList
=
this
.
queryGroupMsg
(
GroupMessageServiceImpl
.
GroupMsgChatType
.
single
,
List
<
QywxGroupMessageInfoDTO
>
msgList
=
this
.
queryGroupMsg
(
GroupMessageServiceImpl
.
GroupMsgChatType
.
single
,
startTime
,
endTime
,
qwDTO
,
wxUserId
);
startTime
,
endTime
,
qwDTO
,
wxUserId
);
System
.
out
.
println
(
"查询到={}"
+
JSONObject
.
toJSONString
(
msgList
));
if
(
CollectionUtils
.
isNotEmpty
(
msgList
))
{
if
(
CollectionUtils
.
isNotEmpty
(
msgList
))
{
return
msgList
.
get
(
0
).
getMsgId
()
;
return
msgList
.
get
(
0
).
getMsgId
()
;
}
}
...
@@ -733,7 +732,6 @@ public class GroupChatPlanServiceImpl implements GroupChatPlanService {
...
@@ -733,7 +732,6 @@ public class GroupChatPlanServiceImpl implements GroupChatPlanService {
}
}
private
List
<
QywxGroupMessageInfoDTO
>
queryGroupMsg
(
GroupMessageServiceImpl
.
GroupMsgChatType
groupMsgChatType
,
Date
startTime
,
Date
endTime
,
WxEnterpriseQwDTO
qwDTO
,
String
qwUserId
)
{
private
List
<
QywxGroupMessageInfoDTO
>
queryGroupMsg
(
GroupMessageServiceImpl
.
GroupMsgChatType
groupMsgChatType
,
Date
startTime
,
Date
endTime
,
WxEnterpriseQwDTO
qwDTO
,
String
qwUserId
)
{
List
<
QywxGroupMessageInfoDTO
>
groupMessageInfos
=
new
ArrayList
<>();
QywxGroupMessageQDTO
qdto
=
new
QywxGroupMessageQDTO
();
QywxGroupMessageQDTO
qdto
=
new
QywxGroupMessageQDTO
();
qdto
.
setCorpid
(
qwDTO
.
getThirdCorpid
());
qdto
.
setCorpid
(
qwDTO
.
getThirdCorpid
());
qdto
.
setCreator
(
qwUserId
);
qdto
.
setCreator
(
qwUserId
);
...
@@ -742,16 +740,11 @@ public class GroupChatPlanServiceImpl implements GroupChatPlanService {
...
@@ -742,16 +740,11 @@ public class GroupChatPlanServiceImpl implements GroupChatPlanService {
qdto
.
setSuiteid
(
qwDTO
.
getSelf3thSecret
());
qdto
.
setSuiteid
(
qwDTO
.
getSelf3thSecret
());
qdto
.
setChatType
(
groupMsgChatType
.
getCode
());
qdto
.
setChatType
(
groupMsgChatType
.
getCode
());
qdto
.
setPageSize
(
100
);
qdto
.
setPageSize
(
100
);
ServiceResponse
<
QywxGroupMsgResp
>
serviceResponse
=
ServiceResponse
<
QywxGroupMsgResp
>
resp
=
this
.
qywxSuiteApiService
.
queryQywxGroupMessageList
(
qdto
,
qwDTO
.
isSelf
(),
qwDTO
.
getUrlHost
());
qywxSuiteApiService
.
queryQywxGroupMessageList
(
qdto
,
qwDTO
.
isSelf
(),
qwDTO
.
getUrlHost
());
logger
.
info
(
"查询msgid,企微返回={},{}"
,
JSONObject
.
toJSONString
(
qdto
),
JSONObject
.
toJSONString
(
resp
));
logger
.
info
(
"{},{}"
,
JSONObject
.
toJSONString
(
qdto
),
JSONObject
.
toJSONString
(
serviceResponse
));
if
(!
resp
.
isSuccess
()
||
CollectionUtils
.
isEmpty
(
resp
.
getResult
().
getGroupMessageInfos
()))
{
if
(!
serviceResponse
.
isSuccess
()
||
CollectionUtils
.
isEmpty
(
serviceResponse
.
getResult
().
getGroupMessageInfos
()))
{
logger
.
info
(
"获取群发任务记录异常 {}"
,
JSON
.
toJSONString
(
serviceResponse
));
return
Collections
.
emptyList
();
return
Collections
.
emptyList
();
}
}
QywxGroupMsgResp
groupMsgResp
=
serviceResponse
.
getResult
();
return
resp
.
getResult
().
getGroupMessageInfos
();
List
<
QywxGroupMessageInfoDTO
>
tempMessageInfos
=
groupMsgResp
.
getGroupMessageInfos
();
groupMessageInfos
.
addAll
(
tempMessageInfos
);
return
groupMessageInfos
;
}
}
}
}
\ No newline at end of file
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