Browse Source

Merge remote-tracking branch 'origin/dev_voice' into dev_voice

master
jianjun 5 years ago
parent
commit
eb39421714
  1. 12
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/ArticleController.java
  2. 5
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/DraftController.java
  3. 2
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/ArticleDao.java
  4. 1
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java

12
epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/ArticleController.java

@ -23,9 +23,11 @@ import com.epmet.commons.tools.enums.RequirePermissionEnum;
import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.scan.result.SyncScanResult; import com.epmet.commons.tools.scan.result.SyncScanResult;
import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.dto.ArticleContentDTO;
import com.epmet.dto.form.*; import com.epmet.dto.form.*;
import com.epmet.dto.result.*; import com.epmet.dto.result.*;
import com.epmet.service.ArticleOperateRecordService; import com.epmet.service.ArticleOperateRecordService;
@ -228,9 +230,10 @@ public class ArticleController {
*/ */
@PostMapping("publishedarticlelist") @PostMapping("publishedarticlelist")
@RequirePermission(requirePermission = RequirePermissionEnum.WORK_PARTY_VOICE_PUBLISHED_LIST) @RequirePermission(requirePermission = RequirePermissionEnum.WORK_PARTY_VOICE_PUBLISHED_LIST)
public Result<PageData> publishedArticleList(@LoginUser TokenDto tokenDto, @RequestBody PublishedListFormDTO formDTO) { public Result<List<PublishedListResultDTO>> publishedArticleList(@LoginUser TokenDto tokenDto, @RequestBody PublishedListFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO); ValidatorUtils.validateEntity(formDTO);
return new Result<PageData>().ok(articleService.publishedArticleList(tokenDto, formDTO)); List<PublishedListResultDTO> list = articleService.publishedArticleList(tokenDto, formDTO).getList();
return new Result<List<PublishedListResultDTO>>().ok(list);
} }
@ -244,9 +247,10 @@ public class ArticleController {
*/ */
@PostMapping("offlinearticlelist") @PostMapping("offlinearticlelist")
@RequirePermission(requirePermission = RequirePermissionEnum.WORK_PARTY_VOICE_OFFLINE_LIST) @RequirePermission(requirePermission = RequirePermissionEnum.WORK_PARTY_VOICE_OFFLINE_LIST)
public Result<PageData> offLineList(@LoginUser TokenDto tokenDto, @RequestBody OfflineListFormDTO formDTO) { public Result<List<OfflineListResultDTO> > offLineList(@LoginUser TokenDto tokenDto, @RequestBody OfflineListFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO); ValidatorUtils.validateEntity(formDTO);
return new Result<PageData>().ok(articleService.offlineList(tokenDto, formDTO)); List<OfflineListResultDTO> list = articleService.offlineList(tokenDto, formDTO).getList();
return new Result<List<OfflineListResultDTO> >().ok(list);
} }
/** /**
* @Description 根据网格Id查找置顶文章的相关信息列表 用处:居民端首页轮播 * @Description 根据网格Id查找置顶文章的相关信息列表 用处:居民端首页轮播

5
epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/DraftController.java

@ -32,6 +32,7 @@ import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.dto.DraftDTO; import com.epmet.dto.DraftDTO;
import com.epmet.dto.form.DeleteDraftFormDTO; import com.epmet.dto.form.DeleteDraftFormDTO;
import com.epmet.dto.form.DraftListFormDTO; import com.epmet.dto.form.DraftListFormDTO;
import com.epmet.dto.result.DraftListResultDTO;
import com.epmet.excel.DraftExcel; import com.epmet.excel.DraftExcel;
import com.epmet.service.DraftService; import com.epmet.service.DraftService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -114,8 +115,8 @@ public class DraftController {
@PostMapping("draftlist") @PostMapping("draftlist")
@RequirePermission(requirePermission = RequirePermissionEnum.WORK_PARTY_VOICE_DRAFT_LIST) @RequirePermission(requirePermission = RequirePermissionEnum.WORK_PARTY_VOICE_DRAFT_LIST)
public Result<PageData> draftList(@LoginUser TokenDto tokenDto, DraftListFormDTO formDTO) { public Result<List<DraftListResultDTO>> draftList(@LoginUser TokenDto tokenDto, DraftListFormDTO formDTO) {
ValidatorUtils.validateEntity(formDTO); ValidatorUtils.validateEntity(formDTO);
return new Result<PageData>().ok(draftService.draftList(tokenDto, formDTO)); return new Result<List<DraftListResultDTO>>().ok(draftService.draftList(tokenDto, formDTO).getList());
} }
} }

2
epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/ArticleDao.java

@ -71,7 +71,7 @@ public interface ArticleDao extends BaseDao<ArticleEntity> {
* @param tagIdList * @param tagIdList
* @return java.util.List<com.epmet.dto.result.PublishedListResultDTO> * @return java.util.List<com.epmet.dto.result.PublishedListResultDTO>
*/ */
//@DataFilter(tableAliases = "a") @DataFilter(tableAliases = "a")
List<PublishedListResultDTO> selectArticleListForAgency(@Param("customerId") String customerId, @Param("tagIdList") List<String> tagIdList); List<PublishedListResultDTO> selectArticleListForAgency(@Param("customerId") String customerId, @Param("tagIdList") List<String> tagIdList);
/** /**

1
epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java

@ -970,6 +970,7 @@ public class ArticleServiceImpl extends BaseServiceImpl<ArticleDao, ArticleEntit
ArticleEntity articleEntity = this.publishDraftToArticle(draft); ArticleEntity articleEntity = this.publishDraftToArticle(draft);
UpdateCustomerTagCacheDTO updateCustomerTagCacheDTO = this.updateCustomerTag(tokenDto, draftId); UpdateCustomerTagCacheDTO updateCustomerTagCacheDTO = this.updateCustomerTag(tokenDto, draftId);
List<UpdateGridTagCacheDTO> updateGridTagCacheDTOS = this.updateGridTag(tokenDto, draftId, updateCustomerTagCacheDTO); List<UpdateGridTagCacheDTO> updateGridTagCacheDTOS = this.updateGridTag(tokenDto, draftId, updateCustomerTagCacheDTO);
this.addArticleTags(updateCustomerTagCacheDTO,draftId,tokenDto);
//更新redis //更新redis
try { try {

Loading…
Cancel
Save