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 a8db0b7c
authored
Oct 27, 2022
by
weiss
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
1
1 parent
af45663d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
29 deletions
src/main/java/com/pipihelper/project/feishu/controller/FeiShuEventController.java
src/main/java/com/pipihelper/project/feishu/controller/FeiShuEventController.java
View file @
a8db0b7
...
...
@@ -152,35 +152,35 @@ public class FeiShuEventController {
// 抢名额 - 掉延迟更新卡片接口 更新大群、按摩群的按摩时间安排卡片
return
rob
(
feiShuMsgCardEventDTO
);
}
else
if
(
"next"
.
equals
(
actionTypeSecond
))
{
// 当前按完,有请下一位
String
endUserId
=
feiShuMsgCardEventDTO
.
getOpen_id
();
Pain
oldPain
=
painService
.
findByOpenId
(
endUserId
);
oldPain
.
setStatus
(
2
);
painService
.
update
(
oldPain
);
List
<
Pain
>
painList
=
painService
.
findBackIndex
(
oldPain
.
getPindex
(),
1
);
if
(
CollectionUtil
.
isNotEmpty
(
painList
))
{
Pain
noticePain
=
CollectionUtil
.
getFirst
(
painList
);
noticePain
.
setStatus
(
1
);
painService
.
update
(
noticePain
);
massageService
.
updateSingleMassageMsgCardWhenBegin
(
noticePain
.
getMessageId
());
//加急
//发送应用内提醒
JSONObject
noticeMsg
=
new
JSONObject
();
noticeMsg
.
put
(
"user_id_list"
,
Collections
.
singletonList
(
noticePain
.
getOpenId
()));
log
.
info
(
"发送应用内容消息提醒"
);
feiShuApiService
.
patchUrgentApp
(
noticePain
.
getMessageId
(),
noticeMsg
);
//按摩群中同步发送按摩进度信息
FeiShuMsgDTO
feiShuMsgDTO
=
new
FeiShuMsgDTO
();
String
msg
=
"当前按摩进度:"
+
String
.
format
(
"<at user_id=\\\"%s\\
\">%s</at>"
,
noticePain
.
getOpenId
(),
noticePain
.
getName
());
JSONObject
content
=
new
JSONObject
();
content
.
put
(
"text"
,
msg
);
feiShuMsgDTO
.
setMsgType
(
"text"
);
feiShuMsgDTO
.
setContent
(
content
.
toString
());
String
chatId
=
feiShuApiService
.
queryChatId
();
feiShuMsgDTO
.
setReceiveId
(
chatId
);
feiShuApiService
.
sendMsg
(
feiShuMsgDTO
,
"chat_id"
);
}
//
// 当前按完,有请下一位
//
String endUserId = feiShuMsgCardEventDTO.getOpen_id();
//
Pain oldPain = painService.findByOpenId(endUserId);
//
oldPain.setStatus(2);
//
painService.update(oldPain);
//
List<Pain> painList = painService.findBackIndex(oldPain.getPindex(), 1);
//
if (CollectionUtil.isNotEmpty(painList)) {
//
Pain noticePain = CollectionUtil.getFirst(painList);
//
noticePain.setStatus(1);
//
painService.update(noticePain);
//
massageService.updateSingleMassageMsgCardWhenBegin(noticePain.getMessageId());
//
//加急
//
//发送应用内提醒
//
JSONObject noticeMsg = new JSONObject();
//
noticeMsg.put("user_id_list", Collections.singletonList(noticePain.getOpenId()));
//
log.info("发送应用内容消息提醒");
//
feiShuApiService.patchUrgentApp(noticePain.getMessageId(), noticeMsg);
//
//按摩群中同步发送按摩进度信息
//
FeiShuMsgDTO feiShuMsgDTO = new FeiShuMsgDTO();
// String msg = "当前按摩进度:" + String.format("<at user_id=\"%s
\">%s</at>", noticePain.getOpenId(), noticePain.getName());
//
JSONObject content = new JSONObject();
//
content.put("text", msg);
//
feiShuMsgDTO.setMsgType("text");
//
feiShuMsgDTO.setContent(content.toString());
//
String chatId = feiShuApiService.queryChatId();
//
//
feiShuMsgDTO.setReceiveId(chatId);
//
feiShuApiService.sendMsg(feiShuMsgDTO, "chat_id");
//
}
String
fileName1
=
String
.
format
(
"/templates/massage-singel-msg-card-end.json"
);
return
getInteractiveCardStr
(
fileName1
,
"您本次的massage之旅已结束~"
);
}
...
...
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