package com.ruoyi.ss.account.service.impl;

import com.ruoyi.ss.account.domain.AccountVO;
import com.ruoyi.ss.account.service.AccountValidator;
import org.springframework.stereotype.Service;

/**
 * @author wjh
 * 2024/7/28
 */
@Service
public class AccountValidatorImpl implements AccountValidator {
    /**
     * 判断账户是否属于用户
     */
    @Override
    public boolean isBelong(AccountVO account, Long userId) {
        return account != null && account.getUserId() != null && account.getUserId().equals(userId);
    }
}
