1. fix
This commit is contained in:
2026-04-25 20:31:16 +08:00
parent 1d20921340
commit 1d6e7f2f0f

View File

@@ -73,17 +73,18 @@ public class MerchantPayoutAccountServiceImpl extends BaseServiceImpl<MerchantPa
}
PayoutAccountType currentType = PayoutAccountType.fromCode(type);
LambdaUpdateWrapper<MerchantPayoutAccountEntity> wrapper = Wrappers.lambdaUpdate(MerchantPayoutAccountEntity.class).eq(MerchantPayoutAccountEntity::getUserId, userId).eq(MerchantPayoutAccountEntity::getAccountType, currentType.getCode());
boolean updated = false;
if (exists(wrapper)) {
updated = update(wrapper.set(MerchantPayoutAccountEntity::getIsDeleted, 1));
boolean updated = update(wrapper.set(MerchantPayoutAccountEntity::getIsDeleted, 1));
if (!updated) {
throw new ServiceException("操作失败");
}
}
MerchantPayoutAccountEntity account = new MerchantPayoutAccountEntity();
account.setUserId(userId);
account.setAccountType(currentType.getCode());
account.setAccountUrl(url);
boolean saved = save(account);
if (!updated || !saved) {
if (!saved) {
throw new ServiceException("操作失败");
}
return true;