package com.zehong.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zehong.system.mapper.TDetectorUserMapper;
import com.zehong.system.domain.TDetectorUser;
import com.zehong.system.service.ITDetectorUserService;
import com.github.pagehelper.PageInfo;

/**
 * 探测器用户Service业务层处理
 * 
 * @author zehong
 * @date 2021-11-02
 */
@Service
public class TDetectorUserServiceImpl implements ITDetectorUserService 
{
    @Autowired
    private TDetectorUserMapper tDetectorUserMapper;

    /**
     * 查询探测器用户
     * 
     * @param userId 探测器用户ID
     * @return 探测器用户
     */
    @Override
    public TDetectorUser selectTDetectorUserById(Long userId)
    {
        return tDetectorUserMapper.selectTDetectorUserById(userId);
    }

    /**
     * 查询探测器用户列表
     * 
     * @param tDetectorUser 探测器用户
     * @return 探测器用户
     */
    @Override
    public List<TDetectorUser> selectTDetectorUserList(TDetectorUser tDetectorUser)
    {
        return tDetectorUserMapper.selectTDetectorUserList(tDetectorUser);
    }

    /**
     * 查询探测器用户分页列表
     *
     * @param tDetectorUser 探测器用户
     * @return 探测器用户
     */
    @Override
    public PageInfo<TDetectorUser> selectTDetectorUserPage(TDetectorUser tDetectorUser)
    {
        return new PageInfo(tDetectorUserMapper.selectTDetectorUserList(tDetectorUser));
    }

    /**
     * 新增探测器用户
     * 
     * @param tDetectorUser 探测器用户
     * @return 结果
     */
    @Override
    public int insertTDetectorUser(TDetectorUser tDetectorUser)
    {
        return tDetectorUserMapper.insertTDetectorUser(tDetectorUser);
    }

    /**
     * 修改探测器用户
     * 
     * @param tDetectorUser 探测器用户
     * @return 结果
     */
    @Override
    public int updateTDetectorUser(TDetectorUser tDetectorUser)
    {
        return tDetectorUserMapper.updateTDetectorUser(tDetectorUser);
    }

    /**
     * 批量删除探测器用户
     * 
     * @param userIds 需要删除的探测器用户ID
     * @return 结果
     */
    @Override
    public int deleteTDetectorUserByIds(Long[] userIds)
    {
        return tDetectorUserMapper.deleteTDetectorUserByIds(userIds);
    }

    /**
     * 删除探测器用户信息
     * 
     * @param userId 探测器用户ID
     * @return 结果
     */
    @Override
    public int deleteTDetectorUserById(Long userId)
    {
        return tDetectorUserMapper.deleteTDetectorUserById(userId);
    }
}
