diff --git a/src/main/java/neatlogic/framework/process/dto/ChannelVo.java b/src/main/java/neatlogic/framework/process/dto/ChannelVo.java index d1045eab7af42a9a83e0a732785a6f8f188c76b0..2a5851d295ccd4634481126068b57089d5aa5be7 100644 --- a/src/main/java/neatlogic/framework/process/dto/ChannelVo.java +++ b/src/main/java/neatlogic/framework/process/dto/ChannelVo.java @@ -1,14 +1,12 @@ package neatlogic.framework.process.dto; +import com.alibaba.fastjson.JSONObject; +import com.alibaba.fastjson.annotation.JSONField; +import com.google.common.base.Objects; import neatlogic.framework.common.constvalue.ApiParamType; -import neatlogic.framework.common.constvalue.GroupSearch; import neatlogic.framework.common.dto.BasePageVo; import neatlogic.framework.common.util.CommonUtil; -import neatlogic.framework.dto.AuthorityVo; import neatlogic.framework.restful.annotation.EntityField; -import com.alibaba.fastjson.JSONObject; -import com.alibaba.fastjson.annotation.JSONField; -import com.google.common.base.Objects; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; @@ -77,8 +75,11 @@ public class ChannelVo extends BasePageVo { @EntityField(name = "common.sla", type = ApiParamType.INTEGER) private Integer sla; - @EntityField(name = "common.authoritylist", type = ApiParamType.JSONARRAY) - private List authorityList; + @EntityField(name = "common.reportauthoritylist", type = ApiParamType.JSONARRAY) + private List reportAuthorityList = new ArrayList<>(); + + @EntityField(name = "common.viewauthoritylist", type = ApiParamType.JSONARRAY) + private List viewAuthorityList = new ArrayList<>(); @EntityField(name = "term.itsm.channeltypeuuid", type = ApiParamType.STRING) private String channelTypeUuid; @@ -101,8 +102,6 @@ public class ChannelVo extends BasePageVo { @JSONField(serialize = false) private boolean isAuthority = false; @JSONField(serialize = false) - private List authorityVoList; - @JSONField(serialize = false) private CatalogVo parent; @JSONField(serialize = false) private Integer sort; @@ -282,41 +281,20 @@ public class ChannelVo extends BasePageVo { this.sla = sla; } - public List getAuthorityList() { - if (authorityList == null && CollectionUtils.isNotEmpty(authorityVoList)) { - authorityList = new ArrayList<>(); - for (AuthorityVo authorityVo : authorityVoList) { - GroupSearch groupSearch = GroupSearch.getGroupSearch(authorityVo.getType()); - if (groupSearch != null) { - authorityList.add(groupSearch.getValuePlugin() + authorityVo.getUuid()); - } - } - } - return authorityList; + public List getReportAuthorityList() { + return reportAuthorityList; } - public void setAuthorityList(List authorityList) { - this.authorityList = authorityList; + public void setReportAuthorityList(List reportAuthorityList) { + this.reportAuthorityList = reportAuthorityList; } - public List getAuthorityVoList() { - if (authorityVoList == null && CollectionUtils.isNotEmpty(authorityList)) { - authorityVoList = new ArrayList<>(); - for (String authority : authorityList) { - String[] split = authority.split("#"); - if (GroupSearch.getGroupSearch(split[0]) != null) { - AuthorityVo authorityVo = new AuthorityVo(); - authorityVo.setType(split[0]); - authorityVo.setUuid(split[1]); - authorityVoList.add(authorityVo); - } - } - } - return authorityVoList; + public List getViewAuthorityList() { + return viewAuthorityList; } - public void setAuthorityVoList(List authorityVoList) { - this.authorityVoList = authorityVoList; + public void setViewAuthorityList(List viewAuthorityList) { + this.viewAuthorityList = viewAuthorityList; } public String getChannelTypeUuid() {