|
|
@@ -932,9 +932,20 @@ public class FsCourseLinkServiceImpl implements IFsCourseLinkService
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
+ @Transactional
|
|
|
public R getLinkInfo(Long logId) {
|
|
|
-
|
|
|
FsCourseWatchLog log = fsCourseWatchLogMapper.selectById(logId);
|
|
|
+
|
|
|
+ if (log == null) {
|
|
|
+ return R.error("未找到看课记录");
|
|
|
+ }
|
|
|
+ if (log.getClickCount() == null) {
|
|
|
+ log.setClickCount(1);
|
|
|
+ } else {
|
|
|
+ log.setClickCount(log.getClickCount() + 1);
|
|
|
+ }
|
|
|
+ //更新点击次数
|
|
|
+ fsCourseWatchLogMapper.update(log,new QueryWrapper<FsCourseWatchLog>().eq("id",logId));
|
|
|
// 根据
|
|
|
List<FsCourseLink> list = fsCourseLinkMapper.selectLinkByCourseIdAndExIdAndQwUserId(log.getCourseId(),log.getVideoId(),log.getQwExternalContactId(),log.getQwUserId().toString());
|
|
|
if(list.isEmpty()){
|