package com.fs.company.service.impl;

import java.util.List;
import com.fs.common.utils.DateUtils;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fs.company.param.CompanyDomainBindUserParam;
import com.fs.company.vo.CompanyDomainBindUserVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.fs.company.mapper.CompanyDomainBindUserMapper;
import com.fs.company.domain.CompanyDomainBindUser;
import com.fs.company.service.ICompanyDomainBindUserService;

/**
 * 企业域名分配中间表Service业务层处理
 * 
 * @author fs
 * @date 2025-06-19
 */
@Service
public class CompanyDomainBindUserServiceImpl extends ServiceImpl<CompanyDomainBindUserMapper, CompanyDomainBindUser> implements ICompanyDomainBindUserService {

    /**
     * 查询企业域名分配中间表
     * 
     * @param id 企业域名分配中间表主键
     * @return 企业域名分配中间表
     */
    @Override
    public CompanyDomainBindUser selectCompanyDomainBindUserById(Long id)
    {
        return baseMapper.selectCompanyDomainBindUserById(id);
    }

    /**
     * 查询企业域名分配中间表列表
     * 
     * @param companyDomainBindUser 企业域名分配中间表
     * @return 企业域名分配中间表
     */
    @Override
    public List<CompanyDomainBindUserVo> selectCompanyDomainBindUserList(CompanyDomainBindUserParam companyDomainBindUser)
    {
        return baseMapper.selectDoaminBindUserJoinInfo(companyDomainBindUser);
    }

    /**
     * 新增企业域名分配中间表
     * 
     * @param companyDomainBindUser 企业域名分配中间表
     * @return 结果
     */
    @Override
    public int insertCompanyDomainBindUser(CompanyDomainBindUser companyDomainBindUser)
    {
        companyDomainBindUser.setCreateTime(DateUtils.getNowDate());
        return baseMapper.insertCompanyDomainBindUser(companyDomainBindUser);
    }

    /**
     * 修改企业域名分配中间表
     * 
     * @param companyDomainBindUser 企业域名分配中间表
     * @return 结果
     */
    @Override
    public int updateCompanyDomainBindUser(CompanyDomainBindUser companyDomainBindUser)
    {
        return baseMapper.updateCompanyDomainBindUser(companyDomainBindUser);
    }

    /**
     * 批量删除企业域名分配中间表
     * 
     * @param ids 需要删除的企业域名分配中间表主键
     * @return 结果
     */
    @Override
    public int deleteCompanyDomainBindUserByIds(Long[] ids)
    {
        return baseMapper.deleteCompanyDomainBindUserByIds(ids);
    }

    /**
     * 删除企业域名分配中间表信息
     * 
     * @param id 企业域名分配中间表主键
     * @return 结果
     */
    @Override
    public int deleteCompanyDomainBindUserById(Long id)
    {
        return baseMapper.deleteCompanyDomainBindUserById(id);
    }
}
