feat(健康咨询): 新增音视频咨询超时关闭功能及定时任务

- 新增 endVideoSession 接口,供手动触发和定时任务调用
- Mapper 层添加 UPDATE SQL:预约日期已过的视频咨询,有通话记录改为待评价(4),无记录改为取消(6)
- SyncScheduleJob 新增 XXL-Job 任务 endVideoSession,每日自动处理过期视频咨询

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
wanghao
2026-03-30 14:54:33 +08:00
co-authored by Claude Sonnet 4.6
parent 2e90ec71cc
commit 8f00d07377
5 changed files with 32 additions and 2 deletions
@@ -480,4 +480,10 @@ public class ConSessionApiController {
return conSessionApiService.insertUserAndHelperSessionNew();
}
@Operation(summary = "超时关闭视频咨询", description = "超时关闭视频咨询")
@GetMapping("/endVideoSession")
public Result<String> endVideoSession() {
return Result.ok(conSessionApiService.endVideoSession());
}
}
@@ -115,4 +115,6 @@ public interface ConSessionApiService {
UserSessionCount countForUser();
String endVideoSession();
}
@@ -2114,4 +2114,8 @@ public class ConSessionApiServiceImpl implements ConSessionApiService {
return conSessionMapper.selectCount(wrapper).intValue();
}
public String endVideoSession() {
return conSessionMapper.endVideoSession();
}
}
@@ -294,4 +294,13 @@ public interface ConSessionMapper extends BaseMapper<ConSession> , MPJBaseMapper
@Param("doctorjob")String doctorjob,
@Param("contentType")String contentType,
@Param("toAccount")String toAccount);
/**
* 音视频咨询过期处理:预约日期已过的视频咨询,有通话记录则改为待评价,无通话记录则改为取消
* content_status: 4=待评价,6=取消
*/
@Update("UPDATE con_session SET content_status = CASE WHEN session_time IS NOT NULL THEN 4 ELSE 6 END " +
"WHERE content_type = 2 AND CURDATE() > session_date " +
"AND content_status NOT IN (4, 5, 6, 7, 8) AND del_flag = 0 AND status = 1")
String endVideoSession();
}
@@ -7,6 +7,7 @@ import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.context.XxlJobHelper;
import com.xxl.job.core.handler.annotation.XxlJob;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.constant.CommonConstant;
import org.jeecg.config.shiro.ClientSignThreadLocal;
import org.parboiled.common.StringUtils;
@@ -53,4 +54,12 @@ public class SyncScheduleJob {
return ReturnT.SUCCESS;
}
@XxlJob(value = "endVideoSession")
public Result<String> endVideoSession() {
// 20260327 新增 音视频咨询过期处理 规则为:超过预约时间,比如预约的是 12月9日和专家视频沟通,但超过时间一天,即为过期,需要关闭咨询
conSessionApiController.endVideoSession();
return Result.ok("success");
}
}