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
df1b231e
Commit
df1b231e
authored
Apr 18, 2023
by
徐高华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
群-自建
parent
28d41b70
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
42 additions
and
7 deletions
+42
-7
GroupChatDataServiceImpl.java
...e/service/service/chat/impl/GroupChatDataServiceImpl.java
+7
-2
GroupChatPlanServiceImpl.java
...e/service/service/chat/impl/GroupChatPlanServiceImpl.java
+7
-1
GroupChatServiceImpl.java
...anage/service/service/chat/impl/GroupChatServiceImpl.java
+21
-3
QywxSendServiceImpl.java
...oban/manage/service/service/impl/QywxSendServiceImpl.java
+7
-1
No files found.
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/chat/impl/GroupChatDataServiceImpl.java
View file @
df1b231e
...
@@ -128,8 +128,13 @@ public class GroupChatDataServiceImpl implements GroupChatDataService {
...
@@ -128,8 +128,13 @@ public class GroupChatDataServiceImpl implements GroupChatDataService {
Date
date
=
DateUtil
.
addDay
(
DateUtil
.
getStartTimeOfDay
(),
-
1
);
Date
date
=
DateUtil
.
addDay
(
DateUtil
.
getStartTimeOfDay
(),
-
1
);
Long
time
=
date
.
getTime
()
/
1000
;
Long
time
=
date
.
getTime
()
/
1000
;
ServiceResponse
<
List
<
GroupChatQwDataDTO
>>
resp
=
this
.
qywxChatApiService
.
statistic
(
qwDTO
.
getThirdCorpid
(),
ServiceResponse
<
List
<
GroupChatQwDataDTO
>>
resp
=
null
;
config
.
getWxSuiteid
(),
userIdList
,
time
,
time
);
if
(
qwDTO
.
isSelf
())
{
resp
=
this
.
qywxChatApiService
.
statisticSelf
(
qwDTO
.
getThirdCorpid
(),
qwDTO
.
getSelfSecret
(),
userIdList
,
time
,
time
);
}
else
{
resp
=
this
.
qywxChatApiService
.
statistic
(
qwDTO
.
getThirdCorpid
(),
config
.
getWxSuiteid
(),
userIdList
,
time
,
time
);
}
List
<
GroupChatQwDataDTO
>
dataList
=
resp
.
getResult
();
List
<
GroupChatQwDataDTO
>
dataList
=
resp
.
getResult
();
if
(
CollectionUtils
.
isEmpty
(
dataList
))
{
if
(
CollectionUtils
.
isEmpty
(
dataList
))
{
if
(
list
.
size
()
<
pageSize
)
{
if
(
list
.
size
()
<
pageSize
)
{
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/chat/impl/GroupChatPlanServiceImpl.java
View file @
df1b231e
...
@@ -307,8 +307,14 @@ public class GroupChatPlanServiceImpl implements GroupChatPlanService {
...
@@ -307,8 +307,14 @@ public class GroupChatPlanServiceImpl implements GroupChatPlanService {
if
(
qwDTO
.
needOpenUserId3th
())
{
if
(
qwDTO
.
needOpenUserId3th
())
{
userid
=
staff
.
getWxOpenUseId
();
userid
=
staff
.
getWxOpenUseId
();
}
}
JSONResponse
respon
=
qywxSuiteApiService
.
resultExternalMessage
(
qwDTO
.
getThirdCorpid
(),
config
.
getWxSuiteid
(),
JSONResponse
respon
=
null
;
if
(
qwDTO
.
isSelf
())
{
respon
=
qywxSuiteApiService
.
resultExternalMessageSelf
(
qwDTO
.
getThirdCorpid
(),
qwDTO
.
getSelfSecret
(),
msgid
,
null
,
userid
);
msgid
,
null
,
userid
);
}
else
{
respon
=
qywxSuiteApiService
.
resultExternalMessage
(
qwDTO
.
getThirdCorpid
(),
config
.
getWxSuiteid
(),
msgid
,
null
,
userid
);
}
logger
.
info
(
"统计企微返回={}"
,
JSON
.
toJSONString
(
respon
));
logger
.
info
(
"统计企微返回={}"
,
JSON
.
toJSONString
(
respon
));
if
(
respon
.
getErrorCode
()
!=
0
)
{
if
(
respon
.
getErrorCode
()
!=
0
)
{
return
;
return
;
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/chat/impl/GroupChatServiceImpl.java
View file @
df1b231e
...
@@ -530,8 +530,14 @@ public class GroupChatServiceImpl implements GroupChatService {
...
@@ -530,8 +530,14 @@ public class GroupChatServiceImpl implements GroupChatService {
private
void
syncGroupChatList
(
WxEnterpriseQwDTO
qwDTO
,
List
<
String
>
userIdList
,
String
cursor
,
private
void
syncGroupChatList
(
WxEnterpriseQwDTO
qwDTO
,
List
<
String
>
userIdList
,
String
cursor
,
boolean
syncDetailFlag
)
{
boolean
syncDetailFlag
)
{
logger
.
info
(
"同步群列表={},idlist={},cursor={}"
,
JSON
.
toJSONString
(
qwDTO
),
JSON
.
toJSONString
(
userIdList
),
cursor
);
logger
.
info
(
"同步群列表={},idlist={},cursor={}"
,
JSON
.
toJSONString
(
qwDTO
),
JSON
.
toJSONString
(
userIdList
),
cursor
);
ServiceResponse
<
GroupChatListDTO
>
resp
=
this
.
qywxChatApiService
.
groupchatList3th
(
qwDTO
.
getThirdCorpid
(),
ServiceResponse
<
GroupChatListDTO
>
resp
=
null
;
if
(
qwDTO
.
isSelf
())
{
resp
=
this
.
qywxChatApiService
.
groupchatList
(
qwDTO
.
getThirdCorpid
(),
qwDTO
.
getSelfSecret
()
,
userIdList
,
limit
,
cursor
);
}
else
{
resp
=
this
.
qywxChatApiService
.
groupchatList3th
(
qwDTO
.
getThirdCorpid
(),
config
.
getWxSuiteid
(),
userIdList
,
limit
,
cursor
);
config
.
getWxSuiteid
(),
userIdList
,
limit
,
cursor
);
}
if
(!
resp
.
isSuccess
())
{
if
(!
resp
.
isSuccess
())
{
logger
.
info
(
"拉取群列表异常={}"
,
JSON
.
toJSON
(
resp
));
logger
.
info
(
"拉取群列表异常={}"
,
JSON
.
toJSON
(
resp
));
return
;
return
;
...
@@ -614,8 +620,14 @@ public class GroupChatServiceImpl implements GroupChatService {
...
@@ -614,8 +620,14 @@ public class GroupChatServiceImpl implements GroupChatService {
Long
groupChatId
=
chat
.
getGroupChatId
();
Long
groupChatId
=
chat
.
getGroupChatId
();
String
wxEnterpriseId
=
chat
.
getWxEnterpriseId
();
String
wxEnterpriseId
=
chat
.
getWxEnterpriseId
();
String
enterpriseId
=
chat
.
getEnterpriseId
();
String
enterpriseId
=
chat
.
getEnterpriseId
();
ServiceResponse
<
GroupChatDetailDTO
>
detailResp
=
this
.
qywxChatApiService
ServiceResponse
<
GroupChatDetailDTO
>
detailResp
=
null
;
if
(
qwDTO
.
isSelf
())
{
detailResp
=
this
.
qywxChatApiService
.
groupchatDetail
(
qwDTO
.
getThirdCorpid
(),
qwDTO
.
getSelfSecret
(),
chat
.
getWxChatId
(),
1
);
}
else
{
detailResp
=
this
.
qywxChatApiService
.
groupchatDetail3th
(
qwDTO
.
getThirdCorpid
(),
config
.
getWxSuiteid
(),
chat
.
getWxChatId
(),
1
);
.
groupchatDetail3th
(
qwDTO
.
getThirdCorpid
(),
config
.
getWxSuiteid
(),
chat
.
getWxChatId
(),
1
);
}
logger
.
info
(
"从企微获取群详情{}={}"
,
chat
.
getWxChatId
(),
JSON
.
toJSON
(
detailResp
));
logger
.
info
(
"从企微获取群详情{}={}"
,
chat
.
getWxChatId
(),
JSON
.
toJSON
(
detailResp
));
if
(!
detailResp
.
isSuccess
())
{
if
(!
detailResp
.
isSuccess
())
{
logger
.
info
(
"从企微获取群详情失败"
);
logger
.
info
(
"从企微获取群详情失败"
);
...
@@ -1092,8 +1104,14 @@ public class GroupChatServiceImpl implements GroupChatService {
...
@@ -1092,8 +1104,14 @@ public class GroupChatServiceImpl implements GroupChatService {
}
}
List
<
TabGroupChat
>
list
=
this
.
groupChatMapper
.
listByIdSet
(
new
HashSet
<>(
groupChatIdList
));
List
<
TabGroupChat
>
list
=
this
.
groupChatMapper
.
listByIdSet
(
new
HashSet
<>(
groupChatIdList
));
List
<
String
>
wxChatIdList
=
list
.
stream
().
map
(
dto
->
dto
.
getWxChatId
()).
collect
(
Collectors
.
toList
());
List
<
String
>
wxChatIdList
=
list
.
stream
().
map
(
dto
->
dto
.
getWxChatId
()).
collect
(
Collectors
.
toList
());
ServiceResponse
<
List
<
FailChatListDTO
>>
resp
=
this
.
qywxChatApiService
.
transfer
(
qwDTO
.
getThirdCorpid
(),
ServiceResponse
<
List
<
FailChatListDTO
>>
resp
=
null
;
if
(
qwDTO
.
isSelf
())
{
resp
=
this
.
qywxChatApiService
.
transferSelf
(
qwDTO
.
getThirdCorpid
(),
qwDTO
.
getSelfSecret
(),
wxChatIdList
,
userid
);
}
else
{
resp
=
this
.
qywxChatApiService
.
transfer
(
qwDTO
.
getThirdCorpid
(),
config
.
getWxSuiteid
(),
wxChatIdList
,
userid
);
config
.
getWxSuiteid
(),
wxChatIdList
,
userid
);
}
logger
.
info
(
"群继承,继承人={}"
,
JSON
.
toJSONString
(
resp
),
userid
);
logger
.
info
(
"群继承,继承人={}"
,
JSON
.
toJSONString
(
resp
),
userid
);
if
(!
resp
.
isSuccess
())
{
if
(!
resp
.
isSuccess
())
{
return
ServiceResponse
.
failure
(
"9999"
,
resp
.
getMessage
());
return
ServiceResponse
.
failure
(
"9999"
,
resp
.
getMessage
());
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/impl/QywxSendServiceImpl.java
View file @
df1b231e
...
@@ -107,8 +107,14 @@ public class QywxSendServiceImpl implements QywxSendService {
...
@@ -107,8 +107,14 @@ public class QywxSendServiceImpl implements QywxSendService {
messageDTO
.
setSenderUserId
(
tabHaobanStaff
.
getWxUserId
());
messageDTO
.
setSenderUserId
(
tabHaobanStaff
.
getWxUserId
());
}
}
// 调接口执行创建群发
// 调接口执行创建群发
JSONResponse
respon
=
qywxSuiteApiService
.
sendExternalMessage
(
qwDTO
.
getThirdCorpid
(),
config
.
getWxSuiteid
(),
JSONResponse
respon
=
null
;
if
(
qwDTO
.
isSelf
())
{
respon
=
qywxSuiteApiService
.
sendExternalMessageSelf
(
qwDTO
.
getThirdCorpid
(),
qwDTO
.
getSelfSecret
(),
messageDTO
);
messageDTO
);
}
else
{
respon
=
qywxSuiteApiService
.
sendExternalMessage
(
qwDTO
.
getThirdCorpid
(),
config
.
getWxSuiteid
(),
messageDTO
);
}
log
.
info
(
"群发返回={}"
,
JSON
.
toJSONString
(
respon
));
log
.
info
(
"群发返回={}"
,
JSON
.
toJSONString
(
respon
));
Map
<
String
,
Object
>
returnMap
=
respon
.
getReturnMap
();
Map
<
String
,
Object
>
returnMap
=
respon
.
getReturnMap
();
String
msgIdKey
=
"msgid"
;
String
msgIdKey
=
"msgid"
;
...
...
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