|  |  | @ -19,6 +19,7 @@ package com.epmet.service.impl; | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | import com.alibaba.fastjson.JSON; | 
			
		
	
		
			
				
					|  |  |  | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | 
			
		
	
		
			
				
					|  |  |  | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.commons.tools.constant.AppClientConstant; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.commons.tools.constant.FieldConstant; | 
			
		
	
	
		
			
				
					|  |  | @ -1924,4 +1925,70 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit | 
			
		
	
		
			
				
					|  |  |  | 		} | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | 	} | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | 	/** | 
			
		
	
		
			
				
					|  |  |  | 	 * 删除文章 | 
			
		
	
		
			
				
					|  |  |  | 	 * article	文章表 | 
			
		
	
		
			
				
					|  |  |  | 	 * article_content	文章内容表 | 
			
		
	
		
			
				
					|  |  |  | 	 * article_cover	文章封面表 | 
			
		
	
		
			
				
					|  |  |  | 	 * article_operate_record	文章操作记录表 | 
			
		
	
		
			
				
					|  |  |  | 	 * article_publish_range	文章发布范围表 | 
			
		
	
		
			
				
					|  |  |  | 	 * article_tags	文章标签表 | 
			
		
	
		
			
				
					|  |  |  | 	 * article_visit_record	文章访问记录表 | 
			
		
	
		
			
				
					|  |  |  | 	 * | 
			
		
	
		
			
				
					|  |  |  | 	 * @param articleIds | 
			
		
	
		
			
				
					|  |  |  | 	 * @param customerId | 
			
		
	
		
			
				
					|  |  |  | 	 * @param currentOperUserId | 
			
		
	
		
			
				
					|  |  |  | 	 */ | 
			
		
	
		
			
				
					|  |  |  | 	@Transactional(rollbackFor = Exception.class) | 
			
		
	
		
			
				
					|  |  |  | 	@Override | 
			
		
	
		
			
				
					|  |  |  | 	public void delete(List<String> articleIds, String customerId, String currentOperUserId) { | 
			
		
	
		
			
				
					|  |  |  | 		Date now=new Date(); | 
			
		
	
		
			
				
					|  |  |  | 		for(String articleId:articleIds){ | 
			
		
	
		
			
				
					|  |  |  | 			//文章表
 | 
			
		
	
		
			
				
					|  |  |  | 			LambdaUpdateWrapper<ArticleEntity> updateWrapper = new LambdaUpdateWrapper<>(); | 
			
		
	
		
			
				
					|  |  |  | 			updateWrapper.set(ArticleEntity::getDelFlag, NumConstant.ONE_STR) | 
			
		
	
		
			
				
					|  |  |  | 					.set(ArticleEntity::getUpdatedBy, currentOperUserId) | 
			
		
	
		
			
				
					|  |  |  | 					.set(ArticleEntity::getUpdatedTime, now); | 
			
		
	
		
			
				
					|  |  |  | 			updateWrapper.eq(ArticleEntity::getId, articleId); | 
			
		
	
		
			
				
					|  |  |  | 			baseDao.update(null, updateWrapper); | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | 			//文章内容表
 | 
			
		
	
		
			
				
					|  |  |  | 			LambdaUpdateWrapper<ArticleContentEntity> articleContentUpdate = new LambdaUpdateWrapper<>(); | 
			
		
	
		
			
				
					|  |  |  | 			articleContentUpdate.set(ArticleContentEntity::getDelFlag, NumConstant.ONE_STR) | 
			
		
	
		
			
				
					|  |  |  | 					.set(ArticleContentEntity::getUpdatedBy, currentOperUserId) | 
			
		
	
		
			
				
					|  |  |  | 					.set(ArticleContentEntity::getUpdatedTime, now); | 
			
		
	
		
			
				
					|  |  |  | 			articleContentUpdate.eq(ArticleContentEntity::getArticleId, articleId); | 
			
		
	
		
			
				
					|  |  |  | 			articleContentDao.update(null,articleContentUpdate); | 
			
		
	
		
			
				
					|  |  |  | 			//文章封面表
 | 
			
		
	
		
			
				
					|  |  |  | 			LambdaUpdateWrapper<ArticleCoverEntity> articleCoverUpdate = new LambdaUpdateWrapper<>(); | 
			
		
	
		
			
				
					|  |  |  | 			articleCoverUpdate.set(ArticleCoverEntity::getDelFlag, NumConstant.ONE_STR) | 
			
		
	
		
			
				
					|  |  |  | 					.set(ArticleCoverEntity::getUpdatedBy, currentOperUserId) | 
			
		
	
		
			
				
					|  |  |  | 					.set(ArticleCoverEntity::getUpdatedTime, now); | 
			
		
	
		
			
				
					|  |  |  | 			articleCoverUpdate.eq(ArticleCoverEntity::getArticleId, articleId); | 
			
		
	
		
			
				
					|  |  |  | 			articleCoverDao.update(null,articleCoverUpdate); | 
			
		
	
		
			
				
					|  |  |  | 			//文章操作记录表
 | 
			
		
	
		
			
				
					|  |  |  | 			articleOperateRecordService.deleteByArticleId(articleId,customerId,currentOperUserId); | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | 			//文章发布范围表
 | 
			
		
	
		
			
				
					|  |  |  | 			LambdaUpdateWrapper<ArticlePublishRangeEntity> publishRangeUpdate = new LambdaUpdateWrapper<>(); | 
			
		
	
		
			
				
					|  |  |  | 			publishRangeUpdate.set(ArticlePublishRangeEntity::getDelFlag, NumConstant.ONE_STR) | 
			
		
	
		
			
				
					|  |  |  | 					.set(ArticlePublishRangeEntity::getUpdatedBy, currentOperUserId) | 
			
		
	
		
			
				
					|  |  |  | 					.set(ArticlePublishRangeEntity::getUpdatedTime, now); | 
			
		
	
		
			
				
					|  |  |  | 			publishRangeUpdate.eq(ArticlePublishRangeEntity::getArticleId, articleId); | 
			
		
	
		
			
				
					|  |  |  | 			articlePublishRangeDao.update(null,publishRangeUpdate); | 
			
		
	
		
			
				
					|  |  |  | 			//文章标签表
 | 
			
		
	
		
			
				
					|  |  |  | 			LambdaUpdateWrapper<ArticleTagsEntity> articleTagsUpdate = new LambdaUpdateWrapper<>(); | 
			
		
	
		
			
				
					|  |  |  | 			articleTagsUpdate.set(ArticleTagsEntity::getDelFlag, NumConstant.ONE_STR) | 
			
		
	
		
			
				
					|  |  |  | 					.set(ArticleTagsEntity::getUpdatedBy, currentOperUserId) | 
			
		
	
		
			
				
					|  |  |  | 					.set(ArticleTagsEntity::getUpdatedTime, now); | 
			
		
	
		
			
				
					|  |  |  | 			articleTagsUpdate.eq(ArticleTagsEntity::getArticleId, articleId); | 
			
		
	
		
			
				
					|  |  |  | 			articleTagsDao.update(null,articleTagsUpdate); | 
			
		
	
		
			
				
					|  |  |  | 			//文章访问记录表
 | 
			
		
	
		
			
				
					|  |  |  | 			articleVisitRecordService.deleteByArticleId(articleId,customerId,currentOperUserId); | 
			
		
	
		
			
				
					|  |  |  | 		} | 
			
		
	
		
			
				
					|  |  |  | 	} | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | } | 
			
		
	
	
		
			
				
					|  |  | 
 |