Commit a8db0b7c by weiss

1

1 parent af45663d
......@@ -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之旅已结束~");
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!