paascloud/paascloud-master · error · UacBizException
UAC10011038
UAC10011038
Error message
UAC10011038
What it means
UAC10011038 means the database update to activate a user affected zero rows. UserManager.activeUser throws it when uacUserMapper.updateByPrimaryKeySelective returns < 1, i.e. no user with the given id was updated.
Solutions
- Verify the user id exists before activation (selectByPrimaryKey first).
- Check whether the update includes status conditions that make a re-activation a no-op; treat 0 rows idempotently if desired.
- Confirm the request runs against the correct environment/database.
- Reissue activation from the admin flow if the user record was replaced.
Defensive patterns
Strategy: try-catch
Validate before calling
UacUser existing = uacUserMapper.selectByPrimaryKey(uacUser.getId());
if (existing == null) {
throw new IllegalStateException("User " + uacUser.getId() + " does not exist; cannot activate");
} Try / catch
try {
userManager.activeUser(mqMessageData, uacUser, activeUserKey);
} catch (UacBizException e) {
if ("UAC10011038".equals(String.valueOf(e.getCode()))) { /* treat as already-deleted user */ }
throw e;
} Prevention
- Verify the user row exists before activation
- Make activation idempotent for already-activated users
- Guard against replaying stale activation requests after user deletion
When it happens
Trigger: Calling activeUser with a UacUser id that doesn't exist, or with a record that no longer matches (deleted before activation).
Common situations: Activation link used after the user row was removed or re-created with a new id; activation request replayed after completion with status filters making the update a no-op; cross-environment id.
Related errors
AI-assisted analysis of paascloud/paascloud-master@781281a950 (2026-09-10).
Data as JSON: /api/errors/73b8270c816df19b.
Report an issue: GitHub.
Appendix: source
Thrown at paascloud-provider/paascloud-provider-uac/src/main/java/com/paascloud/provider/manager/UserManager.java:79
}
@MqProducerStore
public void resetLoginPwd(final MqMessageData mqMessageData, final UacUser update) {
log.info("重置密码. mqMessageData={}, user={}", mqMessageData, update);
int updateResult = uacUserMapper.updateByPrimaryKeySelective(update);
if (updateResult < 1) {
log.error("用户【 {} 】重置密码失败", update.getLoginName());
} else {
log.info("用户【 {} 】重置密码失败", update.getLoginName());
}
}
@MqProducerStore
public void activeUser(final MqMessageData mqMessageData, final UacUser uacUser, final String activeUserKey) {
log.info("激活用户. mqMessageData={}, user={}", mqMessageData, uacUser);
int result = uacUserMapper.updateByPrimaryKeySelective(uacUser);
if (result < 1) {
throw new UacBizException(ErrorCodeEnum.UAC10011038, uacUser.getId());
}
// 绑定一个访客角色默认值roleId=10000
final Long userId = uacUser.getId();
Preconditions.checkArgument(userId != null, "用戶Id不能爲空");
final Long roleId = 10000L;
UacRoleUser roleUser = new UacRoleUser();
roleUser.setUserId(userId);
roleUser.setRoleId(roleId);
uacRoleUserMapper.insertSelective(roleUser);
// 绑定一个组织
UacGroupUser groupUser = new UacGroupUser();
groupUser.setUserId(userId);
groupUser.setGroupId(GlobalConstant.Sys.SUPER_MANAGER_GROUP_ID);
uacGroupUserMapper.insertSelective(groupUser);
// 删除 activeUserTokenView on GitHub (pinned to 781281a950)