update:
1. fix
This commit is contained in:
@@ -73,17 +73,18 @@ public class MerchantPayoutAccountServiceImpl extends BaseServiceImpl<MerchantPa
|
|||||||
}
|
}
|
||||||
PayoutAccountType currentType = PayoutAccountType.fromCode(type);
|
PayoutAccountType currentType = PayoutAccountType.fromCode(type);
|
||||||
LambdaUpdateWrapper<MerchantPayoutAccountEntity> wrapper = Wrappers.lambdaUpdate(MerchantPayoutAccountEntity.class).eq(MerchantPayoutAccountEntity::getUserId, userId).eq(MerchantPayoutAccountEntity::getAccountType, currentType.getCode());
|
LambdaUpdateWrapper<MerchantPayoutAccountEntity> wrapper = Wrappers.lambdaUpdate(MerchantPayoutAccountEntity.class).eq(MerchantPayoutAccountEntity::getUserId, userId).eq(MerchantPayoutAccountEntity::getAccountType, currentType.getCode());
|
||||||
boolean updated = false;
|
|
||||||
if (exists(wrapper)) {
|
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();
|
MerchantPayoutAccountEntity account = new MerchantPayoutAccountEntity();
|
||||||
account.setUserId(userId);
|
account.setUserId(userId);
|
||||||
account.setAccountType(currentType.getCode());
|
account.setAccountType(currentType.getCode());
|
||||||
account.setAccountUrl(url);
|
account.setAccountUrl(url);
|
||||||
boolean saved = save(account);
|
boolean saved = save(account);
|
||||||
if (!updated || !saved) {
|
if (!saved) {
|
||||||
throw new ServiceException("操作失败");
|
throw new ServiceException("操作失败");
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Reference in New Issue
Block a user