|
|
@@ -5,9 +5,14 @@ import com.fs.common.core.redis.RedisCache;
|
|
|
import com.fs.course.config.CourseConfig;
|
|
|
import com.fs.course.domain.*;
|
|
|
import com.fs.course.mapper.*;
|
|
|
+import com.fs.course.param.FsCourseSendRewardUParam;
|
|
|
import com.fs.course.service.IFsCourseTrafficLogService;
|
|
|
+import com.fs.course.service.IFsUserCourseVideoService;
|
|
|
import com.fs.course.service.IFsUserVideoCommentService;
|
|
|
import com.fs.his.domain.FsUser;
|
|
|
+import com.fs.his.domain.FsUserIntegralLogs;
|
|
|
+import com.fs.his.enums.FsUserIntegralLogTypeEnum;
|
|
|
+import com.fs.his.mapper.FsUserIntegralLogsMapper;
|
|
|
import com.fs.his.mapper.FsUserMapper;
|
|
|
import com.qcloud.cos.COSClient;
|
|
|
import com.qcloud.cos.ClientConfig;
|
|
|
@@ -59,6 +64,10 @@ public class VideoTask {
|
|
|
|
|
|
@Autowired
|
|
|
private IFsCourseTrafficLogService iFsCourseTrafficLogService;
|
|
|
+ @Autowired
|
|
|
+ private FsUserIntegralLogsMapper fsUserIntegralLogsMapper;
|
|
|
+ @Autowired
|
|
|
+ private IFsUserCourseVideoService courseVideoService;
|
|
|
|
|
|
public void autoNotShowVideo() {
|
|
|
List<Long> list = videoMapper.selectNotAuditVideo();
|
|
|
@@ -254,4 +263,36 @@ public class VideoTask {
|
|
|
iFsCourseTrafficLogService.saveCourseTrafficLog();
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 补发完课积分
|
|
|
+ */
|
|
|
+ public void reissueFinishVideoIntegral() {
|
|
|
+ List<FsCourseWatchLog> watchingLogs = courseWatchLogMapper.findWatchLogsIdExitAndFinish();
|
|
|
+ //查询积分记录 是否存在
|
|
|
+ for (FsCourseWatchLog log : watchingLogs) {
|
|
|
+ FsUserIntegralLogs queryParam = new FsUserIntegralLogs();
|
|
|
+ queryParam.setUserId(log.getUserId());
|
|
|
+ queryParam.setBusinessId(log.getLogId().toString());
|
|
|
+ queryParam.setLogType(FsUserIntegralLogTypeEnum.TYPE_17.getValue());
|
|
|
+ //查询积分记录 是否存在
|
|
|
+ Long num = fsUserIntegralLogsMapper.selectFsUserIntegralLogsListCOUNT(queryParam);
|
|
|
+ if (num == null || num == 0){
|
|
|
+ FsCourseSendRewardUParam param = new FsCourseSendRewardUParam();
|
|
|
+ param.setIsAuto(1);
|
|
|
+ param.setVideoId(log.getVideoId());
|
|
|
+ param.setQwUserId(log.getQwUserId().toString());
|
|
|
+ param.setCompanyUserId(log.getCompanyUserId());
|
|
|
+ param.setCompanyId(log.getCompanyId());
|
|
|
+ param.setCourseId(log.getCourseId());
|
|
|
+ param.setQwExternalId(log.getQwExternalContactId());
|
|
|
+ param.setSource(log.getWatchType() == 2?2:1);
|
|
|
+ param.setSendType(log.getSendType());
|
|
|
+ param.setPeriodId(log.getPeriodId());
|
|
|
+ param.setUserId(log.getUserId());
|
|
|
+ param.setAppId("");
|
|
|
+ courseVideoService.sendRewardByFsUser(param);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
}
|