fix:部门新增查询接口

This commit is contained in:
zhangzhiqiang
2022-12-08 17:40:36 +08:00
parent 45eb611a57
commit e6e459b038
2 changed files with 9 additions and 7 deletions

View File

@@ -62,13 +62,15 @@ public class DeptController {
@ApiOperation("查询部门")
@GetMapping("/vo")
public ResponseEntity<Object> queryvo(DeptQueryCriteria criteria) throws Exception {
if (criteria.getPid() == null){
criteria.setPidIsNull(true);
}
Boolean hasChild = false;
if (StringUtils.isNotEmpty(criteria.getName()) || StringUtils.isNotEmpty(criteria.getIs_used())){
criteria.setPidIsNull(null);
hasChild=true;
if (criteria.getPidIsNull() == null){
if (criteria.getPid() == null){
criteria.setPidIsNull(true);
}
if (StringUtils.isNotEmpty(criteria.getName()) || StringUtils.isNotEmpty(criteria.getIs_used())){
criteria.setPidIsNull(null);
hasChild=true;
}
}
List<Dept> deptDtos = deptService.queryAll(criteria, true);
List<DeptVo> deptVos = CopyUtil.copyList(deptDtos, DeptVo.class);

View File

@@ -164,7 +164,7 @@ public class MenuServiceImpl implements MenuService {
WQLObject menuTab = WQLObject.getWQLObject("sys_menu");
JSONObject rootMenuObj = menuTab.query("menu_id = '" + rootMenuId + "'").uniqueResult(0);
JSONObject param = new JSONObject();
param.put("system_type", rootMenuObj.getString("title"));
param.put("system_type", rootMenuObj.getString("system_type"));
param.put("menu_id", menu_id);
menuTab.update(param);
}