package com.dxhy.jxpt.baseService.sign.service.elec.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.dxhy.common.service.impl.MpBaseServiceImpl;
import com.dxhy.jxpt.baseService.sign.dao.SignInvoiceImgDao;
import com.dxhy.api.model.sign.TDxInvoiceImg;
import com.dxhy.jxpt.baseService.sign.service.elec.SignInvoiceImgService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 扫描图片service，查询电票对应的图片
 *
 * @author peipei.li
 * @date 2019-05-31
 */
@Service("signInvoiceImgService")
@Slf4j

public class SignInvoiceImgServiceImpl extends MpBaseServiceImpl<SignInvoiceImgDao, TDxInvoiceImg>
    implements SignInvoiceImgService {
    /**
     * @param imgQueryWrapper
     *            请求参数
     * @return 返回参数
     */
    @Override
    public List<TDxInvoiceImg> list(LambdaQueryWrapper<TDxInvoiceImg> imgQueryWrapper) {
        return super.list(imgQueryWrapper);
    }

    /**
     * @param uuid
     *            uuid
     * @return 返回参数
     */
    @Override
    public TDxInvoiceImg selectByUuid(String uuid) {
        LambdaQueryWrapper<TDxInvoiceImg> imgQueryWrapper = new LambdaQueryWrapper<>();
        imgQueryWrapper.eq(TDxInvoiceImg::getScanId, uuid);
        return super.getOne(imgQueryWrapper);
    }

    /**
     * @param invoiceImg
     *            图片信息
     */
    @Override
    public void insertOrUpdate(TDxInvoiceImg invoiceImg) {
        super.saveOrUpdate(invoiceImg);
    }
}
