Kaynağa Gözat

feat:添加内容库

zhaohaipeng 3 hafta önce
ebeveyn
işleme
094ce9a079

+ 4 - 0
supply-demand-engine-core/src/main/java/com/tzld/piaoquan/sde/service/impl/ContentProfileServiceImpl.java

@@ -3,6 +3,7 @@ package com.tzld.piaoquan.sde.service.impl;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.tzld.piaoquan.sde.common.enums.ContentProfileStageEnum;
 import com.tzld.piaoquan.sde.common.enums.ContentTypeEnum;
+import com.tzld.piaoquan.sde.common.enums.IsDeleteEnum;
 import com.tzld.piaoquan.sde.mapper.ContentProfileMapper;
 import com.tzld.piaoquan.sde.mapper.SdExecutionTaskContentMapper;
 import com.tzld.piaoquan.sde.model.dto.deconstruction.QueryResponseDataDTO;
@@ -35,6 +36,7 @@ public class ContentProfileServiceImpl implements ContentProfileService {
         LambdaQueryWrapper<ContentProfile> wrapper = new LambdaQueryWrapper<>();
         wrapper.eq(ContentProfile::getContentId, contentId);
         wrapper.eq(ContentProfile::getStage, stageEnum.getValue());
+        wrapper.eq(ContentProfile::getIsDeleted, IsDeleteEnum.NORMAL.getValue());
         return contentProfileMapper.selectOne(wrapper);
     }
 
@@ -45,9 +47,11 @@ public class ContentProfileServiceImpl implements ContentProfileService {
         }
         ContentProfile profile = this.findContentProfileByIdAndStage(contentProfile.getContentId(), ContentProfileStageEnum.getByValue(contentProfile.getStage()));
         if (Objects.isNull(profile)) {
+            profile.setIsDeleted(IsDeleteEnum.NORMAL.getValue());
             contentProfileMapper.insert(contentProfile);
         } else {
             contentProfile.setId(profile.getId());
+            profile.setIsDeleted(IsDeleteEnum.NORMAL.getValue());
             contentProfileMapper.updateById(contentProfile);
         }
     }