|
|
@@ -9,6 +9,7 @@ import com.alibaba.fastjson.JSONArray;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
+import com.fs.common.BeanCopyUtils;
|
|
|
import com.fs.common.core.redis.RedisCache;
|
|
|
import com.fs.common.utils.DateUtils;
|
|
|
import com.fs.common.utils.DictUtils;
|
|
|
@@ -1343,8 +1344,27 @@ public class FsCourseWatchLogServiceImpl extends ServiceImpl<FsCourseWatchLogMap
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public List<FsCoureseWatchLogVO> selectAppIdList(FsCourseWatchLogParam fsCourseWatchLog) {
|
|
|
- return fsCourseWatchLogMapper.selectAppIdList(fsCourseWatchLog);
|
|
|
+ public List<StatisticsTable> selectAppIdList() {
|
|
|
+ List<FsCoureseWatchLogVO> fsCoureseWatchLogVOS = fsCourseWatchLogMapper.selectAppIdList();
|
|
|
+ List<StatisticsTable> resultList = new ArrayList<>(fsCoureseWatchLogVOS.size());
|
|
|
+ if (CollectionUtil.isNotEmpty(fsCoureseWatchLogVOS)) {
|
|
|
+
|
|
|
+ fsCoureseWatchLogVOS.stream()
|
|
|
+ .filter(Objects::nonNull) // 过滤null值
|
|
|
+ .forEach(vo -> {
|
|
|
+ try {
|
|
|
+ StatisticsTable table = new StatisticsTable();
|
|
|
+ BeanCopyUtils.copy(vo, table);
|
|
|
+ table.setCreateTime(new Date());
|
|
|
+ table.setUpdateTime(new Date());
|
|
|
+ resultList.add(table);
|
|
|
+ } catch (Exception e) {
|
|
|
+ // 记录日志,不中断处理
|
|
|
+ log.warn("Bean拷贝失败,跳过该记录: {}", vo, e);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ return resultList;
|
|
|
}
|
|
|
@Override
|
|
|
public List<FsCoureseWatchLogVO> selectUserIdList(FsCourseWatchLogParam fsCourseWatchLog) {
|