package com.yunfeiyun.agmp.fms.service.impl;

import com.yunfeiyun.agmp.fms.domain.WmsGoods;
import com.yunfeiyun.agmp.fms.mapper.WmsGoodsMapper;
import com.yunfeiyun.agmp.fms.service.IWmsGoodsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 货物Service业务层处理
 * 
 * @author 杨晓辉
 * @date 2023-05-25
 */
@Service
public class WmsGoodsServiceImpl implements IWmsGoodsService 
{
    @Autowired
    private WmsGoodsMapper wmsGoodsMapper;

    /**
     * 新增货物
     * 
     * @param wmsGoods 货物
     * @return 结果
     */
    @Override
    public int insertWmsGoods(WmsGoods wmsGoods)
    {
        return wmsGoodsMapper.insertWmsGoods(wmsGoods);
    }

    /**
     * 修改货物
     * 
     * @param wmsGoods 货物
     * @return 结果
     */
    @Override
    public int updateWmsGoods(WmsGoods wmsGoods)
    {
        return wmsGoodsMapper.updateWmsGoods(wmsGoods);
    }

    /**
     * 批量删除货物
     * 
     * @param goodsIds 需要删除的货物主键
     * @return 结果
     */
    @Override
    public int deleteWmsGoodsByGoodsIds(String[] goodsIds)
    {
        return wmsGoodsMapper.deleteWmsGoodsByGoodsIds(goodsIds);
    }

    /**
     * 删除货物信息
     * 
     * @param goodsId 货物主键
     * @return 结果
     */
    @Override
    public int deleteWmsGoodsByGoodsId(String goodsId)
    {
        return wmsGoodsMapper.deleteWmsGoodsByGoodsId(goodsId);
    }
}
