|  |  | @ -45,21 +45,15 @@ import com.epmet.dto.form.*; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.dto.result.*; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.entity.*; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.feign.EpmetUserSelfFeignClient; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.dto.form.ArticlePageFormDTO; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.dto.form.CommonArticleListFormDTO; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.dto.result.ArticleBannerResultDTO; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.dto.result.ArticleLatestResultDTO; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.dto.result.ArticleListResultDTO; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.entity.ArticleEntity; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.redis.ArticleRedis; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.service.ArticleOperateRecordService; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.service.ArticlePublishRangeService; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.service.ArticleService; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.utils.ModuleConstant; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.service.ArticleVisitRecordService; | 
			
		
	
		
			
				
					|  |  |  | import com.github.pagehelper.PageHelper; | 
			
		
	
		
			
				
					|  |  |  | import com.github.pagehelper.PageInfo; | 
			
		
	
		
			
				
					|  |  |  | import lombok.extern.slf4j.Slf4j; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.service.ArticleVisitRecordService; | 
			
		
	
		
			
				
					|  |  |  | import org.apache.commons.lang3.StringUtils; | 
			
		
	
		
			
				
					|  |  |  | import org.springframework.beans.factory.annotation.Autowired; | 
			
		
	
		
			
				
					|  |  |  | import org.springframework.stereotype.Service; | 
			
		
	
	
		
			
				
					|  |  | @ -205,20 +199,12 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit | 
			
		
	
		
			
				
					|  |  |  | 			draftEntity = new DraftEntity(); | 
			
		
	
		
			
				
					|  |  |  | 			draftEntity.setTitle(fromDTO.getTitle()); | 
			
		
	
		
			
				
					|  |  |  | 			draftEntity.setCustomerId(tokenDto.getCustomerId()); | 
			
		
	
		
			
				
					|  |  |  | 			draftEntity.setPreviewContent(""); | 
			
		
	
		
			
				
					|  |  |  | 			draftEntity.setIsTop(0); | 
			
		
	
		
			
				
					|  |  |  | 			draftEntity.setPublishRangeDesc(""); | 
			
		
	
		
			
				
					|  |  |  | 			draftEntity.setPublisherId(""); | 
			
		
	
		
			
				
					|  |  |  | 			draftEntity.setPublisherName(""); | 
			
		
	
		
			
				
					|  |  |  | 			draftEntity.setPublisherType(""); | 
			
		
	
		
			
				
					|  |  |  | 			draftEntity.setPublishDate(new Date()); | 
			
		
	
		
			
				
					|  |  |  | 			draftEntity.setStatusFlag(""); | 
			
		
	
		
			
				
					|  |  |  | 			draftEntity.setTags(""); | 
			
		
	
		
			
				
					|  |  |  | 			draftEntity.setIsTop(DraftConstant.UN_TOP); | 
			
		
	
		
			
				
					|  |  |  | 			draftEntity.setStatusFlag(DraftConstant.UNPUBLISH); | 
			
		
	
		
			
				
					|  |  |  | 			draftEntity.setOrgId(""); | 
			
		
	
		
			
				
					|  |  |  | 			draftEntity.setOrgIdPath(""); | 
			
		
	
		
			
				
					|  |  |  | 			draftEntity.setGridId(""); | 
			
		
	
		
			
				
					|  |  |  | 			draftEntity.setDepartmentId(""); | 
			
		
	
		
			
				
					|  |  |  | 			draftEntity.setRevision(0); | 
			
		
	
		
			
				
					|  |  |  | 			draftEntity.setDelFlag(NumConstant.ZERO_STR); | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | 			draftDao.insert(draftEntity); | 
			
		
	
	
		
			
				
					|  |  | @ -266,16 +252,21 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit | 
			
		
	
		
			
				
					|  |  |  | 		} | 
			
		
	
		
			
				
					|  |  |  | 		draftEntity.setIsTop(fromDTO.getIsTop()); | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | 		//发布单位
 | 
			
		
	
		
			
				
					|  |  |  | 		String publisher = fromDTO.getPublisher(); | 
			
		
	
		
			
				
					|  |  |  | 		String publisherType = fromDTO.getPublisherType(); | 
			
		
	
		
			
				
					|  |  |  | 		//TODO 根据发布类型 获取对应的名称
 | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | 		if(StringUtils.isNotBlank(fromDTO.getPublishDate())){ | 
			
		
	
		
			
				
					|  |  |  | 			draftEntity.setPublishDate(DateUtils.stringToDate(fromDTO.getPublishDate(),DateUtils.DATE_PATTERN)); | 
			
		
	
		
			
				
					|  |  |  | 		if (StringUtils.isNotBlank(fromDTO.getPublisher())){ | 
			
		
	
		
			
				
					|  |  |  | 			String publisherType = fromDTO.getPublisherType(); | 
			
		
	
		
			
				
					|  |  |  | 			String publisherName = fromDTO.getPublisherName(); | 
			
		
	
		
			
				
					|  |  |  | 			if (StringUtils.isBlank(publisherType) || StringUtils.isBlank(publisherName)) { | 
			
		
	
		
			
				
					|  |  |  | 				log.warn("saveDraftAttr publisher info is illegal,publisher:{},publisherType:{},publisherName:{}",fromDTO.getPublisher(),publisherType,publisherName); | 
			
		
	
		
			
				
					|  |  |  | 				throw new RenException("发布单位不能为空"); | 
			
		
	
		
			
				
					|  |  |  | 			} | 
			
		
	
		
			
				
					|  |  |  | 		} | 
			
		
	
		
			
				
					|  |  |  | 		draftEntity.setPublisherName(fromDTO.getPublisherName()); | 
			
		
	
		
			
				
					|  |  |  | 		draftEntity.setPublisherId(fromDTO.getPublisher()); | 
			
		
	
		
			
				
					|  |  |  | 		draftEntity.setPublisherType(fromDTO.getPublisher()); | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | 		draftEntity.setPublishDate(DateUtils.stringToDate(fromDTO.getPublishDate(),DateUtils.DATE_PATTERN)); | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | 		//封面
 | 
			
		
	
		
			
				
					|  |  |  | 		DraftCoverEntity coverEntity = buildCoverEntity(tokenDto, fromDTO); | 
			
		
	
	
		
			
				
					|  |  | @ -345,10 +336,6 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit | 
			
		
	
		
			
				
					|  |  |  | 		} | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | 		draftPublishRangeDao.deleteByMap(draftIdMap); | 
			
		
	
		
			
				
					|  |  |  | 		if (CollectionUtils.isEmpty(publishRangeEntityList)){ | 
			
		
	
		
			
				
					|  |  |  | 			log.warn("saveOrUpdateAttr publishRangeEntityList is empty"); | 
			
		
	
		
			
				
					|  |  |  | 			throw new RenException("参数错误"); | 
			
		
	
		
			
				
					|  |  |  | 		} | 
			
		
	
		
			
				
					|  |  |  | 		if (!CollectionUtils.isEmpty(publishRangeEntityList)){ | 
			
		
	
		
			
				
					|  |  |  | 			publishRangeEntityList.forEach(publishRange->draftPublishRangeDao.insert(publishRange)); | 
			
		
	
		
			
				
					|  |  |  | 		} | 
			
		
	
	
		
			
				
					|  |  | 
 |