paascloud/paascloud-master · error · UacBizException

UAC10015001

UAC10015001

Error message

UAC10015001

What it means

UAC10015001 ("找不到组织信息,groupId=%s") is thrown by UacGroupServiceImpl when an organization (group) with the given groupId cannot be found in the database. The service loads the group via uacGroupMapper.selectByPrimaryKey(groupId) and throws this business exception if the lookup returns empty, aborting the status update before any modification.

Solutions

  1. Verify the groupId exists: SELECT * FROM uac_group WHERE id = <groupId>; before calling the API
  2. Refresh the group list/tree in the client so it does not reference deleted groups
  3. Handle UacBizException code UAC10015001 in the caller and surface a 'group not found, please refresh' message
  4. Check environment/tenant: ensure the groupId belongs to the database the service is connected to

Example fix

// before
uacGroupService.updateUacGroupStatusById(9999L, UacGroupStatusEnum.DISABLE.getStatus());
// after
UacGroup group = uacGroupService.queryUacGroupByGroupId(9999L); // or check via mapper first
if (group == null) {
    throw new UacBizException(ErrorCodeEnum.UAC10015001, 9999L); // or return friendly error to UI
}
uacGroupService.updateUacGroupStatusById(9999L, UacGroupStatusEnum.DISABLE.getStatus());
Defensive patterns

Strategy: validation

Validate before calling

// Java, before calling the API
UacGroup g = uacGroupMapper.selectByPrimaryKey(groupId);
if (g == null) {
    throw new IllegalArgumentException("Group not found: " + groupId);
}
uacGroupService.updateUacGroupStatusById(groupId, status);

Type guard

if (groupId == null || groupId <= 0L) { throw new IllegalArgumentException("invalid groupId"); }

Try / catch

try {
    uacGroupService.updateUacGroupStatusById(groupId, status);
} catch (UacBizException e) {
    if (ErrorCodeEnum.UAC10015001.getCode().equals(e.getCode())) { /* group missing: refresh & inform user */ }
    else throw e;
}

Prevention

When it happens

Trigger: Calling updateUacGroupStatusById(groupId, status) with a groupId that does not exist in the uac_group table, a groupId referencing a row already deleted by another user/transaction, or a stale groupId passed from the client after the group was removed.

Common situations: Front-end pages caching a group tree that was deleted server-side; concurrent admin operations where one admin deletes a group while another enables/disables it; test/seed data cleaned up between runs; copying a groupId from a different environment database.

Understand the failure class

Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.

Related errors


AI-assisted analysis of paascloud/paascloud-master@781281a950 (2026-09-10). Data as JSON: /api/errors/4a55355fc0f4023e. Report an issue: GitHub.

Appendix: source

Thrown at paascloud-provider/paascloud-provider-uac/src/main/java/com/paascloud/provider/service/impl/UacGroupServiceImpl.java:83

	}

	private int editUacGroup(UacGroup group) {
		return uacGroupMapper.updateByPrimaryKeySelective(group);
	}

	@Override
	public int updateUacGroupStatusById(IdStatusDto idStatusDto, LoginAuthDto loginAuthDto) {

		Long groupId = idStatusDto.getId();
		Integer status = idStatusDto.getStatus();

		UacGroup uacGroup = new UacGroup();
		uacGroup.setId(groupId);
		uacGroup.setStatus(status);

		UacGroup group = uacGroupMapper.selectByPrimaryKey(groupId);
		if (PublicUtil.isEmpty(group)) {
			throw new UacBizException(ErrorCodeEnum.UAC10015001, groupId);
		}
		if (!UacGroupStatusEnum.contains(status)) {
			throw new UacBizException(ErrorCodeEnum.UAC10015002);
		}

		//查询所有的组织
		List<UacGroup> totalGroupList = uacGroupMapper.selectAll();
		List<GroupZtreeVo> totalList = Lists.newArrayList();
		GroupZtreeVo zTreeVo;
		for (UacGroup vo : totalGroupList) {
			zTreeVo = new GroupZtreeVo();
			zTreeVo.setId(vo.getId());
			totalList.add(zTreeVo);
		}

		UacGroupUser uacGroupUser = new UacGroupUser();
		uacGroupUser.setUserId(loginAuthDto.getUserId());
		UacGroupUser groupUser = uacGroupUserMapper.selectOne(uacGroupUser);

View on GitHub (pinned to 781281a950)