自动更新房间状态
This commit is contained in:
@@ -203,16 +203,16 @@
|
||||
set room_status = #{roomStatus},update_time = now()
|
||||
<where>
|
||||
<if test="record.roomStatus !=null and record.roomStatus!=''">
|
||||
and hpip.room_status = #{record.roomStatus}
|
||||
and room_status = #{record.roomStatus}
|
||||
</if>
|
||||
<if test="record.startTime !=null and record.startTime!=''">
|
||||
and hpip.start_time >= #{record.startTime}
|
||||
<if test="record.startTime !=null'">
|
||||
and start_time >= #{record.startTime}
|
||||
</if>
|
||||
<if test="record.endTime !=null and record.endTime!=''">
|
||||
and hpip.end_time <= #{record.endTime}
|
||||
<if test="record.endTime !=null">
|
||||
and end_time <= #{record.endTime}
|
||||
</if>
|
||||
<if test="record.deleted !=null and record.deleted!=''">
|
||||
and hpip.deleted = #{deleted}
|
||||
and deleted = #{deleted}
|
||||
</if>
|
||||
</where>
|
||||
</update>
|
||||
@@ -222,16 +222,16 @@
|
||||
set room_status = #{roomStatus},update_time = now()
|
||||
<where>
|
||||
<if test="record.roomStatus !=null and record.roomStatus!=''">
|
||||
and hpip.room_status = #{record.roomStatus}
|
||||
and room_status = #{record.roomStatus}
|
||||
</if>
|
||||
<if test="record.startTime !=null and record.startTime!=''">
|
||||
and hpip.start_time >= #{record.startTime}
|
||||
<if test="record.startTime !=null">
|
||||
and start_time >= #{record.startTime}
|
||||
</if>
|
||||
<if test="record.endTime !=null and record.endTime!=''">
|
||||
and hpip.start_time <= #{record.endTime}
|
||||
<if test="record.endTime !=null">
|
||||
and start_time <= #{record.endTime}
|
||||
</if>
|
||||
<if test="record.deleted !=null and record.deleted!=''">
|
||||
and hpip.deleted = #{deleted}
|
||||
and deleted = #{deleted}
|
||||
</if>
|
||||
</where>
|
||||
</update>
|
||||
@@ -241,16 +241,16 @@
|
||||
set room_status = #{roomStatus},update_time = now()
|
||||
<where>
|
||||
<if test="record.roomStatus !=null and record.roomStatus!=''">
|
||||
and hpip.room_status = #{record.roomStatus}
|
||||
and room_status = #{record.roomStatus}
|
||||
</if>
|
||||
<if test="record.startTime !=null and record.startTime!=''">
|
||||
and hpip.end_time >= #{record.startTime}
|
||||
<if test="record.startTime !=null">
|
||||
and end_time >= #{record.startTime}
|
||||
</if>
|
||||
<if test="record.endTime !=null and record.endTime!=''">
|
||||
and hpip.end_time <= #{record.endTime}
|
||||
<if test="record.endTime !=null">
|
||||
and end_time <= #{record.endTime}
|
||||
</if>
|
||||
<if test="record.deleted !=null and record.deleted!=''">
|
||||
and hpip.deleted = #{deleted}
|
||||
and deleted = #{deleted}
|
||||
</if>
|
||||
</where>
|
||||
</update>
|
||||
@@ -353,10 +353,10 @@
|
||||
<if test="record.roomStatus !=null and record.roomStatus!=''">
|
||||
and hpip.room_status = #{record.roomStatus}
|
||||
</if>
|
||||
<if test="record.startTime !=null and record.startTime!=''">
|
||||
<if test="record.startTime !=null">
|
||||
and hpip.start_time >= #{record.startTime}
|
||||
</if>
|
||||
<if test="record.endTime !=null and record.endTime!=''">
|
||||
<if test="record.endTime !=null">
|
||||
and hpip.end_time <= #{record.endTime}
|
||||
</if>
|
||||
<if test="record.deleted !=null and record.deleted!=''">
|
||||
@@ -415,10 +415,10 @@
|
||||
<if test="record.partnerId !=null and record.partnerId!=''">
|
||||
and partner_id = #{record.partnerId}
|
||||
</if>
|
||||
<if test="record.startTime !=null and record.startTime!=''">
|
||||
<if test="record.startTime !=null">
|
||||
and start_time = #{record.startTime}
|
||||
</if>
|
||||
<if test="record.endTime !=null and record.endTime!=''">
|
||||
<if test="record.endTime !=null">
|
||||
and end_time = #{record.endTime}
|
||||
</if>
|
||||
<if test="record.interviewer !=null and record.interviewer!=''">
|
||||
|
||||
@@ -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