|
|
@ -61,6 +61,7 @@ import org.springframework.beans.BeanUtils; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.beans.factory.annotation.Value; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.transaction.annotation.Propagation; |
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
import org.springframework.util.CollectionUtils; |
|
|
|
|
|
|
@ -850,7 +851,7 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit |
|
|
|
baseDao.insert(article); |
|
|
|
if(null != draftContents && draftContents.size() > NumConstant.ZERO){ |
|
|
|
draftContents.forEach(content -> { |
|
|
|
content.setAuditStatus(ModuleConstant.AUDIT_STATUS_PASS); |
|
|
|
//content.setAuditStatus(ModuleConstant.AUDIT_STATUS_PASS);
|
|
|
|
|
|
|
|
content.setOrderNum(content.getOrderNum()); |
|
|
|
ArticleContentEntity contentToInsert = ConvertUtils.sourceToTarget(content,ArticleContentEntity.class); |
|
|
@ -858,7 +859,7 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit |
|
|
|
contentToInsert.setId(null); |
|
|
|
articleContentDao.insert(contentToInsert); |
|
|
|
|
|
|
|
draftContentDao.updateById(content); |
|
|
|
//draftContentDao.updateById(content);
|
|
|
|
}); |
|
|
|
} |
|
|
|
if(null != draftPublishRange && draftPublishRange.size() > NumConstant.ZERO){ |
|
|
@ -869,14 +870,14 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit |
|
|
|
articlePublishRangeDao.insert(rangeToInsert); |
|
|
|
}); |
|
|
|
if(null != draftCover){ |
|
|
|
draftCover.setAuditStatus(ModuleConstant.AUDIT_STATUS_PASS); |
|
|
|
//draftCover.setAuditStatus(ModuleConstant.AUDIT_STATUS_PASS);
|
|
|
|
|
|
|
|
ArticleCoverEntity coverToInsert = ConvertUtils.sourceToTarget(draftCover,ArticleCoverEntity.class); |
|
|
|
coverToInsert.setArticleId(article.getId()); |
|
|
|
coverToInsert.setId(null); |
|
|
|
articleCoverDao.insert(coverToInsert); |
|
|
|
|
|
|
|
draftCoverDao.updateById(draftCover); |
|
|
|
//draftCoverDao.updateById(draftCover);
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@ -986,12 +987,12 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit |
|
|
|
this.sendMsg(draftEntity.getTitle(), String.format(ModuleConstant.MSG_ARTICLE_PUBLISH_ERROR, draftEntity.getTitle())); |
|
|
|
this.updateDraftPublishStatus(draftId, DraftConstant.AUDITFAIL); |
|
|
|
} |
|
|
|
log.debug("scanContent result", JSON.toJSONString(result)); |
|
|
|
log.debug("scanContent result:{}", JSON.toJSONString(result)); |
|
|
|
return result; |
|
|
|
} |
|
|
|
@Override |
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
public void scanAllPassPublishArticle(TokenDto tokenDto, String draftId){ |
|
|
|
@Transactional(rollbackFor = Exception.class,propagation = Propagation.REQUIRED) |
|
|
|
public void scanAllPassPublishArticle(TokenDto tokenDto, String draftId, SyncScanResult syncScanResult){ |
|
|
|
|
|
|
|
DraftEntity draft = draftDao.selectById(draftId); |
|
|
|
if (draft == null) { |
|
|
@ -1000,6 +1001,7 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit |
|
|
|
} |
|
|
|
try { |
|
|
|
//审核通过
|
|
|
|
updateAuditStatusFailById(draftId, syncScanResult); |
|
|
|
this.publishDraftToArticle(draft); |
|
|
|
UpdateCustomerTagCacheDTO updateCustomerTagCacheDTO = this.updateCustomerTag(tokenDto, draftId); |
|
|
|
List<UpdateGridTagCacheDTO> updateGridTagCacheDTOS = this.updateGridTag(tokenDto, draftId, updateCustomerTagCacheDTO); |
|
|
|