package com.cm.common.dingding.service;

import com.cm.common.exception.SearchException;
import com.dingtalk.api.response.OapiUserGetResponse;

/**
 * When you feel like quitting. Think about why you started
 * 当你想要放弃的时候，想想当初你为何开始
 *
 * @ClassName: IDingDingUserService
 * @Description: 钉钉App用户业务
 * @Author: WangGeng
 * @Date: 2020/8/31 20:18
 * @Version: 1.0
 **/
public interface IDingDingAppUserService {

    /**
     * 通过UnionId获取userId
     *
     * @param unionId
     * @return
     * @throws SearchException
     */
    String getUserIdByUnionId(String unionId) throws SearchException;

    /**
     * 通过UserId获取用户详情
     *
     * @param userId
     * @return
     * @throws SearchException
     */
    OapiUserGetResponse getUserByUserId(String userId) throws SearchException;

    /**
     * 通过手机获取用户ID
     *
     * @param phone
     * @return
     */
    String getUserIdByPhone(String phone);

}
