{"record":{"id":"ac4de2e3a4f1cd3f","repo":"paascloud/paascloud-master","slug":"uac10014001","errorCode":"UAC10014001","errorMessage":"UAC10014001","messagePattern":"UAC10014001","errorType":"error_code","errorClass":"UacBizException","httpStatus":null,"severity":"error","filePath":"paascloud-provider/paascloud-provider-uac/src/main/java/com/paascloud/provider/service/impl/UacActionServiceImpl.java","lineNumber":72,"sourceCode":"\t\tuacAction.setMenuId(menuId);\n\t\tBeanUtils.copyProperties(actionMainQueryDto, uacAction);\n\t\tuacAction.setOrderBy(\"update_time desc\");\n\t\tPageHelper.startPage(actionMainQueryDto.getPageNum(), actionMainQueryDto.getPageSize());\n\t\tList<ActionVo> actionList = uacActionMapper.queryActionListWithPage(uacAction);\n\t\treturn new PageInfo<>(actionList);\n\t}\n\n\t@Override\n\tpublic int deleteActionById(Long actionId) {\n\t\t//查询该角色下是否有用户绑定, 有的话提醒不能删除\n\t\tif (null == actionId) {\n\t\t\tthrow new IllegalArgumentException(\"权限ID不能为空\");\n\t\t}\n\n\t\tUacAction uacAction = uacActionMapper.selectByPrimaryKey(actionId);\n\t\tif (uacAction == null) {\n\t\t\tlogger.error(\"找不到权限信息 actionId={}\", actionId);\n\t\t\tthrow new UacBizException(ErrorCodeEnum.UAC10014001, actionId);\n\t\t}\n\n\t\t// 删除角色权限表数据  不查询了 直接删除了\n\t\tuacRoleActionMapper.deleteByActionId(actionId);\n\n\t\treturn uacActionMapper.deleteByPrimaryKey(actionId);\n\t}\n\n\t@Override\n\tpublic void batchDeleteByIdList(List<Long> deleteIdList) {\n\t\tlogger.info(\"批量删除角色. deleteIdList={}\", deleteIdList);\n\t\tPreconditions.checkArgument(PublicUtil.isNotEmpty(deleteIdList), \"删除权限ID不能为空\");\n\t\tint result = uacActionMapper.batchDeleteByIdList(deleteIdList);\n\t\tif (result < deleteIdList.size()) {\n\t\t\tthrow new UacBizException(ErrorCodeEnum.UAC10014002, Joiner.on(GlobalConstant.Symbol.COMMA).join(deleteIdList));\n\t\t}\n\t}\n","sourceCodeStart":54,"sourceCodeEnd":90,"githubUrl":"https://github.com/paascloud/paascloud-master/blob/781281a9503332ed3cef44ea618349d14230a127/paascloud-provider/paascloud-provider-uac/src/main/java/com/paascloud/provider/service/impl/UacActionServiceImpl.java#L54-L90","documentation":"UAC10014001 is thrown by deleteActionById when no UacAction exists for the given actionId (selectByPrimaryKey returns null). It means the permission record to delete was not found; the message is enriched with the offending actionId.","triggerScenarios":"deleteActionById(actionId) with an id that is not present in the uac_action table — already deleted, wrong environment DB, or a fabricated id from the client.","commonSituations":"Stale UI list showing rows deleted by another user; dev/prod database mismatch; client sends hardcoded ids from another tenant.","solutions":["Confirm the actionId exists (select * from uac_action where id = ?) before deleting","Refresh the client's permission list and retry with a valid id","Check you are pointed at the intended database/environment"],"exampleFix":"// before\nuacActionService.deleteActionById(actionId);\n// after\nif (uacActionMapper.selectByPrimaryKey(actionId) == null) {\n    logger.warn(\"action {} already gone, skipping delete\", actionId);\n    return;\n}\nuacActionService.deleteActionById(actionId);","handlingStrategy":"validation","validationCode":"if (uacActionMapper.selectByPrimaryKey(actionId) == null) { skip or warn; }","typeGuard":"null","tryCatchPattern":"try { service.deleteActionById(id); } catch (UacBizException e) { if (\"UAC10014001\".equals(e.getCode())) { refreshList(); } }","preventionTips":["Refresh lists after concurrent edits","Confirm environment/db before manual id operations","Treat not-found on delete as idempotent success where allowed"],"tags":["entity-not-found","permission","delete"],"backgroundTag":"record-not-found","analyzedSha":"781281a9503332ed3cef44ea618349d14230a127","analyzedAt":"2026-09-10T10:59:02.070Z","contentChangedAt":"2026-09-10T10:59:02.070Z","schemaVersion":2},"datasetVersion":"2026-09-16T09:17:16.951Z"}