5.16

想了一下 学习记录总结 该怎么总结
最后还是以学习的时长来做标准了

    @Override
    public void summaryRecord(int planId) {
        List<Record> records = recordMapper.listRecord(planId);
        // 计算时间间隔(小时
        long intervalInHours = 0;
        for (Record record : records) {
            // 计算时间间隔(毫秒)
            long intervalInMillis = record.getEndTime().getTime() - record.getStartTime().getTime();
            intervalInHours += intervalInMillis / 60;
        }
        String analyse = "";
        if (intervalInHours <= 5)
            analyse = "很差";
        else if (intervalInHours <= 10)
            analyse = "及格";
        else if (intervalInHours <= 15)
            analyse = "良好";
        else
            analyse = "优秀";

        planMapper.summaryRecord(planId, analyse);
    }

}
posted @ 2024-05-16 23:21  258333  阅读(5)  评论(0编辑  收藏  举报