package com.platform.yijia.service.impl;

import com.platform.yijia.dao.StationOilGunMapper;
import com.platform.yijia.pojo.StationOilGun;
import com.platform.yijia.pojo.StationOilGunExample;
import com.platform.yijia.service.StationOilGunService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

@Service("stationOilGunService")
public class StationOilGunServiceImpl implements StationOilGunService {
    @Resource
    private StationOilGunMapper stationOilGunMapper;
    @Override
    public List<StationOilGun> stationOilGunList(StationOilGun stationOilGun) {
        StationOilGunExample example = new StationOilGunExample();
        example.or().andStationIdEqualTo(stationOilGun.getStationId());
        List<StationOilGun> stationInfolist = stationOilGunMapper.selectByExample(example);
        return stationInfolist;

    }

    /*
     * 根据油站Id油枪号获取打印机编号
     * @param params
     * @return
     */
    @Override
    public Map<String, Object> getPrinterSnByStationIdAndOilGunNo(Map<String, Object> params) {
        return stationOilGunMapper.getPrinterSnByStationIdAndOilGunNo(params);
    }
}
