|
|
@@ -61,6 +61,8 @@ import org.apache.http.entity.StringEntity;
|
|
|
import org.apache.http.impl.client.CloseableHttpClient;
|
|
|
import org.apache.http.impl.client.HttpClients;
|
|
|
import org.apache.http.util.EntityUtils;
|
|
|
+import org.slf4j.Logger;
|
|
|
+import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
@@ -89,6 +91,7 @@ import static com.fs.sop.service.impl.SopUserLogsInfoServiceImpl.convertStringTo
|
|
|
@Slf4j
|
|
|
public class FsCourseLinkServiceImpl implements IFsCourseLinkService
|
|
|
{
|
|
|
+ private static final Logger logger = LoggerFactory.getLogger(FsCourseLinkServiceImpl.class);
|
|
|
@Autowired
|
|
|
private FsCourseLinkMapper fsCourseLinkMapper;
|
|
|
@Autowired
|
|
|
@@ -939,13 +942,17 @@ public class FsCourseLinkServiceImpl implements IFsCourseLinkService
|
|
|
if (log == null) {
|
|
|
return R.error("未找到看课记录");
|
|
|
}
|
|
|
- if (log.getClickCount() == null) {
|
|
|
- log.setClickCount(1);
|
|
|
- } else {
|
|
|
- log.setClickCount(log.getClickCount() + 1);
|
|
|
+ try {
|
|
|
+ if (log.getClickCount() == null) {
|
|
|
+ log.setClickCount(1);
|
|
|
+ } else {
|
|
|
+ log.setClickCount(log.getClickCount() + 1);
|
|
|
+ }
|
|
|
+ //更新点击次数
|
|
|
+ fsCourseWatchLogMapper.updateFsCourseWatchLog(log);
|
|
|
+ } catch (Exception e) {
|
|
|
+ logger.error("更新点击次数失败:{}", e.getMessage());
|
|
|
}
|
|
|
- //更新点击次数
|
|
|
- fsCourseWatchLogMapper.updateFsCourseWatchLog(log);
|
|
|
// 根据
|
|
|
List<FsCourseLink> list = fsCourseLinkMapper.selectLinkByCourseIdAndExIdAndQwUserId(log.getCourseId(),log.getVideoId(),log.getQwExternalContactId(),log.getQwUserId().toString());
|
|
|
if(list.isEmpty()){
|