面试开始前一天及30分钟前提醒
This commit is contained in:
@@ -111,4 +111,31 @@ public class JobHandler {
|
||||
}
|
||||
}
|
||||
|
||||
@XxlJob("remindInterviewStartTomorrow")
|
||||
public void remindInterviewStartTomorrow() {
|
||||
try {
|
||||
log.info("面试开始前一天20:00提醒开始");
|
||||
hyPartnerInterviewPlanService.remindInterviewStartTomorrow();
|
||||
log.info("面试开始前一天20:00提醒结束");
|
||||
XxlJobHelper.handleSuccess();
|
||||
} catch (Exception e) {
|
||||
log.error("面试开始前一天20:00提醒异常", e);
|
||||
XxlJobHelper.log("面试开始前一天20:00提醒异常" + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
//每半小时执行一次,查询有无面试时间 x 在当前时间 y < x <= y + 30m 内,有就发短信
|
||||
@XxlJob("remindInterviewStartMinutes")
|
||||
public void remindInterviewStartMinutes() {
|
||||
try {
|
||||
log.info("面试开始前一天20:00提醒开始");
|
||||
hyPartnerInterviewPlanService.remindInterviewStartMinutes();
|
||||
log.info("面试开始前一天20:00提醒结束");
|
||||
XxlJobHelper.handleSuccess();
|
||||
} catch (Exception e) {
|
||||
log.error("面试开始前一天20:00提醒异常", e);
|
||||
XxlJobHelper.log("面试开始前一天20:00提醒异常" + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -63,4 +63,14 @@ public interface HyPartnerInterviewPlanService {
|
||||
*/
|
||||
void updateAbsentInterview() throws ApiException;
|
||||
void approvalReminder() throws ApiException;
|
||||
|
||||
/**
|
||||
* 面试前一天 20:00 提醒
|
||||
*/
|
||||
void remindInterviewStartTomorrow();
|
||||
|
||||
/**
|
||||
* 面试前 30 分钟提醒
|
||||
*/
|
||||
void remindInterviewStartMinutes();
|
||||
}
|
||||
|
||||
@@ -17,10 +17,7 @@ import com.cool.store.mapper.HyPartnerLineInfoMapper;
|
||||
import com.cool.store.mapper.HyPartnerUserChannelMapper;
|
||||
import com.cool.store.request.CloseFollowRequest;
|
||||
import com.cool.store.request.GetInterviewListReq;
|
||||
import com.cool.store.service.HyPartnerInterviewPlanService;
|
||||
import com.cool.store.service.HyPartnerLineInfoService;
|
||||
import com.cool.store.service.InterviewService;
|
||||
import com.cool.store.service.LabelService;
|
||||
import com.cool.store.service.*;
|
||||
import com.cool.store.utils.CoolDateUtils;
|
||||
import com.cool.store.vo.InterviewDetailInfoVO;
|
||||
import com.cool.store.vo.PartnerInterviewInfoVO;
|
||||
@@ -36,6 +33,7 @@ import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
@@ -91,6 +89,13 @@ public class HyPartnerInterviewPlanServiceImpl implements HyPartnerInterviewPlan
|
||||
|
||||
@Autowired
|
||||
private ISVHttpRequest isvHttpRequest;
|
||||
|
||||
@Autowired
|
||||
private SmsService smsService;
|
||||
|
||||
@Autowired
|
||||
private WechatMiniAppService wechatMiniAppService;
|
||||
|
||||
@Override
|
||||
public List<InterviewDetailInfoVO> getInterviewPlanList(String userId,Date dateTime) {
|
||||
String currentDay = DateUtil.format(dateTime, CoolDateUtils.DATE_FORMAT_DAY);
|
||||
@@ -354,4 +359,25 @@ public class HyPartnerInterviewPlanServiceImpl implements HyPartnerInterviewPlan
|
||||
return partnerInterviewInfoVO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void remindInterviewStartTomorrow() {
|
||||
List<HyInterviewRemindDO> tomorrowInterviewInfos = hyPartnerInterviewPlanMapper.getTomorrowInterview();
|
||||
SimpleDateFormat timeFormatter = new SimpleDateFormat("HH:mm");
|
||||
SimpleDateFormat dateFormatter = new SimpleDateFormat("yyyy年MM月dd日");
|
||||
Date startTime;
|
||||
for (HyInterviewRemindDO tomorrowInterviewInfo : tomorrowInterviewInfos) {
|
||||
startTime = tomorrowInterviewInfo.getStartTime();
|
||||
smsService.sendSmsVariable(tomorrowInterviewInfo.getMobile(), SMSMsgEnum.INTERVIEW_BEGIN_IN_DAY, timeFormatter.format(startTime), dateFormatter.format(startTime), wechatMiniAppService.getMiniAppUrl());
|
||||
}
|
||||
}
|
||||
|
||||
//每半小时执行一次,查询有无面试时间 x 在当前时间 y < x <= y + 30m 内,有就发短信
|
||||
@Override
|
||||
public void remindInterviewStartMinutes() {
|
||||
List<HyInterviewRemindDO> tomorrowInterviewInfos = hyPartnerInterviewPlanMapper.remindInterviewStartMinutes();
|
||||
for (HyInterviewRemindDO tomorrowInterviewInfo : tomorrowInterviewInfos) {
|
||||
smsService.sendSmsVariable(tomorrowInterviewInfo.getMobile(), SMSMsgEnum.INTERVIEW_BEGIN_IN_MINUTES, wechatMiniAppService.getMiniAppUrl());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user