package com.fuzamei.service.serviceImpl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.fuzamei.entity.Part;
import com.fuzamei.entity.Status;
import com.fuzamei.mapperInterface.PartMapper;
import com.fuzamei.service.PartService;

@Service
public class PartServiceImpl implements PartService {

	@Autowired
	private PartMapper partMapper;
	
	@Override
	public void checkIfHasThePartNo(String partNo) {
		int count = partMapper.checkIfHasThePartNo(partNo);
		if(count==0) throw new RuntimeException("该零件号不存在");
	}

	@Override
	public List<Part> queryAllPartInformation() {
		return partMapper.queryAllPartInformation();
	}


}
