fix:部门新增查询接口
This commit is contained in:
@@ -62,13 +62,15 @@ public class DeptController {
|
|||||||
@ApiOperation("查询部门")
|
@ApiOperation("查询部门")
|
||||||
@GetMapping("/vo")
|
@GetMapping("/vo")
|
||||||
public ResponseEntity<Object> queryvo(DeptQueryCriteria criteria) throws Exception {
|
public ResponseEntity<Object> queryvo(DeptQueryCriteria criteria) throws Exception {
|
||||||
if (criteria.getPid() == null){
|
|
||||||
criteria.setPidIsNull(true);
|
|
||||||
}
|
|
||||||
Boolean hasChild = false;
|
Boolean hasChild = false;
|
||||||
if (StringUtils.isNotEmpty(criteria.getName()) || StringUtils.isNotEmpty(criteria.getIs_used())){
|
if (criteria.getPidIsNull() == null){
|
||||||
criteria.setPidIsNull(null);
|
if (criteria.getPid() == null){
|
||||||
hasChild=true;
|
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<Dept> deptDtos = deptService.queryAll(criteria, true);
|
||||||
List<DeptVo> deptVos = CopyUtil.copyList(deptDtos, DeptVo.class);
|
List<DeptVo> deptVos = CopyUtil.copyList(deptDtos, DeptVo.class);
|
||||||
|
|||||||
@@ -164,7 +164,7 @@ public class MenuServiceImpl implements MenuService {
|
|||||||
WQLObject menuTab = WQLObject.getWQLObject("sys_menu");
|
WQLObject menuTab = WQLObject.getWQLObject("sys_menu");
|
||||||
JSONObject rootMenuObj = menuTab.query("menu_id = '" + rootMenuId + "'").uniqueResult(0);
|
JSONObject rootMenuObj = menuTab.query("menu_id = '" + rootMenuId + "'").uniqueResult(0);
|
||||||
JSONObject param = new JSONObject();
|
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);
|
param.put("menu_id", menu_id);
|
||||||
menuTab.update(param);
|
menuTab.update(param);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user