update:
1. fix
This commit is contained in:
@@ -25,6 +25,7 @@
|
||||
*/
|
||||
package org.springblade.modules.market.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import org.springblade.common.cache.MarketInfoCache;
|
||||
import org.springblade.core.log.exception.ServiceException;
|
||||
@@ -71,7 +72,12 @@ public class MerchantPayoutAccountServiceImpl extends BaseServiceImpl<MerchantPa
|
||||
throw new ServiceException("无效商家");
|
||||
}
|
||||
PayoutAccountType currentType = PayoutAccountType.fromCode(type);
|
||||
boolean updated = update(Wrappers.lambdaUpdate(MerchantPayoutAccountEntity.class).eq(MerchantPayoutAccountEntity::getUserId, userId).eq(MerchantPayoutAccountEntity::getAccountType, currentType.getCode()).set(MerchantPayoutAccountEntity::getIsDeleted, 1));
|
||||
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));
|
||||
}
|
||||
|
||||
MerchantPayoutAccountEntity account = new MerchantPayoutAccountEntity();
|
||||
account.setUserId(userId);
|
||||
account.setAccountType(currentType.getCode());
|
||||
|
||||
Reference in New Issue
Block a user