Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation
This project
Loading...
Sign in
zhangshaowu
/
pipi-helper
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 87224ea1
authored
Oct 16, 2022
by
zhaolianjie
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
卡片流程 - 删除群组
1 parent
b0cdd4c0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
5 deletions
src/main/java/com/pipihelper/project/feishu/controller/FeiShuEventController.java
src/main/java/com/pipihelper/project/feishu/controller/FeiShuEventController.java
View file @
87224ea
...
...
@@ -29,6 +29,7 @@ import com.pipihelper.project.feishu.service.massage.MassageService;
import
com.pipihelper.project.feishu.utils.FeiShuEventDataDecrypter
;
import
com.pipihelper.project.utils.CacheUtil
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
...
...
@@ -92,13 +93,17 @@ public class FeiShuEventController {
if
(
encryptJsonObject
.
containsKey
(
"challenge"
))
{
return
encryptJsonObject
;
}
String
chatId
=
(
String
)
CacheUtil
.
get
(
"chatId"
);
log
.
info
(
"删除群组id:{}"
,
chatId
);
feiShuApiService
.
deleteChatList
(
"oc_a1df7014af5a345204e36f8f01bba574"
);
FeiShuEventDTO
feiShuEventDTO
=
encryptJsonObject
.
toJavaObject
(
FeiShuEventDTO
.
class
);
if
(!
feiShuEventDTO
.
getHeader
().
getToken
().
equalsIgnoreCase
(
feiShuConfig
.
getVerificationToken
()))
{
return
null
;
}
if
(
"im.message.receive_v1"
.
equalsIgnoreCase
(
feiShuEventDTO
.
getHeader
().
getEvent_type
()))
{
log
.
info
(
"处理单聊事件:{}"
,
feiShuEventDTO
);
feiShuEventService
.
imMessageReceiveV1
(
feiShuEventDTO
);
log
.
info
(
"处理单聊事件:{}"
,
feiShuEventDTO
);
feiShuEventService
.
imMessageReceiveV1
(
feiShuEventDTO
);
}
return
null
;
}
...
...
@@ -182,7 +187,7 @@ public class FeiShuEventController {
String
robUserId
=
feiShuMsgCardEventDTO
.
getOpen_id
();
Employee
employee
=
employeeService
.
findByOpenId
(
robUserId
);
massageService
.
robSingle
(
robUserId
,
oldUserId
,
employee
.
getName
());
massageService
.
robSingle
(
robUserId
,
oldUserId
,
employee
.
getName
());
String
fileName1
=
String
.
format
(
"/templates/massage-msg-card-rob-end.json"
);
return
getInteractiveCardStr
(
fileName1
,
"已经被"
+
employee
.
getName
()
+
"抢啦,啦啦~"
);
}
...
...
@@ -208,8 +213,10 @@ public class FeiShuEventController {
}
@PostMapping
(
"/delete-chat-list"
)
public
Object
deleteChat
()
{
String
chatId
=
(
String
)
CacheUtil
.
get
(
"chatId"
);
public
Object
deleteChat
(
String
chatId
)
{
if
(
StringUtils
.
isBlank
(
chatId
))
{
chatId
=
(
String
)
CacheUtil
.
get
(
"chatId"
);
}
log
.
info
(
"删除群组id:{}"
,
chatId
);
feiShuApiService
.
deleteChatList
(
chatId
);
return
null
;
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment