|
|
@@ -2,6 +2,7 @@ package com.zhongzheng.modules.course.service.impl;
|
|
|
|
|
|
import cn.hutool.core.bean.BeanUtil;
|
|
|
import cn.hutool.core.lang.Validator;
|
|
|
+import com.alibaba.fastjson.JSON;
|
|
|
import com.baomidou.dynamic.datasource.annotation.DS;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
|
|
|
@@ -151,7 +152,6 @@ public class CourseHandoutsServiceImpl extends ServiceImpl<CourseHandoutsMapper,
|
|
|
|
|
|
|
|
|
@Override
|
|
|
- @Transactional(rollbackFor = Exception.class)
|
|
|
public boolean updateHandouts(String fromPath, CourseHandoutsEditBo bo) {
|
|
|
log.error("修改讲义更新数据库讲义业务关系开始3:"+ DateUtils.getNowTime());
|
|
|
CourseHandouts update = BeanUtil.toBean(bo, CourseHandouts.class);
|
|
|
@@ -186,6 +186,7 @@ public class CourseHandoutsServiceImpl extends ServiceImpl<CourseHandoutsMapper,
|
|
|
|
|
|
private void handleFile(List<CourseFileAddBo> fileList, Long handoutsId, String fromPath, Long parentId) {
|
|
|
fileList.forEach(bo -> {
|
|
|
+ log.error("讲义文件执行:"+ DateUtils.getNowTime()+","+ JSON.toJSONString(bo));
|
|
|
Long fileId = 0L;
|
|
|
if (ObjectUtils.isNull(bo.getFileId())) {
|
|
|
//新增讲义
|
|
|
@@ -213,6 +214,7 @@ public class CourseHandoutsServiceImpl extends ServiceImpl<CourseHandoutsMapper,
|
|
|
return matchingFile(addFileName, handoutsId, fileId,fromPath);
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
+ log.error("解压/上传zip包失败:"+ e.getMessage());
|
|
|
throw new CustomException("解压/上传zip包失败");
|
|
|
}
|
|
|
} else {
|
|
|
@@ -241,6 +243,7 @@ public class CourseHandoutsServiceImpl extends ServiceImpl<CourseHandoutsMapper,
|
|
|
return courseFile.getFileId();
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
+ log.error("上传文件失败:"+ e.getMessage());
|
|
|
throw new CustomException("上传文件失败");
|
|
|
}
|
|
|
}
|