Commit 7af4980f by zhaolianjie

卡片流程

1 parent 27140404
......@@ -90,7 +90,9 @@ public class FeiShuEventController {
// 都需要返回 不能点击的卡片json
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)) {
// 放弃 - 往大群中发送抢按摩机会卡片
FeiShuMsgDTO feiShuMsgDTO = new FeiShuMsgDTO();
......@@ -100,13 +102,19 @@ public class FeiShuEventController {
String msgCardContent = String.format(massageMsgCardSerivce.getInteractiveCardStr(fileName), feiShuMsgCardEventDTO.getOpen_id());
feiShuMsgDTO.setContent(msgCardContent);
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)) {
// 推迟 将当前用户放到队列最后 - 掉延迟更新卡片接口 更新大群、按摩群的按摩时间安排卡片
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:
}
......@@ -118,8 +126,7 @@ public class FeiShuEventController {
*
* @return
*/
public JSONObject getInteractiveCardStr(String msg) {
String fileName = String.format("/templates/massage-singel-msg-card-end.json.json");
public JSONObject getInteractiveCardStr(String fileName, String msg) {
try {
InputStream in = this.getClass().getResourceAsStream(fileName);
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
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!