|
|
@@ -1,5 +1,6 @@
|
|
|
package com.xunmei.core.panel.service.impl;
|
|
|
|
|
|
+import com.alibaba.fastjson2.JSONObject;
|
|
|
import com.google.common.collect.Lists;
|
|
|
|
|
|
import cn.hutool.core.date.DateUtil;
|
|
|
@@ -13,6 +14,7 @@ import com.xunmei.common.core.domain.edu.dto.SysLearningMaterialsPageDto;
|
|
|
import com.xunmei.common.core.domain.edu.vo.SysLearningMaterialsPageVo;
|
|
|
import com.xunmei.common.core.domain.letter.dto.CoreIntroduceLetterApproveRequestDto;
|
|
|
import com.xunmei.common.core.domain.message.dto.CoreAnnouncementNotificationAppPageDto;
|
|
|
+import com.xunmei.common.core.domain.message.vo.FileObject;
|
|
|
import com.xunmei.common.core.domain.message.vo.MessageAppPageVo;
|
|
|
import com.xunmei.common.core.domain.panel.adapter.PanelAdapter;
|
|
|
import com.xunmei.common.core.domain.panel.dto.PanelListDto;
|
|
|
@@ -288,10 +290,11 @@ public class PanelServiceImpl implements PanelService {
|
|
|
req.setOrgId(sysOrg.getId());
|
|
|
final TableDataInfo tableDataInfo = materialsService.selectPage(req);
|
|
|
final List<SysLearningMaterialsPageVo> rows = tableDataInfo.getRows();
|
|
|
+ List<SysLearningMaterialsPageVo> resultList=new ArrayList<>();
|
|
|
if (ObjectUtil.isEmpty(rows)) {
|
|
|
hashMap.put("index2", new ArrayList<>());
|
|
|
} else {
|
|
|
- List<String> fileLit = new ArrayList<>();
|
|
|
+// List<String> fileLit = new ArrayList<>();
|
|
|
for (SysLearningMaterialsPageVo vo : rows) {
|
|
|
if(vo.getIsOpen().equals(0))
|
|
|
{
|
|
|
@@ -301,17 +304,23 @@ public class PanelServiceImpl implements PanelService {
|
|
|
if (ObjectUtil.isEmpty(json)) {
|
|
|
continue;
|
|
|
}
|
|
|
- final List<String> list = JSON.parseArray(json, String.class);
|
|
|
- for (String str : list) {
|
|
|
- final Map map = JSON.parseObject(str, Map.class);
|
|
|
- map.put("createTime", vo.getCreateTime());
|
|
|
-
|
|
|
- fileLit.add(JSON.toJSONString(map));
|
|
|
+ List<FileObject> objects = new ArrayList<>();
|
|
|
+ List<String> lista = com.alibaba.fastjson2.JSON.parseArray(json, String.class);
|
|
|
+ for(String str:lista){
|
|
|
+ FileObject object = JSONObject.parseObject(str,FileObject.class);
|
|
|
+ objects.add(object);
|
|
|
}
|
|
|
-
|
|
|
-// fileLit.addAll(list);
|
|
|
+ vo.setFileObjectList(objects);
|
|
|
+ resultList.add(vo);
|
|
|
+// final List<String> list = JSON.parseArray(json, String.class);
|
|
|
+// for (String str : list) {
|
|
|
+// final Map map = JSON.parseObject(str, Map.class);
|
|
|
+// map.put("createTime", vo.getCreateTime());
|
|
|
+//
|
|
|
+// fileLit.add(JSON.toJSONString(map));
|
|
|
+// }
|
|
|
}
|
|
|
- hashMap.put("index2", fileLit);
|
|
|
+ hashMap.put("index2", resultList);
|
|
|
}
|
|
|
}
|
|
|
}
|