Browse Source

党建声音-政府端-可选发布范围、可下线网格列表接口添加一层返参对象

dev_shibei_match
sunyuchao 5 years ago
parent
commit
dc38f5aa1c
  1. 42
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/ArticleAgencyGridListResultDTO.java
  2. 12
      epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/ArticleController.java

42
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
* <p>
* 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.
* <p>
* 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.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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;
}

12
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<ArticleGridResultDTO> agencyGridList(@LoginUser TokenDto tokenDTO) {
return new Result<ArticleGridResultDTO>().ok(articleService.agencyGridList(tokenDTO));
public Result<ArticleAgencyGridListResultDTO> agencyGridList(@LoginUser TokenDto tokenDTO) {
ArticleAgencyGridListResultDTO agencyGridList = new ArticleAgencyGridListResultDTO();
agencyGridList.setAgencyGridList(articleService.agencyGridList(tokenDTO));
return new Result<ArticleAgencyGridListResultDTO>().ok(agencyGridList);
}
/**
@ -298,10 +300,12 @@ public class ArticleController {
* @Description 党建声音-政府端-可下线网格列表
**/
@PostMapping("publishgridlist")
public Result<ArticleGridResultDTO> publishGridList(@LoginUser TokenDto tokenDTO, @RequestBody PublishGridListFormDTO formDTO) {
public Result<ArticleAgencyGridListResultDTO> publishGridList(@LoginUser TokenDto tokenDTO, @RequestBody PublishGridListFormDTO formDTO) {
formDTO.setStaffId(tokenDTO.getUserId());
ValidatorUtils.validateEntity(formDTO, PublishGridListFormDTO.AddUserInternalGroup.class);
return new Result<ArticleGridResultDTO>().ok(articleService.publishGridList(formDTO));
ArticleAgencyGridListResultDTO agencyGridList = new ArticleAgencyGridListResultDTO();
agencyGridList.setAgencyGridList(articleService.publishGridList(formDTO));
return new Result<ArticleAgencyGridListResultDTO>().ok(agencyGridList);
}

Loading…
Cancel
Save