package com.sw.common.accessory.server.service.impl;

import com.sw.common.accessory.server.entity.AccessoryPartDetails;
import com.sw.common.accessory.server.mapper.AccessoryPartDetailsMapper;
import com.sw.common.accessory.server.service.AccessoryPartDetailsService;
import com.sw.common.mybatisplus.base.BaseServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AccessoryPartDetailsServiceImpl extends BaseServiceImpl<AccessoryPartDetailsMapper, AccessoryPartDetails> implements AccessoryPartDetailsService {
    @Autowired
    private AccessoryPartDetailsMapper accessoryPartDtailsMapper;

    @Override
    public List<AccessoryPartDetails> getByMaterialCode(String materialCode) {
        return accessoryPartDtailsMapper.getByMaterialCode(materialCode);
    }

    @Override
    public List<AccessoryPartDetails> getByPartCode(String partCode) {
        return accessoryPartDtailsMapper.getByPartCode(partCode);
    }

    @Override
    public List<AccessoryPartDetails> getByDeviceTypeCode(String deviceTypeCode) {
        return accessoryPartDtailsMapper.getByDeviceTypeCode(deviceTypeCode);
    }

    @Override
    public List<AccessoryPartDetails> getByDeviceCode(String deviceCode) {
        return accessoryPartDtailsMapper.getByDeviceCode(deviceCode);
    }

    @Override
    public AccessoryPartDetails getByCode(String deviceTypeCode, String deviceCode, String materialCode, String partCode) {
        return accessoryPartDtailsMapper.getByCode(deviceTypeCode,deviceCode,materialCode,partCode);
    }

    @Override
    public List<AccessoryPartDetails> getByNotDeviceCode(String deviceTypeCode, String materialCode, String partCode) {
        return accessoryPartDtailsMapper.getByNotDeviceCode(deviceTypeCode,materialCode,partCode);
    }

    @Override
    public Boolean deleteByCode(String deviceTypeCode,String materialCode, String partCode) {
        return accessoryPartDtailsMapper.deleteByCode(deviceTypeCode,materialCode,partCode);
    }

    @Override
    public AccessoryPartDetails getByDeviceCodeAndMaterialCode(String deviceCode, String materialCode) {
        return accessoryPartDtailsMapper.getByDeviceCodeAndMaterialCode(deviceCode,materialCode);
    }
}
