Commit 4bcf3094 by guojuxing

编辑为仅超管可用时候,删除权限项关联

parent 866591c1
......@@ -176,4 +176,6 @@ public interface TabSysMenuMapper {
* @return java.util.List<com.gic.auth.entity.TabSysUser>


 */
List<TabSysUser> listAdminOnlyOperationItem();
void deleteByMenuIdList(@Param("list") List<Integer> menuIdList);
}
\ No newline at end of file
......@@ -154,4 +154,6 @@ public interface MenuService {
* @return java.util.List<com.gic.auth.entity.TabSysUser>


 */
List<TabSysUser> listAdminOnlyOperationItem();
void deleteByMenuIdList(List<Integer> menuIdList);
}
......@@ -150,6 +150,11 @@ public class MenuServiceImpl implements MenuService {
return tabSysMenuMapper.listAdminOnlyOperationItem();
}
@Override
public void deleteByMenuIdList(List<Integer> menuIdList) {
tabSysMenuMapper.deleteByMenuIdList(menuIdList);
}
private void updateSort(Integer sort, Integer id) {
TabSysMenu record = new TabSysMenu();
record.setMenuId(id);
......
......@@ -546,8 +546,10 @@ public class MenuApiServiceImpl implements MenuApiService {
authItemIdList.add(authItemDTO.getMenuId());
}
}
//删除权限项
//删除权限项关联
menuItemService.deleteByMenuIdList(authItemIdList);
//删除权限项
menuService.deleteByMenuIdList(authItemIdList);
//删除操作项
menuItemService.deleteByItemId(record.getMenuId());
}
......
......@@ -446,4 +446,16 @@
and admin_only_sign = 1
and menu_type = 2
</select>
<update id="deleteByMenuIdList">
<if test="list != null and list.size() > 0">
update tab_sys_menu set status = 0
where status = 1
and menu_id IN
<foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
#{item}
</foreach>
</if>
</update>
</mapper>
\ No newline at end of file
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