package com.fs.qw.mapper;

import com.fs.qw.domain.QwContact;
import com.fs.qw.domain.QwInnerContact;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 企微功能账号管理Mapper接口
 *
 * @author fs
 * @date 2023-08-23
 */

public interface QwInnerContactMapper
{

    /**
     * 新增企微联系人
     *
     * @return 结果
     */
    public int insertQwInnerContact(QwInnerContact innerContact);

    /**
     * 修改企微联系人
     *
     * @return 结果
     */
    public int updateQwInnerContact(QwInnerContact innerContact);

    @Select("select distinct * from qw_inner_contact where user_id = #{userId} ")
    QwInnerContact selectInnerContactById(@Param("userId") Long userId);

    @Select("select distinct * from qw_inner_contact where corp_id = #{corpId} and user_id = #{userId} ")
    QwInnerContact selectInnerContactByUserId(@Param("corpId") Long corpId,@Param("userId") Long userId);

}
