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
7fc1d09a
Commit
7fc1d09a
authored
Dec 17, 2022
by
徐高华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
群列表查询
parent
61279daa
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
66 additions
and
14 deletions
+66
-14
GroupChatSearchQDTO.java
.../haoban/manage/api/dto/qdto/chat/GroupChatSearchQDTO.java
+28
-0
GroupChatServiceImpl.java
...anage/service/service/chat/impl/GroupChatServiceImpl.java
+15
-12
GroupChatMapper.xml
...ervice/src/main/resources/mapper/chat/GroupChatMapper.xml
+23
-1
GroupChatController.java
...aoban/manage/web/controller/chat/GroupChatController.java
+0
-1
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/dto/qdto/chat/GroupChatSearchQDTO.java
View file @
7fc1d09a
...
@@ -29,7 +29,35 @@ public class GroupChatSearchQDTO implements Serializable {
...
@@ -29,7 +29,35 @@ public class GroupChatSearchQDTO implements Serializable {
private
boolean
chatPageFlag
=
false
;
private
boolean
chatPageFlag
=
false
;
// 0全部 1未满200 2已满200
// 0全部 1未满200 2已满200
private
Integer
hmAddStatus
;
private
Integer
hmAddStatus
;
private
String
departmentId
;
private
List
<
String
>
departmentIdList
;
// 筛选激活或者开启联系我的群主
private
Integer
canUseFlag
;
public
String
getDepartmentId
()
{
return
departmentId
;
}
public
List
<
String
>
getDepartmentIdList
()
{
return
departmentIdList
;
}
public
Integer
getCanUseFlag
()
{
return
canUseFlag
;
}
public
void
setDepartmentId
(
String
departmentId
)
{
this
.
departmentId
=
departmentId
;
}
public
void
setDepartmentIdList
(
List
<
String
>
departmentIdList
)
{
this
.
departmentIdList
=
departmentIdList
;
}
public
void
setCanUseFlag
(
Integer
canUseFlag
)
{
this
.
canUseFlag
=
canUseFlag
;
}
public
Integer
getHmAddStatus
()
{
public
Integer
getHmAddStatus
()
{
return
hmAddStatus
;
return
hmAddStatus
;
}
}
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/chat/impl/GroupChatServiceImpl.java
View file @
7fc1d09a
...
@@ -227,6 +227,7 @@ public class GroupChatServiceImpl implements GroupChatService {
...
@@ -227,6 +227,7 @@ public class GroupChatServiceImpl implements GroupChatService {
List
<
Long
>
groupChatIdList
=
list
.
stream
().
map
(
dto
->
dto
.
getGroupChatId
()).
collect
(
Collectors
.
toList
());
List
<
Long
>
groupChatIdList
=
list
.
stream
().
map
(
dto
->
dto
.
getGroupChatId
()).
collect
(
Collectors
.
toList
());
qdto
.
setGroupChatIdList
(
groupChatIdList
);
qdto
.
setGroupChatIdList
(
groupChatIdList
);
}
}
qdto
.
setDepartmentIdList
(
this
.
setDepartIdList
(
qdto
.
getWxEnterpriseId
(),
qdto
.
getDepartmentId
()));
PageHelper
.
startPage
(
basePageInfo
);
PageHelper
.
startPage
(
basePageInfo
);
List
<
GroupChatDTO
>
list
=
this
.
groupChatMapper
.
list
(
qdto
);
List
<
GroupChatDTO
>
list
=
this
.
groupChatMapper
.
list
(
qdto
);
Page
<
GroupChatDTO
>
retPage
=
PageHelperUtils
.
changePageHelperToCurrentPage
(
list
,
GroupChatDTO
.
class
);
Page
<
GroupChatDTO
>
retPage
=
PageHelperUtils
.
changePageHelperToCurrentPage
(
list
,
GroupChatDTO
.
class
);
...
@@ -414,11 +415,11 @@ public class GroupChatServiceImpl implements GroupChatService {
...
@@ -414,11 +415,11 @@ public class GroupChatServiceImpl implements GroupChatService {
private
String
emoji
(
String
content
)
{
private
String
emoji
(
String
content
)
{
if
(
StringUtils
.
isBlank
(
content
))
{
if
(
StringUtils
.
isBlank
(
content
))
{
return
content
;
return
content
;
}
}
return
EmojiParser
.
removeAllEmojis
(
content
);
return
EmojiParser
.
removeAllEmojis
(
content
);
}
}
private
void
updateGroupChatDetail
(
WxEnterpriseQwDTO
qwDTO
,
TabGroupChat
chat
,
boolean
syncMember
)
{
private
void
updateGroupChatDetail
(
WxEnterpriseQwDTO
qwDTO
,
TabGroupChat
chat
,
boolean
syncMember
)
{
// 控制同时刷新
// 控制同时刷新
Long
groupChatId
=
chat
.
getGroupChatId
();
Long
groupChatId
=
chat
.
getGroupChatId
();
...
@@ -598,11 +599,11 @@ public class GroupChatServiceImpl implements GroupChatService {
...
@@ -598,11 +599,11 @@ public class GroupChatServiceImpl implements GroupChatService {
}
}
}
}
}
}
this
.
updateDat
e
(
groupChatId
,
totalCount
,
totalMemberCount
,
addMemberCount
,
addCount
,
quitCount
,
this
.
updateDat
a
(
groupChatId
,
totalCount
,
totalMemberCount
,
addMemberCount
,
addCount
,
quitCount
,
quitMemberCount
);
quitMemberCount
);
}
}
private
void
updateDat
e
(
Long
groupChatId
,
int
totalCount
,
int
totalMemberCount
,
int
addMemberCount
,
int
addCount
,
private
void
updateDat
a
(
Long
groupChatId
,
int
totalCount
,
int
totalMemberCount
,
int
addMemberCount
,
int
addCount
,
int
quitCount
,
int
quitMemberCount
)
{
int
quitCount
,
int
quitMemberCount
)
{
logger
.
info
(
"更新群的统计,groupChatId={}"
,
groupChatId
);
logger
.
info
(
"更新群的统计,groupChatId={}"
,
groupChatId
);
this
.
groupChatMapper
.
updateData
(
groupChatId
,
totalCount
,
totalMemberCount
,
addMemberCount
,
addCount
,
quitCount
,
this
.
groupChatMapper
.
updateData
(
groupChatId
,
totalCount
,
totalMemberCount
,
addMemberCount
,
addCount
,
quitCount
,
...
@@ -750,8 +751,15 @@ public class GroupChatServiceImpl implements GroupChatService {
...
@@ -750,8 +751,15 @@ public class GroupChatServiceImpl implements GroupChatService {
@Override
@Override
public
Page
<
GroupChatOwnerDTO
>
listOwnerPage
(
OwnerSearchQDTO
qdto
,
BasePageInfo
basePageInfo
)
{
public
Page
<
GroupChatOwnerDTO
>
listOwnerPage
(
OwnerSearchQDTO
qdto
,
BasePageInfo
basePageInfo
)
{
qdto
.
setDepartmentIdList
(
this
.
setDepartIdList
(
qdto
.
getWxEnterpriseId
(),
qdto
.
getDepartmentId
()));
PageHelper
.
startPage
(
basePageInfo
);
List
<
GroupChatOwnerDTO
>
list
=
this
.
groupChatOwnerMapper
.
listOwner
(
qdto
);
Page
<
GroupChatOwnerDTO
>
retPage
=
PageHelperUtils
.
changePageHelperToCurrentPage
(
list
,
GroupChatOwnerDTO
.
class
);
return
retPage
;
}
private
List
<
String
>
setDepartIdList
(
String
wxEnterpriseId
,
String
departmentId
)
{
List
<
String
>
departmentIdList
=
new
ArrayList
<>();
List
<
String
>
departmentIdList
=
new
ArrayList
<>();
String
departmentId
=
qdto
.
getDepartmentId
();
if
(
StringUtils
.
isNotBlank
(
departmentId
))
{
if
(
StringUtils
.
isNotBlank
(
departmentId
))
{
TabHaobanDepartment
department
=
this
.
departmentService
.
selectById
(
departmentId
);
TabHaobanDepartment
department
=
this
.
departmentService
.
selectById
(
departmentId
);
departmentIdList
.
add
(
departmentId
);
departmentIdList
.
add
(
departmentId
);
...
@@ -759,19 +767,14 @@ public class GroupChatServiceImpl implements GroupChatService {
...
@@ -759,19 +767,14 @@ public class GroupChatServiceImpl implements GroupChatService {
String
parentDepartmentId
=
department
.
getParentDepartmentId
();
String
parentDepartmentId
=
department
.
getParentDepartmentId
();
if
(!
"0"
.
equals
(
parentDepartmentId
))
{
if
(!
"0"
.
equals
(
parentDepartmentId
))
{
String
chainId
=
department
.
getChainId
()
+
Constant
.
ID_SEPARATOR
+
departmentId
;
String
chainId
=
department
.
getChainId
()
+
Constant
.
ID_SEPARATOR
+
departmentId
;
List
<
TabHaobanDepartment
>
tabList
=
departmentService
.
listByChainId
(
chainId
,
List
<
TabHaobanDepartment
>
tabList
=
departmentService
.
listByChainId
(
chainId
,
wxEnterpriseId
);
qdto
.
getWxEnterpriseId
());
List
<
String
>
departmentIds
=
tabList
.
stream
().
map
(
TabHaobanDepartment:
:
getDepartmentId
)
List
<
String
>
departmentIds
=
tabList
.
stream
().
map
(
TabHaobanDepartment:
:
getDepartmentId
)
.
collect
(
Collectors
.
toList
());
.
collect
(
Collectors
.
toList
());
departmentIdList
.
addAll
(
departmentIds
);
departmentIdList
.
addAll
(
departmentIds
);
}
}
}
}
qdto
.
setDepartmentIdList
(
departmentIdList
);
}
}
PageHelper
.
startPage
(
basePageInfo
);
return
departmentIdList
;
List
<
GroupChatOwnerDTO
>
list
=
this
.
groupChatOwnerMapper
.
listOwner
(
qdto
);
Page
<
GroupChatOwnerDTO
>
retPage
=
PageHelperUtils
.
changePageHelperToCurrentPage
(
list
,
GroupChatOwnerDTO
.
class
);
return
retPage
;
}
}
@Override
@Override
...
...
haoban-manage3-service/src/main/resources/mapper/chat/GroupChatMapper.xml
View file @
7fc1d09a
...
@@ -251,6 +251,9 @@
...
@@ -251,6 +251,9 @@
a.gic_flag gicFlag , a.init_flag initFlag , a.wx_chat_id_dk wxChatIdDk , a.off_time offTime ,
a.gic_flag gicFlag , a.init_flag initFlag , a.wx_chat_id_dk wxChatIdDk , a.off_time offTime ,
a.original_staff_id originalStaffId , a.hm_add_status hmAddStatus
a.original_staff_id originalStaffId , a.hm_add_status hmAddStatus
from tab_haoban_group_chat a left join tab_haoban_staff b on a.staff_id = b.staff_id
from tab_haoban_group_chat a left join tab_haoban_staff b on a.staff_id = b.staff_id
<if
test=
"departmentIdList != null and departmentIdList.size() > 0"
>
left join tab_haoban_staff_department_related depart on a.staff_id = depart.staff_id and depart.status_flag = 1
</if>
where a.wx_enterprise_id=#{wxEnterpriseId}
where a.wx_enterprise_id=#{wxEnterpriseId}
<if
test=
"chatPageFlag==true"
>
<if
test=
"chatPageFlag==true"
>
and (a.enterprise_id = #{enterpriseId} or a.enterprise_id is null)
and (a.enterprise_id = #{enterpriseId} or a.enterprise_id is null)
...
@@ -277,7 +280,7 @@
...
@@ -277,7 +280,7 @@
and a.hm_add_status = #{hmAddStatus}
and a.hm_add_status = #{hmAddStatus}
</if>
</if>
<if
test=
"null != searchParams and ''!=searchParams "
>
<if
test=
"null != searchParams and ''!=searchParams "
>
and (a.name like '%${searchParams}%' or a.wx_chat_id like '${searchParams}%')
and (a.name like '%${searchParams}%' or a.wx_chat_id like '${searchParams}%'
or b.staff_name like '%${searchParams}%'
)
</if>
</if>
<if
test=
"null != staffIdList and staffIdList.size>0"
>
<if
test=
"null != staffIdList and staffIdList.size>0"
>
and a.staff_id in
and a.staff_id in
...
@@ -303,13 +306,32 @@
...
@@ -303,13 +306,32 @@
#{groupChatId}
#{groupChatId}
</foreach>
</foreach>
</if>
</if>
<if
test=
"null != hmAddStatus and 0!=hmAddStatus"
>
and a.hm_add_status = #{hmAddStatus}
</if>
<if
test=
"null !=canUseFlag and 1==canUseFlag"
>
and b.open_concat_flag = 1 and b.active_flag = 1
</if>
<if
test=
"departmentIdList != null and departmentIdList.size() > 0"
>
and depart.department_id IN
<foreach
collection=
"departmentIdList"
item=
"id"
index=
"index"
open=
"("
close=
")"
separator=
","
>
#{id,jdbcType=VARCHAR}
</foreach>
</if>
and a.delete_flag = 0
and a.delete_flag = 0
<if
test=
"departmentIdList != null and departmentIdList.size() > 0"
>
group by a.staff_id
</if>
<if
test=
"null == sortColumn"
>
<if
test=
"null == sortColumn"
>
order by a.chat_add_time desc
order by a.chat_add_time desc
</if>
</if>
<if
test=
"null != sortColumn"
>
<if
test=
"null != sortColumn"
>
order by a.${sortColumn} ${sortType}
order by a.${sortColumn} ${sortType}
</if>
</if>
</select>
</select>
<update
id=
"updateChatEnterpriseId"
>
<update
id=
"updateChatEnterpriseId"
>
...
...
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/chat/GroupChatController.java
View file @
7fc1d09a
...
@@ -98,7 +98,6 @@ public class GroupChatController {
...
@@ -98,7 +98,6 @@ public class GroupChatController {
qdto
.
setEnterpriseId
(
loginUser
.
getEnterpriseId
());
qdto
.
setEnterpriseId
(
loginUser
.
getEnterpriseId
());
qdto
.
setChatPageFlag
(
true
);
qdto
.
setChatPageFlag
(
true
);
ServiceResponse
<
Page
<
GroupChatDTO
>>
page
=
this
.
groupChatApiService
.
listPage
(
qdto
,
basePageInfo
);
ServiceResponse
<
Page
<
GroupChatDTO
>>
page
=
this
.
groupChatApiService
.
listPage
(
qdto
,
basePageInfo
);
return
RestResponse
.
successResult
(
page
.
getResult
());
return
RestResponse
.
successResult
(
page
.
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