广州市综治平台后端
xusd
7 days ago 9cd7dd1c881f21dd17fbbd7aceb4d60e78149b9c
dyh-service/dyh-mediate/src/main/java/cn/huge/module/cases/service/CaseWindupApplyService.java
@@ -173,8 +173,12 @@
        try{
            // 创建CaseWindupApply的查询条件包装器
            QueryWrapper<CaseWindupApply> caseWindupApplyQueryWrapper = new QueryWrapper<>();
            // 设置查询条件为case_task_id等于传入的caseTaskId
            // 设置查询条件为case_id等于传入的caseId
            caseWindupApplyQueryWrapper.eq("case_id", caseId);
            // 按创建时间降序排序,确保获取最新的记录
            caseWindupApplyQueryWrapper.orderByDesc("create_time");
            // 添加LIMIT 1限制,确保只返回一条记录
            caseWindupApplyQueryWrapper.last("LIMIT 1");
            // 使用查询条件从数据库中选取一条记录
            CaseWindupApply caseWindupApply = mapper.selectOne(caseWindupApplyQueryWrapper);
@@ -182,9 +186,9 @@
            return caseWindupApply;
        }catch (Exception e){
            // 记录错误日志,包括方法调用失败的信息和异常堆栈
            log.error("[CaseWindupApplyService.getByCaseTaskId]调用失败,异常信息:"+e, e);
            log.error("[CaseWindupApplyService.getByCaseId]调用失败,异常信息:"+e, e);
            // 抛出服务异常,包含方法名称和原始异常
            throw new ServiceException("CaseWindupApplyService.getByCaseTaskId", e);
            throw new ServiceException("CaseWindupApplyService.getByCaseId", e);
        }
    }
    /**