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.Box;
import com.fuzamei.mapperInterface.BoxMapper;
import com.fuzamei.service.BoxService;
@Service
public class BoxServiceImpl implements BoxService {
	
	@Autowired
	private BoxMapper boxMapper;

	@Override
	public void checkIfHasTheBoxNo(String boxNo) {
		int count = boxMapper.checkIfHasTheBoxNo(boxNo);
		if(count==0) throw new RuntimeException("该箱号不存在");
	}

	@Override
	public List<Box> queryAllBoxInformation() {
		return boxMapper.queryAllBoxInformation();
	}
}
