|
@@ -101,7 +101,7 @@ public class uniPush2ServiceImpl implements uniPush2Service {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
- public void pushUnfinishedCourse(Long userId, Long courseId, Long videoId, String purl) {
|
|
|
|
|
|
|
+ public boolean pushUnfinishedCourse(Long userId, Long courseId, Long videoId, String purl) {
|
|
|
try {
|
|
try {
|
|
|
FsUserCourse course = fsUserCourseMapper.selectFsUserCourseByCourseId(courseId);
|
|
FsUserCourse course = fsUserCourseMapper.selectFsUserCourseByCourseId(courseId);
|
|
|
FsUserCourseVideo video = fsUserCourseVideoMapper.selectFsUserCourseVideoByVideoId(videoId);
|
|
FsUserCourseVideo video = fsUserCourseVideoMapper.selectFsUserCourseVideoByVideoId(videoId);
|
|
@@ -113,7 +113,7 @@ public class uniPush2ServiceImpl implements uniPush2Service {
|
|
|
PushReqBean param = getImParam(userId, purl, title, content, 1f, PushLogDesTypeEnum.STUDY_COURSE.getValue(), "");
|
|
PushReqBean param = getImParam(userId, purl, title, content, 1f, PushLogDesTypeEnum.STUDY_COURSE.getValue(), "");
|
|
|
if (param == null) {
|
|
if (param == null) {
|
|
|
log.warn("未完课课程信息单推取消,用户无有效推送标识或参数非法 userId:{} courseId:{} videoId:{}", userId, courseId, videoId);
|
|
log.warn("未完课课程信息单推取消,用户无有效推送标识或参数非法 userId:{} courseId:{} videoId:{}", userId, courseId, videoId);
|
|
|
- return;
|
|
|
|
|
|
|
+ return false;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
param.setForce_notification(true);
|
|
param.setForce_notification(true);
|
|
@@ -136,8 +136,10 @@ public class uniPush2ServiceImpl implements uniPush2Service {
|
|
|
pushLog.setBusinessId(videoId != null ? videoId : courseId);
|
|
pushLog.setBusinessId(videoId != null ? videoId : courseId);
|
|
|
pushLog.setCreateTime(DateUtils.getNowDate());
|
|
pushLog.setCreateTime(DateUtils.getNowDate());
|
|
|
logService.insertUniPushLog(PushUtils.returnMsg(pushResult, pushLog));
|
|
logService.insertUniPushLog(PushUtils.returnMsg(pushResult, pushLog));
|
|
|
|
|
+ return true;
|
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
|
log.error("未完课课程信息单推异常 userId:{} courseId:{} videoId:{}", userId, courseId, videoId, e);
|
|
log.error("未完课课程信息单推异常 userId:{} courseId:{} videoId:{}", userId, courseId, videoId, e);
|
|
|
|
|
+ return false;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|