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
aab35788
Commit
aab35788
authored
Aug 14, 2023
by
徐高华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
退群
parent
cbef1937
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
114 additions
and
0 deletions
+114
-0
GroupChatController.java
...aoban/manage/web/controller/chat/GroupChatController.java
+37
-0
GroupChatUserQuitVO.java
...om/gic/haoban/manage/web/vo/chat/GroupChatUserQuitVO.java
+77
-0
No files found.
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/chat/GroupChatController.java
View file @
aab35788
...
@@ -5,6 +5,8 @@ import cn.hutool.core.convert.Convert;
...
@@ -5,6 +5,8 @@ import cn.hutool.core.convert.Convert;
import
com.gic.api.base.commons.BasePageInfo
;
import
com.gic.api.base.commons.BasePageInfo
;
import
com.gic.api.base.commons.Page
;
import
com.gic.api.base.commons.Page
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.commons.util.DateUtil
;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.commons.util.ExcelUtils
;
import
com.gic.commons.util.ExcelUtils
;
import
com.gic.commons.webapi.reponse.RestResponse
;
import
com.gic.commons.webapi.reponse.RestResponse
;
import
com.gic.enterprise.api.service.EnterpriseService
;
import
com.gic.enterprise.api.service.EnterpriseService
;
...
@@ -22,10 +24,12 @@ import com.gic.haoban.manage.api.service.StaffApiService;
...
@@ -22,10 +24,12 @@ import com.gic.haoban.manage.api.service.StaffApiService;
import
com.gic.haoban.manage.api.service.chat.GroupChatApiService
;
import
com.gic.haoban.manage.api.service.chat.GroupChatApiService
;
import
com.gic.haoban.manage.web.errCode.HaoBanErrCode
;
import
com.gic.haoban.manage.web.errCode.HaoBanErrCode
;
import
com.gic.haoban.manage.web.log.LogRecordUserServiceImpl
;
import
com.gic.haoban.manage.web.log.LogRecordUserServiceImpl
;
import
com.gic.haoban.manage.web.vo.chat.GroupChatUserQuitVO
;
import
com.gic.log.record.anno.GicLogRecord
;
import
com.gic.log.record.anno.GicLogRecord
;
import
com.gic.log.record.util.GicLogRecordCategoryEnum
;
import
com.gic.log.record.util.GicLogRecordCategoryEnum
;
import
com.gic.log.record.util.GicLogRecordEvaluationContext
;
import
com.gic.log.record.util.GicLogRecordEvaluationContext
;
import
com.gic.log.record.util.GicLogRecordOptTypeEnum
;
import
com.gic.log.record.util.GicLogRecordOptTypeEnum
;
import
org.apache.commons.collections.ArrayStack
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.LogManager
;
...
@@ -147,6 +151,39 @@ public class GroupChatController {
...
@@ -147,6 +151,39 @@ public class GroupChatController {
return
RestResponse
.
successResult
(
page
.
getResult
());
return
RestResponse
.
successResult
(
page
.
getResult
());
}
}
@RequestMapping
(
"user/quit/excel"
)
public
RestResponse
<
Boolean
>
excel
(
HttpServletRequest
request
,
HttpServletResponse
response
,
GroupChatUserSearchQDTO
qdto
,
BasePageInfo
basePageInfo
)
{
ServiceResponse
<
Page
<
GroupChatUserDTO
>>
page
=
this
.
groupChatApiService
.
listUserPage
(
qdto
,
basePageInfo
);
if
(
page
.
isSuccess
()
&&
CollUtil
.
isNotEmpty
(
page
.
getResult
().
getResult
())){
List
<
GroupChatUserQuitVO
>
voList
=
new
ArrayList
<>()
;
for
(
GroupChatUserDTO
dto
:
page
.
getResult
().
getResult
())
{
GroupChatUserQuitVO
vo
=
EntityUtil
.
changeEntityByJSON
(
GroupChatUserQuitVO
.
class
,
dto
)
;
vo
.
setUserQuitTimeExcel
(
DateUtil
.
dateToStr
(
dto
.
getUserQuitTime
(),
"yyyy-MM-dd HH:mm:ss"
));
if
(
dto
.
getUserType
()==
1
)
{
vo
.
setUserTypeExcel
(
"企业成员"
);
}
else
if
(
dto
.
getUserType
()==
2
)
{
vo
.
setUserTypeExcel
(
"外部成员"
);
}
else
{
vo
.
setUserTypeExcel
(
"客户"
);
}
voList
.
add
(
vo
)
;
}
String
fileName
=
"退群记录"
;
List
<
String
>
titleList
=
Arrays
.
asList
(
"群成员"
,
"身份"
,
"群名称"
,
"群主"
,
"退群时间"
);
List
<
String
>
fileList
=
Arrays
.
asList
(
"userName"
,
"userTypeExcel"
,
"chatName"
,
"staffName"
,
"userQuitTimeExcel"
);
try
{
ExcelUtils
.
xls
(
response
,
request
,
fileName
,
voList
,
fileList
,
titleList
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
logger
.
info
(
"导出失败"
);
}
return
RestResponse
.
successResult
(
true
);
}
return
RestResponse
.
successResult
(
false
);
}
@RequestMapping
(
"detail"
)
@RequestMapping
(
"detail"
)
public
RestResponse
<
Object
>
detail
(
Long
groupChatId
)
{
public
RestResponse
<
Object
>
detail
(
Long
groupChatId
)
{
if
(
null
==
groupChatId
)
{
if
(
null
==
groupChatId
)
{
...
...
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/vo/chat/GroupChatUserQuitVO.java
0 → 100644
View file @
aab35788
package
com
.
gic
.
haoban
.
manage
.
web
.
vo
.
chat
;
import
java.io.Serializable
;
/**
*
* @ClassName: TabHaobanGroupChatUser
* @Description: TODO
* @Author 徐高华
* @Date 2022年11月25日 15:42:52
* @Modify
* @CopyRight
*/
public
class
GroupChatUserQuitVO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
21771431486600L
;
/**1企业成员2外部联系人3客户*/
private
String
userTypeExcel
;
/**姓名*/
private
String
userName
;
/**昵称*/
private
String
nickName
;
/**用户退群时间*/
private
String
userQuitTimeExcel
;
private
String
chatName
;
private
String
staffName
;
public
String
getUserTypeExcel
()
{
return
userTypeExcel
;
}
public
void
setUserTypeExcel
(
String
userTypeExcel
)
{
this
.
userTypeExcel
=
userTypeExcel
;
}
public
String
getUserName
()
{
return
userName
;
}
public
void
setUserName
(
String
userName
)
{
this
.
userName
=
userName
;
}
public
String
getNickName
()
{
return
nickName
;
}
public
void
setNickName
(
String
nickName
)
{
this
.
nickName
=
nickName
;
}
public
String
getUserQuitTimeExcel
()
{
return
userQuitTimeExcel
;
}
public
void
setUserQuitTimeExcel
(
String
userQuitTimeExcel
)
{
this
.
userQuitTimeExcel
=
userQuitTimeExcel
;
}
public
String
getChatName
()
{
return
chatName
;
}
public
void
setChatName
(
String
chatName
)
{
this
.
chatName
=
chatName
;
}
public
String
getStaffName
()
{
return
staffName
;
}
public
void
setStaffName
(
String
staffName
)
{
this
.
staffName
=
staffName
;
}
}
\ 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