package com.fs.company.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.fs.company.domain.CompanyCompanyFsuser;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 销售绑定用户Mapper接口
 *
 * @author fs
 * @date 2025-04-09
 */
public interface CompanyCompanyFsuserMapper extends BaseMapper<CompanyCompanyFsuser>{
    /**
     * 查询销售绑定用户
     *
     * @param id 销售绑定用户主键
     * @return 销售绑定用户
     */
    CompanyCompanyFsuser selectCompanyCompanyUserById(Long id);

    /**
     * 查询销售绑定用户列表
     *
     * @param companyCompanyUser 销售绑定用户
     * @return 销售绑定用户集合
     */
    List<CompanyCompanyFsuser> selectCompanyCompanyUserList(CompanyCompanyFsuser companyCompanyUser);

    /**
     * 新增销售绑定用户
     *
     * @param companyCompanyUser 销售绑定用户
     * @return 结果
     */
    int insertCompanyCompanyUser(CompanyCompanyFsuser companyCompanyUser);

    /**
     * 修改销售绑定用户
     *
     * @param companyCompanyUser 销售绑定用户
     * @return 结果
     */
    int updateCompanyCompanyUser(CompanyCompanyFsuser companyCompanyUser);

    /**
     * 删除销售绑定用户
     *
     * @param id 销售绑定用户主键
     * @return 结果
     */
    int deleteCompanyCompanyUserById(Long id);

    /**
     * 批量删除销售绑定用户
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    int deleteCompanyCompanyUserByIds(Long[] ids);

    CompanyCompanyFsuser getInfoByUserId(@Param("userId") String userId);

    List<CompanyCompanyFsuser> selectNoHistoryApp(@Param("limit") Integer limit);

}
