mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/per-boe/java-servers.git
synced 2025-12-17 23:06:53 +08:00
szx-1932 添加日志
This commit is contained in:
@@ -49,6 +49,7 @@ public class StudyCourseDao extends BaseDao<StudyCourse> {
|
|||||||
public void finishCheck(String studyId,String courseId,Integer total,String token){
|
public void finishCheck(String studyId,String courseId,Integer total,String token){
|
||||||
|
|
||||||
if(StringUtils.isNotEmpty(redisTemplate.opsForValue().get(studyId + "_" + courseId + "_" + total))){
|
if(StringUtils.isNotEmpty(redisTemplate.opsForValue().get(studyId + "_" + courseId + "_" + total))){
|
||||||
|
log.info("进入埋点finishCheck");
|
||||||
saveThreadLog(studyId, courseId, total, token);
|
saveThreadLog(studyId, courseId, total, token);
|
||||||
return ;
|
return ;
|
||||||
}
|
}
|
||||||
@@ -78,6 +79,7 @@ public class StudyCourseDao extends BaseDao<StudyCourse> {
|
|||||||
UpdateBuilder.create("finishTime",now),
|
UpdateBuilder.create("finishTime",now),
|
||||||
UpdateBuilder.create("status",StudyCourse.STATUS_FINISH));
|
UpdateBuilder.create("status",StudyCourse.STATUS_FINISH));
|
||||||
redisTemplate.opsForValue().set(studyId + "_" + courseId + "_" + total, "100", 24, TimeUnit.HOURS);
|
redisTemplate.opsForValue().set(studyId + "_" + courseId + "_" + total, "100", 24, TimeUnit.HOURS);
|
||||||
|
log.info("进入埋点finishCheck");
|
||||||
saveThreadLog(studyId, courseId, total, token);
|
saveThreadLog(studyId, courseId, total, token);
|
||||||
}else {
|
}else {
|
||||||
super.updateMultiFieldById(studyId,
|
super.updateMultiFieldById(studyId,
|
||||||
@@ -120,6 +122,7 @@ public class StudyCourseDao extends BaseDao<StudyCourse> {
|
|||||||
now,
|
now,
|
||||||
null,
|
null,
|
||||||
null);
|
null);
|
||||||
|
log.info("saveThreadLog插入成功");
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
log.error("保存线程日志失败", ex);
|
log.error("保存线程日志失败", ex);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -86,6 +86,7 @@ public class StudyServiceImpl implements IStudyService{
|
|||||||
sci.setStudyDuration(0);
|
sci.setStudyDuration(0);
|
||||||
sci.setCourseId(dto.getCourseId());
|
sci.setCourseId(dto.getCourseId());
|
||||||
sci.setCsectionId(dto.getCsectionId());
|
sci.setCsectionId(dto.getCsectionId());
|
||||||
|
log.info("saveStudyInfo进入埋点");
|
||||||
saveThreadLog(dto);
|
saveThreadLog(dto);
|
||||||
}
|
}
|
||||||
//进度状态
|
//进度状态
|
||||||
@@ -529,6 +530,7 @@ public class StudyServiceImpl implements IStudyService{
|
|||||||
now,
|
now,
|
||||||
creatorId,
|
creatorId,
|
||||||
creatorName);
|
creatorName);
|
||||||
|
log.info("saveStudyInfo埋点插入成功");
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
log.error("保存线程日志失败 studyId={}, contentId={}, aid={}", dto.getStudyId(), dto.getContentId(), dto.getAid(), ex);
|
log.error("保存线程日志失败 studyId={}, contentId={}, aid={}", dto.getStudyId(), dto.getContentId(), dto.getAid(), ex);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user