package com.iamberry.cms.service.milk;

import java.util.List;

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

import com.iamberry.cms.core.dto.MilkPowderInfoDto;
import com.iamberry.cms.core.entity.MilkPowderInfo;
import com.iamberry.cms.face.milk.MilkPowderService;
import com.iamberry.cms.service.mapper.MilkPowderMapper;

/**
 * 奶粉信息 service 实现类
 * 2016年12月12日
 * 穆再兴
 * @author Administrator
 *
 */
@Service
public class MilkPowderServiceImpl implements MilkPowderService{

	@Autowired
	private MilkPowderMapper milkPowderMapper;
	
	@Override
	public List<MilkPowderInfo> selectMilkPowderList(
			MilkPowderInfoDto milkPowderDto) {
		milkPowderDto.getPage().initRecordBegin();
		return milkPowderMapper.selectMilkPowderList(milkPowderDto);
	}

	@Override
	public Integer selectMilkPowderCount(MilkPowderInfoDto milkPowderDto) {
		// TODO Auto-generated method stub
		return milkPowderMapper.selectMilkPowderCount(milkPowderDto);
	}

	@Override
	public MilkPowderInfo selectMilkPowderInfoById(Integer id) {
		// TODO Auto-generated method stub
		return milkPowderMapper.selectMilkPowderInfoById(id);
	}

	@Override
	public Integer insertMilkPowderInfo(MilkPowderInfo milkPowderInfo) {
		// TODO Auto-generated method stub
		return milkPowderMapper.insertMilkPowderInfo(milkPowderInfo);
	}

	@Override
	public Integer updateMilkPowderInfoById(MilkPowderInfo milkPowderInfo) {
		// TODO Auto-generated method stub
		return milkPowderMapper.updateMilkPowderInfoById(milkPowderInfo);
	}

	@Override
	public Integer deleteMilkPowderInfoById(Integer id) {
		// TODO Auto-generated method stub
		return milkPowderMapper.deleteMilkPowderInfoById(id);
	}

	@Override
	public Integer selectMilkPowderInfoByCode(MilkPowderInfo milkPowderInfo) {
		// TODO Auto-generated method stub
		return milkPowderMapper.selectMilkPowderInfoByCode(milkPowderInfo);
	}

	
}
