package com.zehong.system.service.impl;

import java.util.List;
import com.zehong.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zehong.system.mapper.TLpgDeliveryRecordMapper;
import com.zehong.system.domain.TLpgDeliveryRecord;
import com.zehong.system.service.ITLpgDeliveryRecordService;

/**
 * 液化石油配送记录Service业务层处理
 * 
 * @author zehong
 * @date 2024-07-22
 */
@Service
public class TLpgDeliveryRecordServiceImpl implements ITLpgDeliveryRecordService 
{
    @Autowired
    private TLpgDeliveryRecordMapper tLpgDeliveryRecordMapper;

    /**
     * 查询液化石油配送记录
     * 
     * @param deliveryRecordId 液化石油配送记录ID
     * @return 液化石油配送记录
     */
    @Override
    public TLpgDeliveryRecord selectTLpgDeliveryRecordById(Long deliveryRecordId)
    {
        return tLpgDeliveryRecordMapper.selectTLpgDeliveryRecordById(deliveryRecordId);
    }

    /**
     * 查询液化石油配送记录列表
     * 
     * @param tLpgDeliveryRecord 液化石油配送记录
     * @return 液化石油配送记录
     */
    @Override
    public List<TLpgDeliveryRecord> selectTLpgDeliveryRecordList(TLpgDeliveryRecord tLpgDeliveryRecord)
    {
        return tLpgDeliveryRecordMapper.selectTLpgDeliveryRecordList(tLpgDeliveryRecord);
    }

    /**
     * 新增液化石油配送记录
     * 
     * @param tLpgDeliveryRecord 液化石油配送记录
     * @return 结果
     */
    @Override
    public int insertTLpgDeliveryRecord(TLpgDeliveryRecord tLpgDeliveryRecord)
    {
        tLpgDeliveryRecord.setCreateTime(DateUtils.getNowDate());
        return tLpgDeliveryRecordMapper.insertTLpgDeliveryRecord(tLpgDeliveryRecord);
    }

    /**
     * 修改液化石油配送记录
     * 
     * @param tLpgDeliveryRecord 液化石油配送记录
     * @return 结果
     */
    @Override
    public int updateTLpgDeliveryRecord(TLpgDeliveryRecord tLpgDeliveryRecord)
    {
        tLpgDeliveryRecord.setUpdateTime(DateUtils.getNowDate());
        return tLpgDeliveryRecordMapper.updateTLpgDeliveryRecord(tLpgDeliveryRecord);
    }

    /**
     * 批量删除液化石油配送记录
     * 
     * @param deliveryRecordIds 需要删除的液化石油配送记录ID
     * @return 结果
     */
    @Override
    public int deleteTLpgDeliveryRecordByIds(Long[] deliveryRecordIds)
    {
        return tLpgDeliveryRecordMapper.deleteTLpgDeliveryRecordByIds(deliveryRecordIds);
    }

    /**
     * 删除液化石油配送记录信息
     * 
     * @param deliveryRecordId 液化石油配送记录ID
     * @return 结果
     */
    @Override
    public int deleteTLpgDeliveryRecordById(Long deliveryRecordId)
    {
        return tLpgDeliveryRecordMapper.deleteTLpgDeliveryRecordById(deliveryRecordId);
    }
}
