package com.ics.admin.mapper;

import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ics.common.core.domain.IcsCustomerStaff;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 企业员工Mapper接口
 *
 * @author ics
 * @date 2024-02-19
 */
@Mapper
public interface IcsCustomerStaffMapper extends BaseMapper<IcsCustomerStaff> {
    /**
     * 查询企业员工
     *
     * @param id 企业员工ID
     * @return 企业员工
     */
    IcsCustomerStaff selectIcsCustomerStaffById(Long id);

    /**
     * 查询企业员工列表
     *
     * @param icsCustomerStaff 企业员工
     * @return 企业员工集合
     */
    List<IcsCustomerStaff> selectIcsCustomerStaffList(IcsCustomerStaff icsCustomerStaff);

    /**
     * 新增企业员工
     *
     * @param icsCustomerStaff 企业员工
     * @return 结果
     */
    int insertIcsCustomerStaff(IcsCustomerStaff icsCustomerStaff);

    /**
     * 修改企业员工
     *
     * @param icsCustomerStaff 企业员工
     * @return 结果
     */
    int updateIcsCustomerStaff(IcsCustomerStaff icsCustomerStaff);

    /**
     * 删除企业员工
     *
     * @param id 企业员工ID
     * @return 结果
     */
    int deleteIcsCustomerStaffById(Long id);

    /**
     * 批量删除企业员工
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    int deleteIcsCustomerStaffByIds(String[] ids);

    /**
     * 检查是否唯一手机号码
     * @return
     */
    String checkMobileUnique(@Param("mobile") String mobile);

    IcsCustomerStaff selectUserByOpenid(String openid);

    int updateByCustomer(IcsCustomerStaff customerStaff);

    IcsCustomerStaff selectUserByMobile(String mobile);

    List<IcsCustomerStaff> getUserList(IcsCustomerStaff customerStaff);

    IcsCustomerStaff selectUserByMobileAndParkId(@Param("mobile") String phoneNumber, @Param("parkId") String parkId);

    @InterceptorIgnore(tenantLine = "1")
    List<IcsCustomerStaff> selectListByCustomerId();

    List<IcsCustomerStaff> selectCustomerStaff(IcsCustomerStaff icsCustomerStaff);
}
