From dc38f5aa1cc4597a92c6a9e7c2447fda3d3069cb Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Tue, 9 Jun 2020 14:18:37 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=9A=E5=BB=BA=E5=A3=B0=E9=9F=B3-=E6=94=BF?= =?UTF-8?q?=E5=BA=9C=E7=AB=AF-=E5=8F=AF=E9=80=89=E5=8F=91=E5=B8=83?= =?UTF-8?q?=E8=8C=83=E5=9B=B4=E3=80=81=E5=8F=AF=E4=B8=8B=E7=BA=BF=E7=BD=91?= =?UTF-8?q?=E6=A0=BC=E5=88=97=E8=A1=A8=E6=8E=A5=E5=8F=A3=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E4=B8=80=E5=B1=82=E8=BF=94=E5=8F=82=E5=AF=B9=E8=B1=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ArticleAgencyGridListResultDTO.java | 42 +++++++++++++++++++ .../epmet/controller/ArticleController.java | 12 ++++-- 2 files changed, 50 insertions(+), 4 deletions(-) create mode 100644 epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/ArticleAgencyGridListResultDTO.java diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/ArticleAgencyGridListResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/ArticleAgencyGridListResultDTO.java new file mode 100644 index 0000000000..dd84877e56 --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/ArticleAgencyGridListResultDTO.java @@ -0,0 +1,42 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; + + +/** + * 党建声音-可选发布范围、可下线网格列表-接口返参 + * + * @author sun + */ +@Data +public class ArticleAgencyGridListResultDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 树结构对象 + */ + private ArticleGridResultDTO agencyGridList; + +} \ No newline at end of file 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 c00846c8eb..929ecccfe9 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 @@ -64,8 +64,10 @@ public class ArticleController { * @Description 党建声音-政府端-可选发布范围 **/ @PostMapping("agencygridlist") - public Result agencyGridList(@LoginUser TokenDto tokenDTO) { - return new Result().ok(articleService.agencyGridList(tokenDTO)); + public Result agencyGridList(@LoginUser TokenDto tokenDTO) { + ArticleAgencyGridListResultDTO agencyGridList = new ArticleAgencyGridListResultDTO(); + agencyGridList.setAgencyGridList(articleService.agencyGridList(tokenDTO)); + return new Result().ok(agencyGridList); } /** @@ -298,10 +300,12 @@ public class ArticleController { * @Description 党建声音-政府端-可下线网格列表 **/ @PostMapping("publishgridlist") - public Result publishGridList(@LoginUser TokenDto tokenDTO, @RequestBody PublishGridListFormDTO formDTO) { + public Result publishGridList(@LoginUser TokenDto tokenDTO, @RequestBody PublishGridListFormDTO formDTO) { formDTO.setStaffId(tokenDTO.getUserId()); ValidatorUtils.validateEntity(formDTO, PublishGridListFormDTO.AddUserInternalGroup.class); - return new Result().ok(articleService.publishGridList(formDTO)); + ArticleAgencyGridListResultDTO agencyGridList = new ArticleAgencyGridListResultDTO(); + agencyGridList.setAgencyGridList(articleService.publishGridList(formDTO)); + return new Result().ok(agencyGridList); }