package com.trade.service.contract.service.impl;

import org.springframework.stereotype.Component;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.trade.service.contract.entity.ESignAccount;
import com.trade.service.contract.mapper.ESignAccountMapper;
import com.trade.service.contract.service.ESignAccountService;

@Component
public class ESignAccountServiceImpl extends ServiceImpl<ESignAccountMapper, ESignAccount> implements ESignAccountService {

    @Override
    public boolean add(ESignAccount eSignSignerInfo) {
        return save(eSignSignerInfo);
    }

    @Override
    public ESignAccount getESignSignerInfoByIdNo(String signerIdNo) {
        return this.lambdaQuery().eq(ESignAccount::getIdNo, signerIdNo).one();
    }

    @Override
    public ESignAccount getESignSignerInfoByAccountId(String accountId) {
        return this.lambdaQuery().eq(ESignAccount::getEAccountId, accountId).one();
    }
}
