|  | @@ -1,20 +1,14 @@
 | 
	
		
			
				|  |  |  package com.xunmei.core.edu.service.impl;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -import java.io.IOException;
 | 
	
		
			
				|  |  | -import java.io.UnsupportedEncodingException;
 | 
	
		
			
				|  |  | -import java.net.URLEncoder;
 | 
	
		
			
				|  |  | -import java.util.*;
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |  import cn.hutool.core.util.ObjectUtil;
 | 
	
		
			
				|  |  |  import cn.hutool.poi.excel.ExcelUtil;
 | 
	
		
			
				|  |  |  import cn.hutool.poi.excel.ExcelWriter;
 | 
	
		
			
				|  |  | +import com.alibaba.fastjson2.JSON;
 | 
	
		
			
				|  |  |  import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 | 
	
		
			
				|  |  |  import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 | 
	
		
			
				|  |  |  import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 | 
	
		
			
				|  |  | -import com.xunmei.common.core.constant.Constants;
 | 
	
		
			
				|  |  |  import com.xunmei.common.core.constant.ErrorMsgConstants;
 | 
	
		
			
				|  |  |  import com.xunmei.common.core.constant.SecurityConstants;
 | 
	
		
			
				|  |  | -import com.xunmei.common.core.domain.R;
 | 
	
		
			
				|  |  |  import com.xunmei.common.core.domain.edu.domain.SysLearningMaterials;
 | 
	
		
			
				|  |  |  import com.xunmei.common.core.domain.edu.dto.SysLearningMaterialsPageDto;
 | 
	
		
			
				|  |  |  import com.xunmei.common.core.domain.edu.vo.SysLearningMaterialsPageVo;
 | 
	
	
		
			
				|  | @@ -27,7 +21,6 @@ import com.xunmei.core.edu.service.ISysLearningMaterialsService;
 | 
	
		
			
				|  |  |  import com.xunmei.system.api.RemoteOrgService;
 | 
	
		
			
				|  |  |  import com.xunmei.system.api.domain.SysOrg;
 | 
	
		
			
				|  |  |  import com.xunmei.system.api.function.RemoteCallHandlerExecutor;
 | 
	
		
			
				|  |  | -import com.xunmei.system.api.function.RemoteCallHandlerExecutor;
 | 
	
		
			
				|  |  |  import org.springframework.beans.factory.annotation.Autowired;
 | 
	
		
			
				|  |  |  import org.springframework.stereotype.Service;
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -35,10 +28,7 @@ import javax.servlet.ServletOutputStream;
 | 
	
		
			
				|  |  |  import javax.servlet.http.HttpServletResponse;
 | 
	
		
			
				|  |  |  import java.io.IOException;
 | 
	
		
			
				|  |  |  import java.net.URLEncoder;
 | 
	
		
			
				|  |  | -import java.util.ArrayList;
 | 
	
		
			
				|  |  | -import java.util.Arrays;
 | 
	
		
			
				|  |  | -import java.util.Date;
 | 
	
		
			
				|  |  | -import java.util.List;
 | 
	
		
			
				|  |  | +import java.util.*;
 | 
	
		
			
				|  |  |  import java.util.stream.Stream;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  /**
 | 
	
	
		
			
				|  | @@ -81,7 +71,6 @@ public class SysLearningMaterialsServiceImpl extends ServiceImpl<SysLearningMate
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      private void dealParentOrgId(SysLearningMaterialsPageDto sysLearningMaterials) {
 | 
	
		
			
				|  |  |          SysOrg sysOrg = remoteOrgService.selectSysOrgById(sysLearningMaterials.getOrgId(), SecurityConstants.INNER);
 | 
	
		
			
				|  |  | -       // SysOrg sysOrg = r.getData();
 | 
	
		
			
				|  |  |          if (sysOrg == null || ObjectUtil.isEmpty(sysOrg.getPath())) {
 | 
	
		
			
				|  |  |              throw new RuntimeException("机构不存在或机构信息缺失!");
 | 
	
		
			
				|  |  |          }
 | 
	
	
		
			
				|  | @@ -93,13 +82,14 @@ public class SysLearningMaterialsServiceImpl extends ServiceImpl<SysLearningMate
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      public void extractStringFromUrl(SysLearningMaterialsPageVo record) {
 | 
	
		
			
				|  |  | -        if (ObjectUtil.isEmpty(record.getFile()) || !record.getFile().contains(Constants.HTTP)) {
 | 
	
		
			
				|  |  | +        if (ObjectUtil.isEmpty(record.getFileList())) {
 | 
	
		
			
				|  |  |              return;
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  | -        // 获取最后一个斜杠的索引
 | 
	
		
			
				|  |  | -        int lastSlashIndex = record.getFile().lastIndexOf("/");
 | 
	
		
			
				|  |  | +        String fileList = record.getFileList();
 | 
	
		
			
				|  |  | +        List<Map> maps = JSON.parseArray(fileList, Map.class);
 | 
	
		
			
				|  |  | +        String name = maps.get(0).get("name").toString();
 | 
	
		
			
				|  |  |          // 获取最后一个斜杠后面的字符串
 | 
	
		
			
				|  |  | -        record.setFile(record.getFile().substring(lastSlashIndex + 1));
 | 
	
		
			
				|  |  | +        record.setFileList(name);
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      /**
 | 
	
	
		
			
				|  | @@ -137,8 +127,7 @@ public class SysLearningMaterialsServiceImpl extends ServiceImpl<SysLearningMate
 | 
	
		
			
				|  |  |          sysLearningMaterials.setUpdateBy(String.valueOf(SecurityUtils.getUserId()));
 | 
	
		
			
				|  |  |          sysLearningMaterials.setUpdateTime(DateUtils.getNowDate());
 | 
	
		
			
				|  |  |          sysLearningMaterials.setIsOpen(0);
 | 
	
		
			
				|  |  | -         SysOrg sysOrg = remoteOrgService.selectSysOrgById(sysLearningMaterials.getOrgId(), SecurityConstants.INNER);
 | 
	
		
			
				|  |  | -       // SysOrg sysOrg = r.getData();
 | 
	
		
			
				|  |  | +        SysOrg sysOrg = remoteOrgService.selectSysOrgById(sysLearningMaterials.getOrgId(), SecurityConstants.INNER);
 | 
	
		
			
				|  |  |          if (sysOrg != null) {
 | 
	
		
			
				|  |  |              sysLearningMaterials.setOrgName(sysOrg.getName());
 | 
	
		
			
				|  |  |              sysLearningMaterials.setOrgPath(sysOrg.getPath());
 |