package com.hw.wms.service.impl;

import java.util.List;
import com.hw.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.hw.wms.mapper.WmsBasePositionMapper;
import com.hw.wms.domain.WmsBasePosition;
import com.hw.wms.service.IWmsBasePositionService;

/**
 * 位置信息Service业务层处理
 * 
 * @author xs
 * @date 2023-12-20
 */
@Service
public class WmsBasePositionServiceImpl implements IWmsBasePositionService 
{
    @Autowired
    private WmsBasePositionMapper wmsBasePositionMapper;

    /**
     * 查询位置信息
     * 
     * @param basePositionId 位置信息主键
     * @return 位置信息
     */
    @Override
    public WmsBasePosition selectWmsBasePositionByBasePositionId(Long basePositionId)
    {
        return wmsBasePositionMapper.selectWmsBasePositionByBasePositionId(basePositionId);
    }

    /**
     * 查询位置信息列表
     * 
     * @param wmsBasePosition 位置信息
     * @return 位置信息
     */
    @Override
    public List<WmsBasePosition> selectWmsBasePositionList(WmsBasePosition wmsBasePosition)
    {
        return wmsBasePositionMapper.selectWmsBasePositionList(wmsBasePosition);
    }

    /**
     * 新增位置信息
     * 
     * @param wmsBasePosition 位置信息
     * @return 结果
     */
    @Override
    public int insertWmsBasePosition(WmsBasePosition wmsBasePosition)
    {
        wmsBasePosition.setCreateTime(DateUtils.getNowDate());
        return wmsBasePositionMapper.insertWmsBasePosition(wmsBasePosition);
    }

    /**
     * 修改位置信息
     * 
     * @param wmsBasePosition 位置信息
     * @return 结果
     */
    @Override
    public int updateWmsBasePosition(WmsBasePosition wmsBasePosition)
    {
        wmsBasePosition.setUpdateTime(DateUtils.getNowDate());
        return wmsBasePositionMapper.updateWmsBasePosition(wmsBasePosition);
    }

    /**
     * 批量删除位置信息
     * 
     * @param basePositionIds 需要删除的位置信息主键
     * @return 结果
     */
    @Override
    public int deleteWmsBasePositionByBasePositionIds(Long[] basePositionIds)
    {
        return wmsBasePositionMapper.deleteWmsBasePositionByBasePositionIds(basePositionIds);
    }

    /**
     * 删除位置信息信息
     * 
     * @param basePositionId 位置信息主键
     * @return 结果
     */
    @Override
    public int deleteWmsBasePositionByBasePositionId(Long basePositionId)
    {
        return wmsBasePositionMapper.deleteWmsBasePositionByBasePositionId(basePositionId);
    }
}
