瀏覽代碼

作者:张哲
时间:2023/08/30
类型:优化
描述:正式环境修改bug

zizg 1 年之前
父節點
當前提交
9f1c121513

+ 6 - 0
src/main/java/com/redxun/knowledge/album/service/AlbumInfoServiceImpl.java

@@ -680,6 +680,12 @@ public class AlbumInfoServiceImpl extends SuperServiceImpl<AlbumInfoMapper, Albu
         String userId = userService.queryLoginUser();
         String albumId = albumInfoEditDto.getPkId();
         AlbumInfo albumInfo = albumInfoMapper.selectById(albumId);
+        //是否在重复编辑(存在审核中的版本)
+        AlbumVersion albumVersion1 = albumVersionMapper.
+                selectOne(new QueryWrapper<AlbumVersion>().eq("ALBUM_ID", albumId).eq("STATE", 1));
+        if (albumVersion1 != null){
+            return "当前专辑正在审核中,编辑失败!";
+        }
         if (userId.equals(albumInfo.getOwnerId())) {
             //修改专辑信息表
             AlbumInfo albumInfoEdit = new AlbumInfo();

+ 1 - 0
src/main/java/com/redxun/knowledge/service/KnowledgeServiceImpl.java

@@ -477,6 +477,7 @@ public class KnowledgeServiceImpl extends SuperServiceImpl<KnowledgeMapper, Know
             entity.setApprovalStatus(1);
             entity.setViews(0);
             entity.setApprovalBatch(knowledge.getApprovalBatch() + 1);
+            entity.setCreateBy(knowledge.getCreateBy());
             //删除原有的审批节点
             knowledgeApproveMapper.deleteByKnowledgeId(entity.getPkId());
             //重新拉取审核节点