package com.ruoyi.system.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.system.mapper.TFacilityMapper;
import com.ruoyi.system.domain.TFacility;
import com.ruoyi.system.service.ITFacilityService;

/**
 * 手环设备Service业务层处理
 * 
 * @author zhengjie
 * @date 2023-08-12
 */
@Service
public class TFacilityServiceImpl implements ITFacilityService 
{
    @Autowired
    private TFacilityMapper tFacilityMapper;

    /**
     * 查询手环设备
     * 
     * @param id 手环设备主键
     * @return 手环设备
     */
    @Override
    public TFacility selectTFacilityById(Long id)
    {
        return tFacilityMapper.selectTFacilityById(id);
    }

    /**
     * 查询手环设备列表
     * 
     * @param tFacility 手环设备
     * @return 手环设备
     */
    @Override
    public List<TFacility> selectTFacilityList(TFacility tFacility)
    {
        return tFacilityMapper.selectTFacilityList(tFacility);
    }

    /**
     * 新增手环设备
     * 
     * @param tFacility 手环设备
     * @return 结果
     */
    @Override
    public int insertTFacility(TFacility tFacility)
    {
        tFacility.setCreateTime(DateUtils.getNowDate());
        return tFacilityMapper.insertTFacility(tFacility);
    }

    /**
     * 修改手环设备
     * 
     * @param tFacility 手环设备
     * @return 结果
     */
    @Override
    public int updateTFacility(TFacility tFacility)
    {
        return tFacilityMapper.updateTFacility(tFacility);
    }

    /**
     * 批量删除手环设备
     * 
     * @param ids 需要删除的手环设备主键
     * @return 结果
     */
    @Override
    public int deleteTFacilityByIds(Long[] ids)
    {
        return tFacilityMapper.deleteTFacilityByIds(ids);
    }

    /**
     * 删除手环设备信息
     * 
     * @param id 手环设备主键
     * @return 结果
     */
    @Override
    public int deleteTFacilityById(Long id)
    {
        return tFacilityMapper.deleteTFacilityById(id);
    }
}
