@@ -8,4 +8,6 @@ import java.util.List;
public interface UserBankCardRepo extends JpaRepository<UserBankCard, Long>, JpaSpecificationExecutor<UserBankCard> {
List<UserBankCard> findByUserId(Long userId);
+
+ int deleteByUserId(Long userId);
}
@@ -447,6 +447,7 @@ public class UserService {
adapayService.delSettleAccount(user.getMemberId(), user.getSettleAccountId());
user.setSettleAccountId(null);
userRepo.save(user);
+ userBankCardRepo.deleteByUserId(userId);
} else {
throw new BusinessException("未绑定");