预约面试发送消息卡片修改方法遗漏
This commit is contained in:
@@ -10,6 +10,7 @@ import com.cool.store.dto.partner.PartnerInterviewInfoDTO;
|
|||||||
import com.cool.store.entity.*;
|
import com.cool.store.entity.*;
|
||||||
import com.cool.store.enums.*;
|
import com.cool.store.enums.*;
|
||||||
import com.cool.store.exception.ApiException;
|
import com.cool.store.exception.ApiException;
|
||||||
|
import com.cool.store.http.EventCenterHttpRequest;
|
||||||
import com.cool.store.http.ISVHttpRequest;
|
import com.cool.store.http.ISVHttpRequest;
|
||||||
import com.cool.store.mapper.HyPartnerInterviewMapper;
|
import com.cool.store.mapper.HyPartnerInterviewMapper;
|
||||||
import com.cool.store.mapper.HyPartnerInterviewPlanMapper;
|
import com.cool.store.mapper.HyPartnerInterviewPlanMapper;
|
||||||
@@ -34,10 +35,7 @@ import org.springframework.transaction.annotation.Transactional;
|
|||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.Date;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -83,6 +81,8 @@ public class HyPartnerInterviewPlanServiceImpl implements HyPartnerInterviewPlan
|
|||||||
@Resource
|
@Resource
|
||||||
HyPartnerUserChannelDAO hyPartnerUserChannelDAO;
|
HyPartnerUserChannelDAO hyPartnerUserChannelDAO;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private EventCenterHttpRequest eventCenterHttpRequest;
|
||||||
|
|
||||||
@Value("${feishu.notice.link.url}")
|
@Value("${feishu.notice.link.url}")
|
||||||
private String linkUrl;
|
private String linkUrl;
|
||||||
@@ -269,17 +269,20 @@ public class HyPartnerInterviewPlanServiceImpl implements HyPartnerInterviewPlan
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
//发送消息
|
//发送消息
|
||||||
|
List<String> userIds = remindInterviewMsgDTOS.stream().map(RemindInterviewMsgDTO::getInterviewerId).collect(Collectors.toList());
|
||||||
|
Map<String, String> feishuUserIdsByUserIds = enterpriseUserDAO.getFeishuUserIdsByUserIds(userIds);
|
||||||
remindInterviewMsgDTOS.stream().forEach(interviewMsgDTO->{
|
remindInterviewMsgDTOS.stream().forEach(interviewMsgDTO->{
|
||||||
try {
|
try {
|
||||||
List<String> userIds = new ArrayList<>();
|
// SendCardMessageDTO sendCardMessageDTO = new SendCardMessageDTO();
|
||||||
userIds.add(interviewMsgDTO.getInterviewerId());
|
// sendCardMessageDTO.setUserIds(userIds);
|
||||||
SendCardMessageDTO sendCardMessageDTO = new SendCardMessageDTO();
|
// sendCardMessageDTO.setMessageType(FeiShuNoticeMsgEnum.INTERVIEW_APPOINTMENT);
|
||||||
sendCardMessageDTO.setUserIds(userIds);
|
// sendCardMessageDTO.setMessageUrl(linkUrl);
|
||||||
sendCardMessageDTO.setMessageType(FeiShuNoticeMsgEnum.INTERVIEW_APPOINTMENT);
|
// sendCardMessageDTO.setTitle("面试预约申请");
|
||||||
sendCardMessageDTO.setMessageUrl(linkUrl);
|
// sendCardMessageDTO.setContent(interviewService.generateFeiShuInterviewMsg(interviewMsgDTO.getPartnerName(), interviewMsgDTO.getPartnerMobile(), interviewMsgDTO.getStartTime()));
|
||||||
sendCardMessageDTO.setTitle("面试预约申请");
|
//替换为事件中心发送
|
||||||
sendCardMessageDTO.setContent(interviewService.generateFeiShuInterviewMsg(interviewMsgDTO.getPartnerName(), interviewMsgDTO.getPartnerMobile(), interviewMsgDTO.getStartTime()));
|
eventCenterHttpRequest.sendFeiShuNotice(FeiShuNoticeMsgEnum.INTERVIEW_APPOINTMENT,
|
||||||
isvHttpRequest.sendFeiShuCardMessage(sendCardMessageDTO);
|
Arrays.asList(feishuUserIdsByUserIds.get(interviewMsgDTO.getInterviewerId())),
|
||||||
|
interviewMsgDTO.getPartnerName(), interviewMsgDTO.getPartnerMobile(), interviewMsgDTO.getStartTime());
|
||||||
} catch (ApiException e) {
|
} catch (ApiException e) {
|
||||||
log.error("发送面试提醒消息失败",e);
|
log.error("发送面试提醒消息失败",e);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ import com.cool.store.entity.*;
|
|||||||
import com.cool.store.enums.*;
|
import com.cool.store.enums.*;
|
||||||
import com.cool.store.exception.ApiException;
|
import com.cool.store.exception.ApiException;
|
||||||
import com.cool.store.exception.ServiceException;
|
import com.cool.store.exception.ServiceException;
|
||||||
|
import com.cool.store.http.EventCenterHttpRequest;
|
||||||
import com.cool.store.http.ISVHttpRequest;
|
import com.cool.store.http.ISVHttpRequest;
|
||||||
import com.cool.store.mapper.*;
|
import com.cool.store.mapper.*;
|
||||||
import com.cool.store.request.*;
|
import com.cool.store.request.*;
|
||||||
@@ -42,10 +43,7 @@ import org.springframework.stereotype.Service;
|
|||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.Date;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author: young.yu
|
* @Author: young.yu
|
||||||
@@ -100,6 +98,10 @@ public class InterviewServiceImpl implements InterviewService {
|
|||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private WechatMiniAppService wechatMiniAppService;
|
private WechatMiniAppService wechatMiniAppService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private EventCenterHttpRequest eventCenterHttpRequest;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<InterviewVO> getInterviewList(GetInterviewListReq request) {
|
public List<InterviewVO> getInterviewList(GetInterviewListReq request) {
|
||||||
List<InterviewVO> interviewList = hyPartnerInterviewPlanMapper.getInterviewList(request);
|
List<InterviewVO> interviewList = hyPartnerInterviewPlanMapper.getInterviewList(request);
|
||||||
@@ -493,13 +495,17 @@ public class InterviewServiceImpl implements InterviewService {
|
|||||||
InterviewVO interviewVO = hyPartnerInterviewPlanMapper.getInterviewInfo(String.valueOf(interviewPlanId));
|
InterviewVO interviewVO = hyPartnerInterviewPlanMapper.getInterviewInfo(String.valueOf(interviewPlanId));
|
||||||
List<String> userIds = new ArrayList<>();
|
List<String> userIds = new ArrayList<>();
|
||||||
userIds.add(interviewrId);
|
userIds.add(interviewrId);
|
||||||
SendCardMessageDTO sendCardMessageDTO = new SendCardMessageDTO();
|
Map<String, String> feishuUserIdsByUserIds = enterpriseUserDAO.getFeishuUserIdsByUserIds(userIds);
|
||||||
sendCardMessageDTO.setUserIds(userIds);
|
// SendCardMessageDTO sendCardMessageDTO = new SendCardMessageDTO();
|
||||||
sendCardMessageDTO.setMessageType(FeiShuNoticeMsgEnum.INTERVIEW_APPOINTMENT);
|
// sendCardMessageDTO.setUserIds(userIds);
|
||||||
sendCardMessageDTO.setMessageUrl(linkUrl);
|
// sendCardMessageDTO.setMessageType(FeiShuNoticeMsgEnum.INTERVIEW_APPOINTMENT);
|
||||||
sendCardMessageDTO.setTitle("面试预约申请");
|
// sendCardMessageDTO.setMessageUrl(linkUrl);
|
||||||
sendCardMessageDTO.setContent(generateFeiShuInterviewMsg(interviewVO.getPartnerName(), interviewVO.getPartnerMobile(), interviewVO.getStartTime()));
|
// sendCardMessageDTO.setTitle("面试预约申请");
|
||||||
isvHttpRequest.sendFeiShuCardMessage(sendCardMessageDTO);
|
// sendCardMessageDTO.setContent(generateFeiShuInterviewMsg(interviewVO.getPartnerName(), interviewVO.getPartnerMobile(), interviewVO.getStartTime()));
|
||||||
|
//替换为通过事件中心发送消息
|
||||||
|
eventCenterHttpRequest.sendFeiShuNotice(FeiShuNoticeMsgEnum.INTERVIEW_APPOINTMENT,
|
||||||
|
Arrays.asList(feishuUserIdsByUserIds.get(interviewrId)),
|
||||||
|
interviewVO.getPartnerName(), interviewVO.getPartnerMobile(), interviewVO.getStartTime());
|
||||||
|
|
||||||
//记录日志
|
//记录日志
|
||||||
PartnerUserInfoVO operator = PartnerUserHolder.getUser();
|
PartnerUserInfoVO operator = PartnerUserHolder.getUser();
|
||||||
|
|||||||
Reference in New Issue
Block a user