|
@@ -1,6 +1,5 @@
|
|
|
package com.redxun.knowledge.album.service;
|
|
|
|
|
|
-import cn.hutool.core.util.StrUtil;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
@@ -10,7 +9,6 @@ import com.redxun.common.base.db.BaseDao;
|
|
|
import com.redxun.common.base.db.BaseService;
|
|
|
import com.redxun.common.base.db.PageHelper;
|
|
|
import com.redxun.common.base.search.QueryFilter;
|
|
|
-import com.redxun.common.model.JPaasUser;
|
|
|
import com.redxun.common.service.impl.SuperServiceImpl;
|
|
|
import com.redxun.common.tool.IdGenerator;
|
|
|
import com.redxun.common.tool.StringUtils;
|
|
@@ -22,16 +20,10 @@ import com.redxun.knowledge.album.entity.enums.AlbumInfoEnum;
|
|
|
import com.redxun.knowledge.album.entity.enums.AlbumVersionEnum;
|
|
|
import com.redxun.knowledge.album.entity.vo.*;
|
|
|
import com.redxun.knowledge.album.mapper.*;
|
|
|
-import com.redxun.knowledge.analysis.entity.vo.KnowledgeCompanyVo;
|
|
|
import com.redxun.knowledge.common.UserService;
|
|
|
import com.redxun.knowledge.entity.dao.ActionLog;
|
|
|
-import com.redxun.knowledge.entity.dao.Knowledge;
|
|
|
-import com.redxun.knowledge.entity.vo.KnowledgeCategoryAdminVo;
|
|
|
import com.redxun.knowledge.mapper.ActionLogMapper;
|
|
|
-import com.redxun.knowledge.service.KnowledgeCategoryServiceImpl;
|
|
|
-import com.redxun.knowledge.service.KnowledgeServiceImpl;
|
|
|
import com.redxun.knowledge.utils.PageListUtils;
|
|
|
-import com.sun.xml.bind.v2.TODO;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -39,7 +31,6 @@ import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
-import java.io.Serializable;
|
|
|
import java.util.*;
|
|
|
import java.util.concurrent.CompletableFuture;
|
|
|
import java.util.concurrent.ThreadPoolExecutor;
|
|
@@ -476,11 +467,13 @@ public class AlbumInfoServiceImpl extends SuperServiceImpl<AlbumInfoMapper, Albu
|
|
|
//清除原有数据
|
|
|
albumApprovalNodeService.deleteAll();
|
|
|
//批量插入数据
|
|
|
+ AtomicInteger i = new AtomicInteger(1);
|
|
|
List<AlbumApprovalNode> albumApprovalNodeList = albumApprovalNodeDto1.stream().map(e -> {
|
|
|
AlbumApprovalNode albumApprovalNode = new AlbumApprovalNode();
|
|
|
albumApprovalNode.setPkId(IdGenerator.getIdStr());
|
|
|
BeanUtils.copyProperties(e, albumApprovalNode);
|
|
|
albumApprovalNode.setCreateBy(e.getCreateBy());
|
|
|
+ albumApprovalNode.setSort(i.getAndIncrement());
|
|
|
return albumApprovalNode;
|
|
|
|
|
|
}).collect(Collectors.toList());
|
|
@@ -494,11 +487,13 @@ public class AlbumInfoServiceImpl extends SuperServiceImpl<AlbumInfoMapper, Albu
|
|
|
//清除原有数据
|
|
|
albumYelpApprovalNodeService.deleteAll();
|
|
|
//批量插入数据
|
|
|
+ AtomicInteger i = new AtomicInteger(1);
|
|
|
List<AlbumYelpApprovalNode> albumYelpApprovalNodeList = albumApprovalNodeDto2.stream().map(e -> {
|
|
|
AlbumYelpApprovalNode albumYelpApprovalNode = new AlbumYelpApprovalNode();
|
|
|
albumYelpApprovalNode.setPkId(IdGenerator.getIdStr());
|
|
|
BeanUtils.copyProperties(e, albumYelpApprovalNode);
|
|
|
albumYelpApprovalNode.setCreateBy(e.getCreateBy());
|
|
|
+ albumYelpApprovalNode.setSort(i.getAndIncrement());
|
|
|
return albumYelpApprovalNode;
|
|
|
}).collect(Collectors.toList());
|
|
|
albumYelpApprovalNodeService.saveBatch(albumYelpApprovalNodeList);
|
|
@@ -755,7 +750,7 @@ public class AlbumInfoServiceImpl extends SuperServiceImpl<AlbumInfoMapper, Albu
|
|
|
albumApproveService.deleteByVersionId(versionId);
|
|
|
//拉取专辑审核节点表
|
|
|
List<AlbumApprovalNode> albumApprovalNodeList = albumApprovalNodeService.
|
|
|
- findAll(new QueryWrapper<AlbumApprovalNode>().orderByAsc("IS_FINAL", "CREATE_TIME_"));
|
|
|
+ findAll(new QueryWrapper<AlbumApprovalNode>().orderByAsc("IS_FINAL","SORT", "CREATE_TIME_"));
|
|
|
//将版本推送至专辑审核表中(各个节点都推送)
|
|
|
AtomicInteger sort = new AtomicInteger(1);
|
|
|
List<AlbumApprove> albumApproveList = albumApprovalNodeList.stream().map(albumApprovalNode -> {
|