package com.songhua.system.service.impl;

import java.util.List;

import com.songhua.common.utils.DateUtils;
import com.songhua.common.utils.uuid.IdUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.songhua.system.mapper.CruiseShipMappingMapper;
import com.songhua.system.domain.CruiseShipMapping;
import com.songhua.system.service.ICruiseShipMappingService;

/**
 * Service业务层处理
 */
@Service
public class CruiseShipMappingServiceImpl implements ICruiseShipMappingService 
{
    @Autowired
    private CruiseShipMappingMapper cruiseShipMappingMapper;

    /**
     * 查询
     */
    @Override
    public CruiseShipMapping selectCruiseShipMappingById(String id)
    {
        return cruiseShipMappingMapper.selectCruiseShipMappingById(id);
    }

    /**
     * 查询列表
     */
    @Override
    public List<CruiseShipMapping> selectCruiseShipMappingList(CruiseShipMapping cruiseShipMapping)
    {
        return cruiseShipMappingMapper.selectCruiseShipMappingList(cruiseShipMapping);
    }

    /**
     * 新增
     */
    @Override
    public int insertCruiseShipMapping(CruiseShipMapping cruiseShipMapping)
    {
        cruiseShipMapping.setId(IdUtils.simpleUUID());
        cruiseShipMapping.setShipTime(DateUtils.getNowDate());
        return cruiseShipMappingMapper.insertCruiseShipMapping(cruiseShipMapping);
    }

    /**
     * 修改
     */
    @Override
    public int updateCruiseShipMapping(CruiseShipMapping cruiseShipMapping)
    {
        return cruiseShipMappingMapper.updateCruiseShipMapping(cruiseShipMapping);
    }

    /**
     * 批量删除
     */
    @Override
    public int deleteCruiseShipMappingByIds(String[] ids)
    {
        return cruiseShipMappingMapper.deleteCruiseShipMappingByIds(ids);
    }

    /**
     * 删除信息
     */
    @Override
    public int deleteCruiseShipMappingById(String id)
    {
        return cruiseShipMappingMapper.deleteCruiseShipMappingById(id);
    }
}
