From fa590a54ab71e8d8d2ebad8691225cef590b1ad6 Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Mon, 8 Jun 2020 18:13:39 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=96=87=E7=AB=A0=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/controller/ArticleController.java | 12 ++++++++---- .../java/com/epmet/controller/DraftController.java | 5 +++-- .../src/main/java/com/epmet/dao/ArticleDao.java | 2 +- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/ArticleController.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/ArticleController.java index 9e964ac066..3ec18dd5ed 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/ArticleController.java +++ b/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.scan.result.SyncScanResult; 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.validator.ValidatorUtils; import com.epmet.commons.tools.validator.group.DefaultGroup; +import com.epmet.dto.ArticleContentDTO; import com.epmet.dto.form.*; import com.epmet.dto.result.*; import com.epmet.service.ArticleOperateRecordService; @@ -228,9 +230,10 @@ public class ArticleController { */ @PostMapping("publishedarticlelist") @RequirePermission(requirePermission = RequirePermissionEnum.WORK_PARTY_VOICE_PUBLISHED_LIST) - public Result publishedArticleList(@LoginUser TokenDto tokenDto, @RequestBody PublishedListFormDTO formDTO) { + public Result> publishedArticleList(@LoginUser TokenDto tokenDto, @RequestBody PublishedListFormDTO formDTO) { ValidatorUtils.validateEntity(formDTO); - return new Result().ok(articleService.publishedArticleList(tokenDto, formDTO)); + List list = articleService.publishedArticleList(tokenDto, formDTO).getList(); + return new Result>().ok(list); } @@ -244,9 +247,10 @@ public class ArticleController { */ @PostMapping("offlinearticlelist") @RequirePermission(requirePermission = RequirePermissionEnum.WORK_PARTY_VOICE_OFFLINE_LIST) - public Result offLineList(@LoginUser TokenDto tokenDto, @RequestBody OfflineListFormDTO formDTO) { + public Result > offLineList(@LoginUser TokenDto tokenDto, @RequestBody OfflineListFormDTO formDTO) { ValidatorUtils.validateEntity(formDTO); - return new Result().ok(articleService.offlineList(tokenDto, formDTO)); + List list = articleService.offlineList(tokenDto, formDTO).getList(); + return new Result >().ok(list); } /** * @Description 根据网格Id查找置顶文章的相关信息列表 用处:居民端首页轮播 diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/DraftController.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/DraftController.java index bdbf8fd8d5..3656c16f6e 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/DraftController.java +++ b/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.form.DeleteDraftFormDTO; import com.epmet.dto.form.DraftListFormDTO; +import com.epmet.dto.result.DraftListResultDTO; import com.epmet.excel.DraftExcel; import com.epmet.service.DraftService; import org.springframework.beans.factory.annotation.Autowired; @@ -114,8 +115,8 @@ public class DraftController { @PostMapping("draftlist") @RequirePermission(requirePermission = RequirePermissionEnum.WORK_PARTY_VOICE_DRAFT_LIST) - public Result draftList(@LoginUser TokenDto tokenDto, DraftListFormDTO formDTO) { + public Result> draftList(@LoginUser TokenDto tokenDto, DraftListFormDTO formDTO) { ValidatorUtils.validateEntity(formDTO); - return new Result().ok(draftService.draftList(tokenDto, formDTO)); + return new Result>().ok(draftService.draftList(tokenDto, formDTO).getList()); } } \ No newline at end of file diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/ArticleDao.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/ArticleDao.java index 041f642be9..583edc66d5 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/ArticleDao.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/dao/ArticleDao.java @@ -71,7 +71,7 @@ public interface ArticleDao extends BaseDao { * @param tagIdList * @return java.util.List */ - //@DataFilter(tableAliases = "a") + @DataFilter(tableAliases = "a") List selectArticleListForAgency(@Param("customerId") String customerId, @Param("tagIdList") List tagIdList); /** From 2e38648bab5b4378d6d6b9f71cfc4f3a377e51d4 Mon Sep 17 00:00:00 2001 From: zxc <954985706@qq.com> Date: Mon, 8 Jun 2020 18:18:38 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=96=87=E7=AB=A0=E6=8C=82=E6=A0=87?= =?UTF-8?q?=E7=AD=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/epmet/service/impl/ArticleServiceImpl.java | 1 + 1 file changed, 1 insertion(+) diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java index 196b8cc9f7..23a9307b17 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/ArticleServiceImpl.java +++ b/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 updateGridTagCacheDTOS = this.updateGridTag(tokenDto, draftId, updateCustomerTagCacheDTO); + this.addArticleTags(updateCustomerTagCacheDTO,draftId,tokenDto); //更新redis try {