package com.da.dangan.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.da.dangan.mapper.DaUserCatalogMapper;
import com.da.dangan.domain.DaUserCatalog;
import com.da.dangan.service.IDaUserCatalogService;

/**
 * 用户目录关联Service业务层处理
 * 
 * @author hs
 * @date 2024-05-08
 */
@Service
public class DaUserCatalogServiceImpl implements IDaUserCatalogService 
{
    @Autowired
    private DaUserCatalogMapper daUserCatalogMapper;

    /**
     * 查询用户目录关联
     * 
     * @param userId 用户目录关联主键
     * @return 用户目录关联
     */
    @Override
    public DaUserCatalog selectDaUserCatalogByUserId(Long userId)
    {
        return daUserCatalogMapper.selectDaUserCatalogByUserId(userId);
    }

    /**
     * 查询用户目录关联列表
     * 
     * @param daUserCatalog 用户目录关联
     * @return 用户目录关联
     */
    @Override
    public List<DaUserCatalog> selectDaUserCatalogList(DaUserCatalog daUserCatalog)
    {
        return daUserCatalogMapper.selectDaUserCatalogList(daUserCatalog);
    }

    /**
     * 新增用户目录关联
     * 
     * @param daUserCatalog 用户目录关联
     * @return 结果
     */
    @Override
    public int insertDaUserCatalog(DaUserCatalog daUserCatalog)
    {
        return daUserCatalogMapper.insertDaUserCatalog(daUserCatalog);
    }

    /**
     * 修改用户目录关联
     * 
     * @param daUserCatalog 用户目录关联
     * @return 结果
     */
    @Override
    public int updateDaUserCatalog(DaUserCatalog daUserCatalog)
    {
        return daUserCatalogMapper.updateDaUserCatalog(daUserCatalog);
    }

    /**
     * 批量删除用户目录关联
     * 
     * @param userIds 需要删除的用户目录关联主键
     * @return 结果
     */
    @Override
    public int deleteDaUserCatalogByUserIds(Long[] userIds)
    {
        return daUserCatalogMapper.deleteDaUserCatalogByUserIds(userIds);
    }

    /**
     * 删除用户目录关联信息
     * 
     * @param userId 用户目录关联主键
     * @return 结果
     */
    @Override
    public int deleteDaUserCatalogByUserId(Long userId)
    {
        return daUserCatalogMapper.deleteDaUserCatalogByUserId(userId);
    }
}
