mirror of
https://github.com/201206030/novel-plus.git
synced 2025-04-26 17:20:52 +00:00
fix: 后台模块查询过滤相同的行
This commit is contained in:
parent
687eb61846
commit
a7d825cc54
@ -1,17 +1,12 @@
|
||||
package com.java2nb.system.domain;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.java2nb.common.jsonserializer.LongToStringSerializer;
|
||||
|
||||
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.util.Date;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.Objects;
|
||||
|
||||
|
||||
/**
|
||||
@ -22,6 +17,7 @@ import java.util.Date;
|
||||
* @date 2019-11-25 11:40:03
|
||||
*/
|
||||
public class DataPermDO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
||||
@ -57,118 +53,160 @@ public class DataPermDO implements Serializable {
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取:
|
||||
*/
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置:权限名称
|
||||
*/
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取:权限名称
|
||||
*/
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置:数据表名称
|
||||
*/
|
||||
public void setTableName(String tableName) {
|
||||
this.tableName = tableName;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取:数据表名称
|
||||
*/
|
||||
public String getTableName() {
|
||||
return tableName;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置:所属模块
|
||||
*/
|
||||
public void setModuleName(String moduleName) {
|
||||
this.moduleName = moduleName;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取:所属模块
|
||||
*/
|
||||
public String getModuleName() {
|
||||
return moduleName;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置:用户权限控制属性名
|
||||
*/
|
||||
public void setCrlAttrName(String crlAttrName) {
|
||||
this.crlAttrName = crlAttrName;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取:用户权限控制属性名
|
||||
*/
|
||||
public String getCrlAttrName() {
|
||||
return crlAttrName;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置:数据表权限控制列名
|
||||
*/
|
||||
public void setCrlColumnName(String crlColumnName) {
|
||||
this.crlColumnName = crlColumnName;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取:数据表权限控制列名
|
||||
*/
|
||||
public String getCrlColumnName() {
|
||||
return crlColumnName;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置:权限code,all_开头表示查看所有数据的权限,sup_开头表示查看下级数据的权限,own_开头表示查看本级数据的权限
|
||||
*/
|
||||
public void setPermCode(String permCode) {
|
||||
this.permCode = permCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取:权限code,all_开头表示查看所有数据的权限,sup_开头表示查看下级数据的权限,own_开头表示查看本级数据的权限
|
||||
*/
|
||||
public String getPermCode() {
|
||||
return permCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置:排序
|
||||
*/
|
||||
public void setOrderNum(Integer orderNum) {
|
||||
this.orderNum = orderNum;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取:排序
|
||||
*/
|
||||
public Integer getOrderNum() {
|
||||
return orderNum;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置:创建时间
|
||||
*/
|
||||
public void setGmtCreate(Date gmtCreate) {
|
||||
this.gmtCreate = gmtCreate;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取:创建时间
|
||||
*/
|
||||
public Date getGmtCreate() {
|
||||
return gmtCreate;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置:修改时间
|
||||
*/
|
||||
public void setGmtModified(Date gmtModified) {
|
||||
this.gmtModified = gmtModified;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取:修改时间
|
||||
*/
|
||||
public Date getGmtModified() {
|
||||
return gmtModified;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
DataPermDO that = (DataPermDO) o;
|
||||
return Objects.equals(id, that.id) && Objects.equals(name, that.name)
|
||||
&& Objects.equals(tableName, that.tableName) && Objects.equals(moduleName, that.moduleName)
|
||||
&& Objects.equals(crlAttrName, that.crlAttrName) && Objects.equals(crlColumnName,
|
||||
that.crlColumnName) && Objects.equals(permCode, that.permCode) && Objects.equals(orderNum,
|
||||
that.orderNum) && Objects.equals(gmtCreate, that.gmtCreate) && Objects.equals(gmtModified,
|
||||
that.gmtModified);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(id, name, tableName, moduleName, crlAttrName, crlColumnName, permCode, orderNum, gmtCreate,
|
||||
gmtModified);
|
||||
}
|
||||
}
|
||||
|
@ -1,10 +1,12 @@
|
||||
package com.java2nb.system.service.impl;
|
||||
|
||||
import com.java2nb.common.domain.DictDO;
|
||||
import com.java2nb.common.domain.Tree;
|
||||
import com.java2nb.common.utils.BuildTree;
|
||||
import com.java2nb.common.utils.IdWorker;
|
||||
import com.java2nb.system.dao.DataPermDao;
|
||||
import com.java2nb.system.dao.RoleDataPermDao;
|
||||
import com.java2nb.system.domain.DataPermDO;
|
||||
import com.java2nb.system.service.DataPermService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@ -12,15 +14,12 @@ import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.java2nb.system.dao.DataPermDao;
|
||||
import com.java2nb.system.domain.DataPermDO;
|
||||
import com.java2nb.system.service.DataPermService;
|
||||
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
||||
@Service
|
||||
public class DataPermServiceImpl implements DataPermService {
|
||||
|
||||
@Autowired
|
||||
private DataPermDao dataPermDao;
|
||||
|
||||
@ -64,7 +63,7 @@ public class DataPermServiceImpl implements DataPermService {
|
||||
|
||||
@Override
|
||||
public List<DataPermDO> listModuleName() {
|
||||
return dataPermDao.listModuleName();
|
||||
return dataPermDao.listModuleName().stream().distinct().collect(Collectors.toList());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
x
Reference in New Issue
Block a user