| 
						
						
							
								
							
						
						
					 | 
					@ -209,10 +209,8 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
							String draftId = draftEntity.getId(); | 
					 | 
					 | 
							String draftId = draftEntity.getId(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
							fromDTO.setDraftId(draftId); | 
					 | 
					 | 
							fromDTO.setDraftId(draftId); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
							draftContentList = buildDraftContent(tokenDto, fromDTO); | 
					 | 
					 | 
							draftContentList = buildDraftContent(tokenDto, fromDTO); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					
 | 
					 | 
					 | 
							//物理删除 草稿内容
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
							Map<String, Object> draftIdMap = new HashMap<>(); | 
					 | 
					 | 
							draftContentDao.deleteByDraftId(fromDTO.getDraftId()); | 
				
			
			
				
				
			
		
	
		
		
			
				
					 | 
					 | 
							draftIdMap.put(ModuleConstant.FIELD_DRAFT_ID, fromDTO.getDraftId()); | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
							draftContentDao.deleteByMap(draftIdMap); | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
							if (!CollectionUtils.isEmpty(draftContentList)) { | 
					 | 
					 | 
							if (!CollectionUtils.isEmpty(draftContentList)) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
								draftContentService.insertBatch(draftContentList); | 
					 | 
					 | 
								draftContentService.insertBatch(draftContentList); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
							} | 
					 | 
					 | 
							} | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					@ -271,6 +269,7 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
							DraftEntity draftEntity = checkDraftStatus(fromDTO.getDraftId()); | 
					 | 
					 | 
							DraftEntity draftEntity = checkDraftStatus(fromDTO.getDraftId()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
							//构建标签
 | 
					 | 
					 | 
							//构建标签
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
							draftEntity.setTags(null); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
							if (!CollectionUtils.isEmpty(fromDTO.getTagNameList())) { | 
					 | 
					 | 
							if (!CollectionUtils.isEmpty(fromDTO.getTagNameList())) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
								List<String> tagNameList = fromDTO.getTagNameList(); | 
					 | 
					 | 
								List<String> tagNameList = fromDTO.getTagNameList(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
								tagNameList = tagNameList.stream().distinct().collect(Collectors.toList()); | 
					 | 
					 | 
								tagNameList = tagNameList.stream().distinct().collect(Collectors.toList()); | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					@ -342,6 +341,11 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
								log.warn("saveOrUpdateAttr publisher is blank"); | 
					 | 
					 | 
								log.warn("saveOrUpdateAttr publisher is blank"); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
								throw new RenException("发布单位不能为空"); | 
					 | 
					 | 
								throw new RenException("发布单位不能为空"); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
							} | 
					 | 
					 | 
							} | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
							if (StringUtils.isBlank(fromDTO.getPublishDate())) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
								log.warn("saveOrUpdateAttr publishDate is blank"); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
								throw new RenException("发布时间不能为空"); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
							} | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
							return saveDraftAttr(tokenDto, fromDTO); | 
					 | 
					 | 
							return saveDraftAttr(tokenDto, fromDTO); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
						} | 
					 | 
					 | 
						} | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -360,13 +364,13 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
						@Transactional(rollbackFor = Exception.class) | 
					 | 
					 | 
						@Transactional(rollbackFor = Exception.class) | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
						public void executeSaveDraftAttr(DraftEntity draftEntity, DraftCoverEntity coverEntity, List<DraftPublishRangeEntity> publishRangeEntityList) { | 
					 | 
					 | 
						public void executeSaveDraftAttr(DraftEntity draftEntity, DraftCoverEntity coverEntity, List<DraftPublishRangeEntity> publishRangeEntityList) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
							Map<String,Object> draftIdMap = new HashMap<>(); | 
					 | 
					 | 
							Map<String,Object> draftIdMap = new HashMap<>(); | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
							draftIdMap.put(ModuleConstant.FIELD_DRAFT_ID, draftEntity.getId()); | 
					 | 
					 | 
							//物理删除
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
							draftCoverDao.deleteByMap(draftIdMap); | 
					 | 
					 | 
							draftCoverDao.deleteByDraftId(draftEntity.getId()); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
							if (coverEntity != null){ | 
					 | 
					 | 
							if (coverEntity != null){ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
								draftCoverDao.insert(coverEntity); | 
					 | 
					 | 
								draftCoverDao.insert(coverEntity); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
							} | 
					 | 
					 | 
							} | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					
 | 
					 | 
					 | 
							//物理删除
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
							draftPublishRangeDao.deleteByMap(draftIdMap); | 
					 | 
					 | 
							draftPublishRangeDao.deleteByDraftId(draftEntity.getId()); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
							if (!CollectionUtils.isEmpty(publishRangeEntityList)){ | 
					 | 
					 | 
							if (!CollectionUtils.isEmpty(publishRangeEntityList)){ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
								publishRangeEntityList.forEach(publishRange->draftPublishRangeDao.insert(publishRange)); | 
					 | 
					 | 
								publishRangeEntityList.forEach(publishRange->draftPublishRangeDao.insert(publishRange)); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
							} | 
					 | 
					 | 
							} | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					@ -1040,7 +1044,6 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
							} catch (Exception e) { | 
					 | 
					 | 
							} catch (Exception e) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
								log.error("scanAllPassPublishArticle update db exception", e); | 
					 | 
					 | 
								log.error("scanAllPassPublishArticle update db exception", e); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
								this.sendMsg(draft.getCustomerId(),draft.getTitle(), String.format(ModuleConstant.MSG_ARTICLE_PUBLISH_ERROR, draft.getTitle())); | 
					 | 
					 | 
								this.sendMsg(draft.getCustomerId(),draft.getTitle(), String.format(ModuleConstant.MSG_ARTICLE_PUBLISH_ERROR, draft.getTitle())); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
								this.updateDraftPublishStatus(draftId, DraftConstant.AUDITFAIL); | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
								throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode(), EpmetErrorCode.SERVER_ERROR.getMsg()); | 
					 | 
					 | 
								throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode(), EpmetErrorCode.SERVER_ERROR.getMsg()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
							} | 
					 | 
					 | 
							} | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
						} | 
					 | 
					 | 
						} | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					@ -1093,6 +1096,7 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
						} | 
					 | 
					 | 
						} | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
						@Override | 
					 | 
					 | 
						@Override | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
						@Transactional(rollbackFor = Exception.class) | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
						public DraftContentSaveResultDTO saveDraft(TokenDto tokenDto, DraftContentFromDTO fromDTO) { | 
					 | 
					 | 
						public DraftContentSaveResultDTO saveDraft(TokenDto tokenDto, DraftContentFromDTO fromDTO) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
							return this.saveOrUpdateContent(tokenDto, fromDTO, false); | 
					 | 
					 | 
							return this.saveOrUpdateContent(tokenDto, fromDTO, false); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
						} | 
					 | 
					 | 
						} | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -1109,10 +1113,12 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
							return epmetMessageOpenFeignClient.saveUserMessage(formDTO); | 
					 | 
					 | 
							return epmetMessageOpenFeignClient.saveUserMessage(formDTO); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
						} | 
					 | 
					 | 
						} | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
						private void updateDraftPublishStatus(String draftId,String statusFlag){ | 
					 | 
					 | 
						@Override | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
						public void updateDraftPublishStatus(String draftId,String statusFlag){ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
							draftDao.updateAuditStatusById(draftId,statusFlag); | 
					 | 
					 | 
							draftDao.updateAuditStatusById(draftId,statusFlag); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
						} | 
					 | 
					 | 
						} | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
						/** | 
					 | 
					 | 
						/** | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
						 * @Description  更新DB的标签使用次数		政府端 | 
					 | 
					 | 
						 * @Description  更新DB的标签使用次数		政府端 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
						 * @param draftId | 
					 | 
					 | 
						 * @param draftId | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
					
  |