package com.ruoyi.model.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.model.mapper.AppCleanItemsMapper;
import com.ruoyi.model.domain.AppCleanItems;
import com.ruoyi.model.service.IAppCleanItemsService;

/**
 * 清洁物品Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-03-10
 */
@Service
public class AppCleanItemsServiceImpl implements IAppCleanItemsService 
{
    @Autowired
    private AppCleanItemsMapper appCleanItemsMapper;

    /**
     * 查询清洁物品
     * 
     * @param cleanItemsId 清洁物品主键
     * @return 清洁物品
     */
    @Override
    public AppCleanItems selectAppCleanItemsByCleanItemsId(Long cleanItemsId)
    {
        return appCleanItemsMapper.selectAppCleanItemsByCleanItemsId(cleanItemsId);
    }

    /**
     * 查询清洁物品列表
     * 
     * @param appCleanItems 清洁物品
     * @return 清洁物品
     */
    @Override
    public List<AppCleanItems> selectAppCleanItemsList(AppCleanItems appCleanItems)
    {
        return appCleanItemsMapper.selectAppCleanItemsList(appCleanItems);
    }

    /**
     * 新增清洁物品
     * 
     * @param appCleanItems 清洁物品
     * @return 结果
     */
    @Override
    public int insertAppCleanItems(AppCleanItems appCleanItems)
    {
        appCleanItems.setCreateTime(DateUtils.getNowDate());
        return appCleanItemsMapper.insertAppCleanItems(appCleanItems);
    }

    /**
     * 修改清洁物品
     * 
     * @param appCleanItems 清洁物品
     * @return 结果
     */
    @Override
    public int updateAppCleanItems(AppCleanItems appCleanItems)
    {
        appCleanItems.setUpdateTime(DateUtils.getNowDate());
        return appCleanItemsMapper.updateAppCleanItems(appCleanItems);
    }

    /**
     * 批量删除清洁物品
     * 
     * @param cleanItemsIds 需要删除的清洁物品主键
     * @return 结果
     */
    @Override
    public int deleteAppCleanItemsByCleanItemsIds(Long[] cleanItemsIds)
    {
        return appCleanItemsMapper.deleteAppCleanItemsByCleanItemsIds(cleanItemsIds);
    }

    /**
     * 删除清洁物品信息
     * 
     * @param cleanItemsId 清洁物品主键
     * @return 结果
     */
    @Override
    public int deleteAppCleanItemsByCleanItemsId(Long cleanItemsId)
    {
        return appCleanItemsMapper.deleteAppCleanItemsByCleanItemsId(cleanItemsId);
    }

    /**
     * 查询清洁物品列表
     *
     * @return 清洁物品集合
     */
    @Override
    public List<AppCleanItems> getAppCleanItemsList(){
        return appCleanItemsMapper.getAppCleanItemsList();
    }
}
