|
|
@@ -20,6 +20,7 @@ import com.qcloud.cos.auth.BasicCOSCredentials;
|
|
|
import com.qcloud.cos.auth.COSCredentials;
|
|
|
import com.qcloud.cos.model.ObjectMetadata;
|
|
|
import com.qcloud.cos.region.Region;
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
@@ -32,6 +33,7 @@ import java.time.ZoneId;
|
|
|
import java.util.*;
|
|
|
|
|
|
@Component("videoTask")
|
|
|
+@Slf4j
|
|
|
public class VideoTask {
|
|
|
private final Logger logger = LoggerFactory.getLogger(this.getClass());
|
|
|
private static final String YL_SECRET_ID = "AKIDiMq9lDf2EOM9lIfqqfKo7FNgM5meD0sT";
|
|
|
@@ -269,28 +271,29 @@ public class VideoTask {
|
|
|
public void reissueFinishVideoIntegral() {
|
|
|
List<FsCourseWatchLog> watchingLogs = courseWatchLogMapper.findWatchLogsIdExitAndFinish();
|
|
|
//查询积分记录 是否存在
|
|
|
- for (FsCourseWatchLog log : watchingLogs) {
|
|
|
+ for (FsCourseWatchLog watchingLog : watchingLogs) {
|
|
|
FsUserIntegralLogs queryParam = new FsUserIntegralLogs();
|
|
|
- queryParam.setUserId(log.getUserId());
|
|
|
- queryParam.setBusinessId(log.getLogId().toString());
|
|
|
+ queryParam.setUserId(watchingLog.getUserId());
|
|
|
+ queryParam.setBusinessId(watchingLog.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.setVideoId(watchingLog.getVideoId());
|
|
|
+ param.setQwUserId(watchingLog.getQwUserId().toString());
|
|
|
+ param.setCompanyUserId(watchingLog.getCompanyUserId());
|
|
|
+ param.setCompanyId(watchingLog.getCompanyId());
|
|
|
+ param.setCourseId(watchingLog.getCourseId());
|
|
|
+ param.setQwExternalId(watchingLog.getQwExternalContactId());
|
|
|
+ param.setSource(watchingLog.getWatchType() == 2?2:1);
|
|
|
+ param.setSendType(watchingLog.getSendType());
|
|
|
+ param.setPeriodId(watchingLog.getPeriodId());
|
|
|
+ param.setUserId(watchingLog.getUserId());
|
|
|
param.setAppId("");
|
|
|
courseVideoService.sendRewardByFsUser(param);
|
|
|
+ log.info("补发积分 userId:{},watchLogsId:{}",watchingLog.getUserId(),watchingLog.getLogId());
|
|
|
}
|
|
|
}
|
|
|
}
|