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

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.trade.service.contract.entity.FddAccount;
import com.trade.service.contract.mapper.FddAccountMapper;
import com.trade.service.contract.service.FddAccountService;
import org.springframework.stereotype.Service;

/**
 * <p>
 * fdd签署人账户信息表 服务实现类
 * </p>
 *
 * @author zhangchenm
 * @since 2024-09-25
 */
@Service
public class FddAccountServiceImpl extends ServiceImpl<FddAccountMapper, FddAccount> implements FddAccountService {

    @Override
    public FddAccount getByIdNo(String idNo) {
        return this.lambdaQuery().eq(FddAccount::getIdNo, idNo).one();
    }

    @Override
    public void updateAuthStatus(String thirdAccountId, boolean authStatus) {
        this.lambdaUpdate().eq(FddAccount::getThirdAccountId, thirdAccountId).set(FddAccount::getAuthStatus, authStatus)
                .update();
    }
}
