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