package com.qmth.distributed.print.business.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.qmth.distributed.print.business.entity.ClientPrintData;
import com.qmth.distributed.print.business.mapper.ClientPrintDataMapper;
import com.qmth.distributed.print.business.service.ClientPrintDataService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Date: 2021/4/19.
 */
@Service
public class ClientPrintDataServiceImpl extends ServiceImpl<ClientPrintDataMapper, ClientPrintData> implements ClientPrintDataService {

    @Override
    public List<ClientPrintData> listBySchoolIdAndMachineCode(Long schoolId, String machineCode) {
        QueryWrapper<ClientPrintData> queryWrapper = new QueryWrapper<>();
        queryWrapper.lambda().eq(ClientPrintData::getSchoolId, schoolId).eq(ClientPrintData::getMachineCode, machineCode);
        return this.list(queryWrapper);
    }
}
