|
|
@ -56,7 +56,6 @@ import com.epmet.service.*; |
|
|
|
import com.epmet.utils.ModuleConstant; |
|
|
|
import com.github.pagehelper.PageHelper; |
|
|
|
import com.github.pagehelper.PageInfo; |
|
|
|
import com.sun.javafx.binding.StringConstant; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
import org.jsoup.helper.StringUtil; |
|
|
@ -68,7 +67,6 @@ import org.springframework.transaction.annotation.Propagation; |
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
import org.springframework.util.CollectionUtils; |
|
|
|
|
|
|
|
import javax.swing.text.StringContent; |
|
|
|
import java.util.*; |
|
|
|
import java.util.concurrent.atomic.AtomicBoolean; |
|
|
|
import java.util.stream.Collectors; |
|
|
@ -638,9 +636,9 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @Description 根据网格Id查找置顶文章的相关信息列表 用处:居民端首页轮播 |
|
|
|
* @param commonArticleListFormDTO :: getGridId :: getNum |
|
|
|
* @return List<ArticleBannerResultDTO> |
|
|
|
* @Description 根据网格Id查找置顶文章的相关信息列表 用处:居民端首页轮播 |
|
|
|
* @author wangc |
|
|
|
* @date 2020.06.02 16:13 |
|
|
|
**/ |
|
|
@ -652,9 +650,9 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @Description 根据网格Id查找最新文章的相关信息列表 用处:居民端首页最新文章列表 |
|
|
|
* @param commonArticleListFormDTO :: getGridId :: getNum |
|
|
|
* @return List<ArticleLatestResultDTO> |
|
|
|
* @Description 根据网格Id查找最新文章的相关信息列表 用处:居民端首页最新文章列表 |
|
|
|
* @author wangc |
|
|
|
* @date 2020.06.03 09:53 |
|
|
|
**/ |
|
|
@ -666,9 +664,9 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @Description 根据网格Id和标签列表查找文章的相关信息列表 用处:居民端党建声音列表 |
|
|
|
* @param articlePageFormDTO |
|
|
|
* @return List<ArticleListResultDTO> |
|
|
|
* @Description 根据网格Id和标签列表查找文章的相关信息列表 用处:居民端党建声音列表 |
|
|
|
* @author wangc |
|
|
|
* @date 2020.06.03 14:19 |
|
|
|
**/ |
|
|
@ -753,6 +751,7 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit |
|
|
|
List<ArticleGridResultDTO> list = agencyGridListToTree(resultDTOList); |
|
|
|
return list.get(NumConstant.ZERO); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @Author sun |
|
|
|
* @Description 可下线网格列表-将list转为Tree结构 |
|
|
@ -790,6 +789,7 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit |
|
|
|
} |
|
|
|
return listParentRecord; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @Author sun |
|
|
|
* @Description 可下线网格列表-将list转为Tree结构-递归查询每一个根节点的下级节点集合 |
|
|
@ -818,9 +818,9 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @Description 根绝文章Id查询出文章的内容、封面等相关信息,如果居民端传入的网格Id不在该文章的发布范围内,则返回NULL |
|
|
|
* @param articleDetailFormDTO |
|
|
|
* @return ArticleDetailResultDTO |
|
|
|
* @Description 根绝文章Id查询出文章的内容、封面等相关信息,如果居民端传入的网格Id不在该文章的发布范围内,则返回NULL |
|
|
|
* @author wangc |
|
|
|
* @date 2020.06.03 18:28 |
|
|
|
**/ |
|
|
@ -856,9 +856,9 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @Description 草稿发布文章 |
|
|
|
* @param draft |
|
|
|
* @return String 返回新发布文章的Id |
|
|
|
* @Description 草稿发布文章 |
|
|
|
* @author wangc |
|
|
|
* @date 2020.06.05 09:10 |
|
|
|
**/ |
|
|
@ -1014,6 +1014,7 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit |
|
|
|
log.debug("scanContent result:{}", JSON.toJSONString(result)); |
|
|
|
return result; |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
@Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED) |
|
|
|
public void scanAllPassPublishArticle(TokenDto tokenDto, String draftId, SyncScanResult syncScanResult) { |
|
|
@ -1090,7 +1091,8 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit |
|
|
|
} else if (contentFail) { |
|
|
|
auditMsg = ModuleConstant.DRAFT_CONTENT; |
|
|
|
} else if (coverFail) { |
|
|
|
auditMsg = ModuleConstant.DRAFT_COVER;; |
|
|
|
auditMsg = ModuleConstant.DRAFT_COVER; |
|
|
|
; |
|
|
|
} |
|
|
|
this.sendMsg(draft.getCustomerId(), draft.getTitle(), String.format(ModuleConstant.MSG_AUDIT_CONTENT, draft.getTitle(), auditMsg)); |
|
|
|
} |
|
|
@ -1126,8 +1128,8 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
* @Description 更新DB的标签使用次数 政府端 |
|
|
|
* @param draftId |
|
|
|
* @Description 更新DB的标签使用次数 政府端 |
|
|
|
* @author zxc |
|
|
|
*/ |
|
|
|
public UpdateCustomerTagCacheDTO updateCustomerTag(TokenDto tokenDto, String draftId) { |
|
|
@ -1155,8 +1157,8 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @Description 更新redis 标签使用数量 和 标签级联 政府端 |
|
|
|
* @param formDto |
|
|
|
* @Description 更新redis 标签使用数量 和 标签级联 政府端 |
|
|
|
* @author zxc |
|
|
|
*/ |
|
|
|
public void updateCacheCustomerTag(UpdateCustomerTagCacheDTO formDto) { |
|
|
@ -1180,9 +1182,9 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @Description 更新数据库 网格下的标签使用数量 居民端 |
|
|
|
* @param draftId |
|
|
|
* @param formDto |
|
|
|
* @Description 更新数据库 网格下的标签使用数量 居民端 |
|
|
|
* @author zxc |
|
|
|
*/ |
|
|
|
public List<UpdateGridTagCacheDTO> updateGridTag(TokenDto tokenDto, String draftId, UpdateCustomerTagCacheDTO formDto) { |
|
|
@ -1218,8 +1220,8 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @Description 更新redis 网格下的 标签使用数量 和 级联标签 居民端 |
|
|
|
* @param gridTagCache |
|
|
|
* @Description 更新redis 网格下的 标签使用数量 和 级联标签 居民端 |
|
|
|
* @author zxc |
|
|
|
*/ |
|
|
|
public void updateCacheGridTag(List<UpdateGridTagCacheDTO> gridTagCache) { |
|
|
@ -1245,8 +1247,8 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @Description 给文章挂标签 article_tags |
|
|
|
* @param formDto |
|
|
|
* @Description 给文章挂标签 article_tags |
|
|
|
* @author zxc |
|
|
|
*/ |
|
|
|
public void addArticleTags(UpdateCustomerTagCacheDTO formDto, String draftId, TokenDto tokenDto) { |
|
|
|