Commit 237e9dba by liushuangwu

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	src/main/java/com/pipihelper/project/feishu/controller/FeiShuEventController.java
2 parents c9ee7250 14f3567f
...@@ -99,7 +99,9 @@ public class FeiShuEventController { ...@@ -99,7 +99,9 @@ public class FeiShuEventController {
// 都需要返回 不能点击的卡片json // 都需要返回 不能点击的卡片json
if ("revice".equals(actionTypeSecond)) { if ("revice".equals(actionTypeSecond)) {
// 接受按摩 // 接受按摩
return getInteractiveCardStr("感谢支持"); String fileName = String.format("/templates/massage-singel-msg-card-end.json.json");
return getInteractiveCardStr(fileName, "感谢支持");
} else if ("giveUp".equals(actionTypeSecond)) { } else if ("giveUp".equals(actionTypeSecond)) {
// 放弃 - 往大群中发送抢按摩机会卡片 // 放弃 - 往大群中发送抢按摩机会卡片
FeiShuMsgDTO feiShuMsgDTO = new FeiShuMsgDTO(); FeiShuMsgDTO feiShuMsgDTO = new FeiShuMsgDTO();
...@@ -109,12 +111,19 @@ public class FeiShuEventController { ...@@ -109,12 +111,19 @@ public class FeiShuEventController {
String msgCardContent = String.format(massageMsgCardSerivce.getInteractiveCardStr(fileName), feiShuMsgCardEventDTO.getOpen_id()); String msgCardContent = String.format(massageMsgCardSerivce.getInteractiveCardStr(fileName), feiShuMsgCardEventDTO.getOpen_id());
feiShuMsgDTO.setContent(msgCardContent); feiShuMsgDTO.setContent(msgCardContent);
feiShuApiService.sendMsg(feiShuMsgDTO, "chat_id"); feiShuApiService.sendMsg(feiShuMsgDTO, "chat_id");
return getInteractiveCardStr("遗憾放弃"); String fileName1 = String.format("/templates/massage-singel-msg-card-end.json.json");
return getInteractiveCardStr(fileName1, "遗憾放弃");
} else if ("wait".equals(actionTypeSecond)) { } else if ("wait".equals(actionTypeSecond)) {
// 推迟 将当前用户放到队列最后 - 掉延迟更新卡片接口 更新大群、按摩群的按摩时间安排卡片 // 推迟 将当前用户放到队列最后 - 掉延迟更新卡片接口 更新大群、按摩群的按摩时间安排卡片
String fileName1 = String.format("/templates/massage-singel-msg-card-end.json.json");
return getInteractiveCardStr(fileName1, "已为你推迟到最后");
} else if ("rob".equals(actionTypeSecond)) {
// 抢名额 - 掉延迟更新卡片接口 更新大群、按摩群的按摩时间安排卡片
return getInteractiveCardStr("已为你推迟到最后"); String fileName1 = String.format("/templates/massage-msg-card-rob-end.json.json.json");
return getInteractiveCardStr(fileName1, "");
} }
default: default:
} }
...@@ -126,8 +135,7 @@ public class FeiShuEventController { ...@@ -126,8 +135,7 @@ public class FeiShuEventController {
* *
* @return * @return
*/ */
public JSONObject getInteractiveCardStr(String msg) { public JSONObject getInteractiveCardStr(String fileName, String msg) {
String fileName = String.format("/templates/massage-singel-msg-card-end.json.json");
try { try {
InputStream in = this.getClass().getResourceAsStream(fileName); InputStream in = this.getClass().getResourceAsStream(fileName);
InputStreamReader inputStreamReader = new InputStreamReader(in); InputStreamReader inputStreamReader = new InputStreamReader(in);
......
{
"config": {
"wide_screen_mode": true,
"update_multi": true
},
"elements": [
{
"tag": "div",
"text": {
"content": "已经被抢啦啦啦~",
"tag": "lark_md"
}
}
],
"header": {
"template": "turquoise",
"title": {
"content": "👻 按摩提醒请查收!",
"tag": "plain_text"
}
}
}
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!