IP白名单增删改查提交

This commit is contained in:
wangxin
2018-05-21 19:42:24 +08:00
parent 947a21c9f0
commit 43337bf51c
9 changed files with 713 additions and 102 deletions

View File

@@ -78,6 +78,7 @@ public abstract class CrudService<D extends CrudDao<T>, T extends BaseEntity<T>>
* @return
*/
public Page<T> findPage(Page<T> page, T entity) {
entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(),"r"));
entity.setPage(page);
page.setList(dao.findList(entity));
return page;

View File

@@ -114,8 +114,8 @@ public class IpCfgService extends CrudService<IpCfgDao,BaseIpCfg> {
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
public void deleteIpCfg(List<BaseIpCfg> baseIpCfg, List<AreaIpCfg> areaCfg){
List<BaseIpCfg> cfgs=new ArrayList<>();
cfgs.addAll(areaCfg);
if(areaCfg!=null&&areaCfg.size()>0){
cfgs.addAll(areaCfg);
this.deleteBatch(cfgs,IpCfgDao.class);
}
if(baseIpCfg!=null&&baseIpCfg.size()>0){
@@ -137,6 +137,9 @@ public class IpCfgService extends CrudService<IpCfgDao,BaseIpCfg> {
public BaseIpCfg getIpCfgById(BaseIpCfg baseIpCfg){
return ipCfgDao.getById(baseIpCfg.getTableName(), baseIpCfg.getCfgId());
}
public BaseIpCfg getIpCfgById(String tableName,long id){
return ipCfgDao.getById(tableName, id);
}
public Integer getIsValid(BaseIpCfg baseIpCfg){
return ipCfgDao.getIsValid(baseIpCfg);
}