配置界面的Cfg Id检索条件 增加范围和in的检索方式的功能修改

This commit is contained in:
shangguanyanfei
2019-04-11 17:13:44 +08:00
parent fc08261929
commit 268a0ae81b
26 changed files with 276 additions and 604 deletions

View File

@@ -661,29 +661,6 @@ public class DomainService extends CrudService<DomainDao,HttpUrlCfg> {
}
}
public Page<CfgIndexInfo> getDomainList(Page<CfgIndexInfo> page, CfgIndexInfo entity){
//配置ID 查询条件 查询范围的处理
String compileIdNew =entity.getCompileIdNew();
if(!StringUtil.isEmpty(compileIdNew)){
if(compileIdNew.indexOf("-")!=-1){//包含
String[] split = compileIdNew.split("-");
if(Integer.parseInt(split[0]) < Integer.parseInt(split[1])){
entity.setCompileIdStart(Integer.parseInt(split[0]));
entity.setCompileIdEnd(Integer.parseInt(split[1]));
}else{
entity.setCompileIdStart(Integer.parseInt(split[1]));
entity.setCompileIdEnd(Integer.parseInt(split[0]));
}
}else if(compileIdNew.indexOf(",")!=-1){
String[] split = compileIdNew.split(",");
List<String> idList=new ArrayList<String>();
for (int i = 0; i < split.length; i++) {
idList.add(split[i]);
}
entity.setCompileIdNewList(idList);
}else{
entity.setCompileId(Integer.parseInt(compileIdNew));
}
}
// 生成数据权限过滤条件dsf为dataScopeFilter的简写在xml中使用 ${sqlMap.dsf}调用权限SQL
entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(),"a"));
entity.setPage(page);