派生自 projectDept/qhighschool

EricsHu
2022-12-05 068fc7f2e81178e55fa191a13709af64b1a163f6
src/main/java/com/qxueyou/scc/teach/res/service/impl/ResService.java
@@ -30,9 +30,9 @@
import com.qxueyou.scc.teach.subject.service.impl.SubjectLectureService;
/**
 * 资源服务
 * 资源服务
 *
 * @author 夏德虎
 * @author 夏德虎
 */
@Service
public class ResService extends CommonAppService implements IResService {
@@ -51,7 +51,7 @@
    private IClassLectureService classLectureService;
    /**
     * 各类型资源服务实现
     * 各类型资源服务实现
     */
    private Map<String, IResItemService> resItemServiceMap = new HashMap<String, IResItemService>(6);
@@ -157,7 +157,7 @@
    }
    /**
     * @param resId 资源id
     * @param resId 资源id
     * @return
     */
    private Result delete(String resId) {
@@ -312,7 +312,7 @@
        if(Res.FILE_TYPE_DOC.equals(res.getType())) {
            return new Result(true, "success",
                     CollectionUtils.newObjectMap("path", path, "name", res.getName(), "coverPageUrl", res.getCoverPageUrl(), "size",
                           this.classLectureService.readDocPageCount(res.getItemDestId())));//文件的页数
                           this.classLectureService.readDocPageCount(res.getItemDestId())));//文件的页数
        }else {
            return new Result(true, "success",
                     CollectionUtils.newObjectMap("path", path, "name", res.getName(), "coverPageUrl", res.getCoverPageUrl(), "size", 0));
@@ -360,7 +360,7 @@
    public Result deleteDir(String[] dirIds) {
        for (String dirId : dirIds) {
            deleteFile4Dir(dirId);// 删除对应的文件
            deleteFile4Dir(dirId);// 删除对应的文件
            deleteDir(dirId);
        }
@@ -379,9 +379,9 @@
    }
    /**
     * 删除资源库文件夹对应删除文件
     * 删除资源库文件夹对应删除文件
     *
     * @param dirId 文件夹id
     * @param dirId 文件夹id
     */
    @Override
    public void deleteFile4Dir(String dirId) {
@@ -393,7 +393,7 @@
    @Override
    public ResDir doGetRootDir(String type, String ownerId) {
        ResLib lib = getResLib(type, ownerId);
        // 无资源库则初始化,并返回根节点
        // 无资源库则初始化,并返回根节点
        if (lib == null) {
            Result result = initResLib(type, ownerId);
            return read(ResDir.class, result.getDataT("rootDirId"));
@@ -411,11 +411,11 @@
    private List<ResDir> doGetChildDirsInner(String parentDirId, String type) {
        // 根节点的处理
        // 根节点的处理
        if (StringUtils.isEmpty(parentDirId)) {
            ResLib lib = getResLib(type, ClientUtils.getUserId());
            // 无资源库则初始化,并返回根节点
            // 无资源库则初始化,并返回根节点
            if (lib == null) {
                Result result = initUserLib();
                return CollectionUtils.newList(ResDir.class, read(ResDir.class, result.getDataT("rootDirId")));
@@ -454,7 +454,7 @@
        if (lib == null) {
            Result result = addDir(RES_DIR_ROOT, "根目录");
            Result result = addDir(RES_DIR_ROOT, "根目录");
            lib = new ResLib();
@@ -501,7 +501,7 @@
    }
    /**
     * 定时器监控转码完成后设置同步res表的状态
     * 定时器监控转码完成后设置同步res表的状态
     */
    @Scheduled(cron = "0/2 * * * * ?")
    public void doTimer() {