fix bug 41134 系统管理--组织机构管理--搜索--输入%后搜索,显示全部数据

This commit is contained in:
lijiarao
2021-10-20 17:56:22 +08:00
parent f1c0ba46af
commit 7a534f9026
2 changed files with 10 additions and 6 deletions
@@ -330,11 +330,11 @@ public class SysDepartController {
departIds = user.getDepartIds();
}
List<SysDepartTreeModel> treeList = this.sysDepartService.searhBy(keyWord,myDeptSearch,departIds);
if (treeList == null || treeList.size() == 0) {
result.setSuccess(false);
result.setMessage("未查询匹配数据!");
return result;
}
//if (treeList == null || treeList.size() == 0) {
// result.setSuccess(false);
// result.setMessage("未查询匹配数据!");
// return result;
//}
result.setResult(treeList);
return result;
}
@@ -4,6 +4,9 @@ import java.util.*;
import com.alibaba.fastjson.JSONObject;
import com.jero.common.system.vo.SysDepartTreeModel;
import com.jero.common.util.oConvertUtils;
import org.apache.commons.beanutils.ConvertUtils;
import org.apache.commons.beanutils.locale.LocaleConvertUtils;
import org.apache.commons.lang.StringUtils;
import com.jero.common.constant.CacheConstant;
import com.jero.common.constant.CommonConstant;
@@ -291,6 +294,7 @@ public class SysDepartServiceImpl extends ServiceImpl<SysDepartMapper, SysDepart
}
query.eq(SysDepart::getDelFlag, CommonConstant.DEL_FLAG_0.toString());
}
keyWord = oConvertUtils.replaceAllPercent(keyWord);
query.like(SysDepart::getDepartName, keyWord);
//update-begin--Author:huangzhilin Date:20140417 for[bugfree号]组织机构搜索回显优化--------------------
SysDepartTreeModel model = new SysDepartTreeModel();
@@ -307,7 +311,7 @@ public class SysDepartServiceImpl extends ServiceImpl<SysDepartMapper, SysDepart
}
return newList;
}
return null;
return newList;
}
/**