Commit 8f4a428a by zhaolianjie

卡片流程 - 删除群组

1 parent 379026c8
......@@ -190,6 +190,7 @@ public class FeiShuEventController {
feiShuChatDTO.setChatId((String) CacheUtil.get("chatId"));
feiShuChatDTO.setIdList(new String[]{feiShuMsgCardEventDTO.getOpen_id()});
feiShuApiService.joinChatList(feiShuChatDTO);
sendSingle(robUserId);
// 更新大群和按摩群的大卡片,异步
// 大群
massageService.updateMassageMsgCardToPiPiChat(feiShuConfig.getChatId());
......@@ -200,6 +201,22 @@ public class FeiShuEventController {
return getInteractiveCardStr(fileName1, "已经被" + employee.getName() + "抢啦,啦啦~");
}
private void sendSingle(String openId){
//给单个用户发送
String singleContent = massageMsgCardSerivce.genMassageMsgCardForSingle();
log.info("给单个用户发送按摩消息:{}", singleContent);
FeiShuMsgDTO feiShuMsgDTO = new FeiShuMsgDTO();
feiShuMsgDTO.setMsgType("interactive");
feiShuMsgDTO.setContent(singleContent);
feiShuMsgDTO.setReceiveId(openId);
log.info(feiShuMsgDTO.toString());
JSONObject sendMsgResponse = feiShuApiService.sendMsg(feiShuMsgDTO, "open_id");
String messageId = sendMsgResponse.getJSONObject("data").getString("message_id");
//更新按摩记录表中的messageId
Pain pain = painService.findByOpenId(openId);
pain.setMessageId(messageId);
painService.update(pain);
}
/**
* 读取模板文件
*
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!