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 89cc7298
authored
Oct 15, 2022
by
liushuangwu
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
2 parents
45bfc6bd
27140404
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
52 additions
and
6 deletions
src/main/java/com/pipihelper/project/feishu/controller/FeiShuEventController.java
src/main/resources/templates/massage-msg-card-rob.json
src/main/java/com/pipihelper/project/feishu/controller/FeiShuEventController.java
View file @
89cc729
...
@@ -8,9 +8,11 @@ import com.pipihelper.project.feishu.dto.FeiShuEventDTO;
...
@@ -8,9 +8,11 @@ import com.pipihelper.project.feishu.dto.FeiShuEventDTO;
import
com.pipihelper.project.feishu.dto.FeiShuMsgCardEventDTO
;
import
com.pipihelper.project.feishu.dto.FeiShuMsgCardEventDTO
;
import
com.pipihelper.project.feishu.dto.chat.FeiShuChatDTO
;
import
com.pipihelper.project.feishu.dto.chat.FeiShuChatDTO
;
import
com.pipihelper.project.feishu.dto.employee.FeiShuEmployeeDTO
;
import
com.pipihelper.project.feishu.dto.employee.FeiShuEmployeeDTO
;
import
com.pipihelper.project.feishu.dto.msg.FeiShuMsgDTO
;
import
com.pipihelper.project.feishu.service.EmployeeService
;
import
com.pipihelper.project.feishu.service.EmployeeService
;
import
com.pipihelper.project.feishu.service.FeiShuApiService
;
import
com.pipihelper.project.feishu.service.FeiShuApiService
;
import
com.pipihelper.project.feishu.service.FeiShuEventService
;
import
com.pipihelper.project.feishu.service.FeiShuEventService
;
import
com.pipihelper.project.feishu.service.massage.MassageMsgCardSerivce
;
import
com.pipihelper.project.feishu.utils.FeiShuEventDataDecrypter
;
import
com.pipihelper.project.feishu.utils.FeiShuEventDataDecrypter
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
...
@@ -44,8 +46,8 @@ public class FeiShuEventController {
...
@@ -44,8 +46,8 @@ public class FeiShuEventController {
@Autowired
@Autowired
private
FeiShuApiService
feiShuApiService
;
private
FeiShuApiService
feiShuApiService
;
@Autowired
private
MassageMsgCardSerivce
massageMsgCardSerivce
;
@Autowired
@Autowired
private
EmployeeService
employeeService
;
private
EmployeeService
employeeService
;
...
@@ -88,17 +90,23 @@ public class FeiShuEventController {
...
@@ -88,17 +90,23 @@ public class FeiShuEventController {
// 都需要返回 不能点击的卡片json
// 都需要返回 不能点击的卡片json
if
(
"revice"
.
equals
(
actionTypeSecond
))
{
if
(
"revice"
.
equals
(
actionTypeSecond
))
{
// 接受按摩
// 接受按摩
return
getInteractiveCardStr
(
"感谢支持"
);
return
getInteractiveCardStr
(
"感谢支持"
);
}
else
if
(
"giveUp"
.
equals
(
actionTypeSecond
))
{
}
else
if
(
"giveUp"
.
equals
(
actionTypeSecond
))
{
// 放弃 - 往大群中发送抢按摩机会卡片
// 放弃 - 往大群中发送抢按摩机会卡片
FeiShuMsgDTO
feiShuMsgDTO
=
new
FeiShuMsgDTO
();
feiShuMsgDTO
.
setMsgType
(
"interactive"
);
feiShuMsgDTO
.
setReceiveId
(
feiShuConfig
.
getChatId
());
String
fileName
=
String
.
format
(
"/templates/massage-msg-card-rob.json.json"
);
String
msgCardContent
=
String
.
format
(
massageMsgCardSerivce
.
getInteractiveCardStr
(
fileName
),
feiShuMsgCardEventDTO
.
getOpen_id
());
feiShuMsgDTO
.
setContent
(
msgCardContent
);
feiShuApiService
.
sendMsg
(
feiShuMsgDTO
,
"chat_id"
);
return
getInteractiveCardStr
(
"遗憾放弃"
);
return
getInteractiveCardStr
(
"遗憾放弃"
);
}
else
if
(
"wait"
.
equals
(
actionTypeSecond
))
{
}
else
if
(
"wait"
.
equals
(
actionTypeSecond
))
{
// 推迟 将当前用户放到队列最后 - 给下一个用户发送按摩卡片
// 推迟 将当前用户放到队列最后 - 掉延迟更新卡片接口 更新大群、按摩群的按摩时间安排卡片
return
getInteractiveCardStr
(
"已推迟到最后"
);
return
getInteractiveCardStr
(
"已为你推迟到最后"
);
}
}
default
:
default
:
}
}
...
...
src/main/resources/templates/massage-msg-card-rob.json
0 → 100644
View file @
89cc729
{
"config"
:
{
"wide_screen_mode"
:
true
,
"update_multi"
:
true
},
"elements"
:
[
{
"tag"
:
"div"
,
"text"
:
{
"content"
:
"当前空余一个名额"
,
"tag"
:
"lark_md"
}
},
{
"actions"
:
[
{
"tag"
:
"button"
,
"text"
:
{
"content"
:
"😁 我抢"
,
"tag"
:
"plain_text"
},
"type"
:
"default"
,
"value"
:
{
"key1"
:
"massage-singel.rob.%s"
}
}
],
"tag"
:
"action"
}
],
"header"
:
{
"template"
:
"turquoise"
,
"title"
:
{
"content"
:
"👻 按摩提醒请查收!"
,
"tag"
:
"plain_text"
}
}
}
\ No newline at end of file
\ No newline at end of file
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