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
3422fe6e
Commit
3422fe6e
authored
Dec 09, 2022
by
徐高华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
群数据
parent
da900c73
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
9 deletions
+32
-9
GroupChatMapper.java
...aoban/manage/service/dao/mapper/chat/GroupChatMapper.java
+3
-3
GroupChatDataServiceImpl.java
...e/service/service/chat/impl/GroupChatDataServiceImpl.java
+29
-6
No files found.
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/dao/mapper/chat/GroupChatMapper.java
View file @
3422fe6e
...
...
@@ -33,13 +33,13 @@ public interface GroupChatMapper {
@Param
(
"totalMemberCount"
)
int
totalMemberCount
,
@Param
(
"addMemberCount"
)
int
addMemberCount
,
@Param
(
"addCount"
)
int
addCount
,
@Param
(
"quitCount"
)
int
quitCount
,
@Param
(
"quitMemberCount"
)
int
quitMemberCount
);
public
int
addMemberCount
(
@Param
(
"groupChatId"
)
Long
groupChatId
)
;
public
int
addMemberCount
(
@Param
(
"groupChatId"
)
Long
groupChatId
)
;
// 更新群状态
public
int
updateChatStatus
(
@Param
(
"groupChatId"
)
Long
groupChatId
,
@Param
(
"chatStatus"
)
int
chatStatus
);
//
更下线
//
下线(标识不能通过活码入群)
public
int
chatOff
(
@Param
(
"groupChatId"
)
Long
groupChatId
);
public
TabGroupChat
selectById
(
Long
groupChatId
);
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/chat/impl/GroupChatDataServiceImpl.java
View file @
3422fe6e
...
...
@@ -25,8 +25,10 @@ import com.gic.haoban.manage.api.dto.chat.GroupChatOwnerDTO;
import
com.gic.haoban.manage.api.dto.qdto.chat.ChatDataSearchQDTO
;
import
com.gic.haoban.manage.api.dto.qdto.chat.OwnerSearchQDTO
;
import
com.gic.haoban.manage.service.config.Config
;
import
com.gic.haoban.manage.service.dao.mapper.WxEnterpriseMapper
;
import
com.gic.haoban.manage.service.dao.mapper.chat.GroupChatDataMapper
;
import
com.gic.haoban.manage.service.dao.mapper.chat.GroupChatOwnerMapper
;
import
com.gic.haoban.manage.service.entity.TabHaobanWxEnterprise
;
import
com.gic.haoban.manage.service.entity.chat.TabGroupChatData
;
import
com.gic.haoban.manage.service.service.WxEnterpriseService
;
import
com.gic.haoban.manage.service.service.chat.GroupChatDataService
;
...
...
@@ -49,32 +51,51 @@ public class GroupChatDataServiceImpl implements GroupChatDataService {
private
GroupChatOwnerMapper
groupChatOwnerMapper
;
@Autowired
private
GroupChatDataMapper
groupChatDataMapper
;
@Autowired
private
WxEnterpriseMapper
wxEnterpriseMapper
;
@Override
public
List
<
GroupChatDataDTO
>
list
(
ChatDataSearchQDTO
qdto
)
{
return
null
;
}
@Override
public
Page
<
GroupChatDataDTO
>
listPage
(
ChatDataSearchQDTO
qdto
,
BasePageInfo
basePageInfo
)
{
return
null
;
}
@Override
public
void
chatDataTimer
(
String
params
)
{
t
(
"f5f8c78e395e4ca1a493707316096097"
);
logger
.
info
(
"群统计定时开始"
);
List
<
TabHaobanWxEnterprise
>
wxEnterpriseList
=
this
.
wxEnterpriseMapper
.
listByIds
(
null
);
for
(
TabHaobanWxEnterprise
item
:
wxEnterpriseList
)
{
try
{
this
.
getDataFormQw
(
item
.
getWxEnterpriseId
());
}
catch
(
Exception
e
)
{
logger
.
info
(
"统计异常,wxeid={}"
,
item
.
getWxEnterpriseId
());
e
.
printStackTrace
();
}
}
}
private
void
t
(
String
wxEnterpriseId
)
{
private
void
getDataFormQw
(
String
wxEnterpriseId
)
{
logger
.
info
(
"开始处理wxEnterpriseId={}"
,
wxEnterpriseId
);
WxEnterpriseQwDTO
qwDTO
=
this
.
wxEnterpriseService
.
getQwInfo
(
wxEnterpriseId
);
if
(
null
==
qwDTO
)
{
logger
.
info
(
"wxEnterpriseId不存在,id={}"
,
wxEnterpriseId
);
return
;
}
if
(
qwDTO
.
getWxSecurityType
()
==
0
)
{
logger
.
info
(
"wxSecurityType=0,不处理,id={}"
,
wxEnterpriseId
);
return
;
}
OwnerSearchQDTO
qdto
=
new
OwnerSearchQDTO
();
qdto
.
setWxEnterpriseId
(
wxEnterpriseId
);
List
<
GroupChatOwnerDTO
>
list
=
this
.
groupChatOwnerMapper
.
listOwner
(
qdto
);
if
(
CollectionUtils
.
isEmpty
(
list
))
{
logger
.
info
(
"无群主记录,不处理"
);
return
;
}
List
<
String
>
userIdList
=
null
;
Map
<
String
,
String
>
staffIdMap
=
new
HashMap
<>();
if
(
qwDTO
.
needOpenUserId3th
())
{
...
...
@@ -86,9 +107,11 @@ public class GroupChatDataServiceImpl implements GroupChatDataService {
staffIdMap
=
list
.
stream
().
collect
(
Collectors
.
toMap
(
GroupChatOwnerDTO:
:
getWxUserId
,
GroupChatOwnerDTO:
:
getStaffId
,
(
k1
,
k2
)
->
k1
));
}
Date
date
=
DateUtil
.
addDay
(
DateUtil
.
getStartTimeOfDay
(),
-
1
);
Long
time
=
date
.
getTime
()
/
1000
;
ServiceResponse
<
List
<
GroupChatQwDataDTO
>>
resp
=
this
.
qywxChatApiService
.
statistic
(
qwDTO
.
getThirdCorpid
(),
config
.
getWxSuiteid
(),
userIdList
,
date
.
getTime
()
/
1000
,
date
.
getTime
()
/
1000
);
config
.
getWxSuiteid
(),
userIdList
,
time
,
time
);
logger
.
info
(
JSON
.
toJSONString
(
resp
));
List
<
GroupChatQwDataDTO
>
dataList
=
resp
.
getResult
();
...
...
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