Commit b5afbd5f by guojuxing

部门职位,如果是空的时候,则置空

parent 756bcc35
......@@ -13,9 +13,10 @@ public interface MenuAuthDepartService {
* @Description:

* @author guojuxing
* @param list

* @param menuCode 菜单code
* @return void


*/
void saveFetch(List<MenuAuthDepartDTO> list);
void saveFetch(List<MenuAuthDepartDTO> list, String menuCode);
/**
* 查询菜单的所有部门职位
......
......@@ -16,9 +16,9 @@ public class MenuAuthDepartServiceImpl implements MenuAuthDepartService{
private TabSysMenuAuthDepartMapper tabSysMenuAuthDepartMapper;
@Override
public void saveFetch(List<MenuAuthDepartDTO> list) {
public void saveFetch(List<MenuAuthDepartDTO> list, String menuCode) {
tabSysMenuAuthDepartMapper.deleteByMenuCode(menuCode);
if (CollectionUtils.isNotEmpty(list)) {
tabSysMenuAuthDepartMapper.deleteByMenuCode(list.get(0).getMenuCode());
tabSysMenuAuthDepartMapper.saveFetch(list);
}
}
......
......@@ -421,7 +421,7 @@ public class MenuApiServiceImpl implements MenuApiService {
setMenuAuthType(menuDTO);
menuService.updatePage(menuDTO);
menuAuthDepartService.saveFetch(menuDTO.getMenuAuthDepartList());
menuAuthDepartService.saveFetch(menuDTO.getMenuAuthDepartList(), menuDTO.getMenuCode());
//同时更新子集的父级code数据
menuService.updateParentCodeByParentId(menuDTO.getMenuId(), menuDTO.getMenuCode());
......@@ -736,7 +736,7 @@ public class MenuApiServiceImpl implements MenuApiService {
setNormalFieldValue(menuDTO);
setMenuAuthType(menuDTO);
menuService.savePage(menuDTO);
menuAuthDepartService.saveFetch(menuDTO.getMenuAuthDepartList());
menuAuthDepartService.saveFetch(menuDTO.getMenuAuthDepartList(), menuDTO.getMenuCode());
return ServiceResponse.success();
}
......@@ -789,7 +789,7 @@ public class MenuApiServiceImpl implements MenuApiService {
setMenuAuthType(menuDTO);
Integer menuId = menuService.savePage(menuDTO);
menuAuthDepartService.saveFetch(menuDTO.getMenuAuthDepartList());
menuAuthDepartService.saveFetch(menuDTO.getMenuAuthDepartList(), menuDTO.getMenuCode());
return ServiceResponse.success(menuId);
}
......@@ -839,7 +839,7 @@ public class MenuApiServiceImpl implements MenuApiService {
setMenuVersion(menuDTO);
setMenuAuthType(menuDTO);
menuService.updatePage(menuDTO);
menuAuthDepartService.saveFetch(menuDTO.getMenuAuthDepartList());
menuAuthDepartService.saveFetch(menuDTO.getMenuAuthDepartList(), menuDTO.getMenuCode());
//同时更新子集的父级code数据
menuService.updateParentCodeByParentId(menuDTO.getMenuId(), menuDTO.getMenuCode());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment