自动更新房间状态
This commit is contained in:
@@ -39,25 +39,40 @@ public class JobHandler {
|
||||
*/
|
||||
@XxlJob("updateInterviewOverTime")
|
||||
public void updateInterviewOverTime(){
|
||||
log.info("面试超时定时任务开始");
|
||||
hyPartnerInterviewPlanService.updateInterviewOverTime();
|
||||
log.info("面试超时定时任务结束");
|
||||
XxlJobHelper.handleSuccess();
|
||||
try {
|
||||
log.info("面试超时定时任务开始");
|
||||
hyPartnerInterviewPlanService.updateInterviewOverTime();
|
||||
log.info("面试超时定时任务结束");
|
||||
XxlJobHelper.handleSuccess();
|
||||
}catch (Exception e){
|
||||
log.error("面试超时定时任务异常",e);
|
||||
XxlJobHelper.log("面试超时定时任务异常"+e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@XxlJob("openInterviewRoom")
|
||||
public void openInterviewRoom(){
|
||||
log.info("房间状态开启定时任务开始");
|
||||
hyPartnerInterviewPlanService.openInterviewRoom();
|
||||
log.info("房间状态开启定时任务结束");
|
||||
XxlJobHelper.handleSuccess();
|
||||
try {
|
||||
log.info("房间状态开启定时任务开始");
|
||||
hyPartnerInterviewPlanService.openInterviewRoom();
|
||||
log.info("房间状态开启定时任务结束");
|
||||
XxlJobHelper.handleSuccess();
|
||||
}catch (Exception e){
|
||||
log.error("房间状态开启定时任务异常",e);
|
||||
XxlJobHelper.log("房间状态开启定时任务异常"+e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
public void updateAbsentInterview(){
|
||||
log.info("面试缺席定时任务开始");
|
||||
hyPartnerInterviewPlanService.updateAbsentInterview();
|
||||
log.info("面试缺席定时任务结束");
|
||||
XxlJobHelper.handleSuccess();
|
||||
try {
|
||||
log.info("面试缺席定时任务开始");
|
||||
hyPartnerInterviewPlanService.updateAbsentInterview();
|
||||
log.info("面试缺席定时任务结束");
|
||||
XxlJobHelper.handleSuccess();
|
||||
}catch (Exception e){
|
||||
log.error("面试缺席定时任务异常",e);
|
||||
XxlJobHelper.log("面试缺席定时任务异常"+e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -174,8 +174,9 @@ public class HyPartnerInterviewPlanServiceImpl implements HyPartnerInterviewPlan
|
||||
public void openInterviewRoom() {
|
||||
//更新会议开始时间为十分钟之内的房间状态为开启
|
||||
Date startTime = new Date();
|
||||
String startTimeStr = DateUtil.formatDateTime(startTime);
|
||||
HyPartnerInterviewPlanDO hyPartnerInterviewPlanDO = new HyPartnerInterviewPlanDO();
|
||||
hyPartnerInterviewPlanDO.setStartTime(startTime);
|
||||
hyPartnerInterviewPlanDO.setStartTime(DateUtil.parseDateTime(startTimeStr));
|
||||
hyPartnerInterviewPlanDO.setEndTime(DateUtil.offsetMinute(startTime,10));
|
||||
hyPartnerInterviewPlanDO.setRoomStatus(RoomStatus.WAIT_FOR_OPEN.getCode());
|
||||
hyPartnerInterviewPlanDO.setDeleted(false);
|
||||
|
||||
Reference in New Issue
Block a user