package com.hotent.uc.manager;

import cn.hutool.json.JSONObject;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hotent.base.manager.BaseManager;
import com.hotent.base.model.CommonResult;
import com.hotent.uc.model.*;
import com.hotent.uc.params.user.UserVo;

import java.util.List;
import java.util.Map;

/**
 * @description  钉钉api调用服务类
 * @author  yangzibin
 * @date    2024/1/2 10:09
 * @param	null
 * @return
 */
public interface DingUserManager extends BaseManager<OrgExternalUser> {


    /**
     * @description  钉钉向系统同步用户
     * @author  yangzibin
     * @date    2024/1/8 16:52
     * @param	orgExternalUser
     * @return  com.hotent.base.model.CommonResult<java.lang.String>
     */
    CommonResult<String> dingToSystemUser(String orgId,OrgExternalUser orgExternalUser);




   /**
    * @description  中台向钉钉同步用户
    * @author  yangzibin
    * @date    2024/1/9 15:25
    * @param	orgId
    * @param	user
    * @return  com.hotent.base.model.CommonResult<java.lang.String>
    */
    CommonResult<String> systemToDingUser(String orgId, User user);

    /**
     * @description  查询分类
     * @author  yangzibin
     * @date    2024/1/16 9:49
     * @param	page
     * @return  com.baomidou.mybatisplus.core.metadata.IPage<java.util.List<java.util.Map<java.lang.String,java.lang.Object>>>
     */
    IPage<List<Map<String, Object>>> queryUserComplex(Page page,String type,String userName,String mobile,String orgId,String deptId);

    /**
     * @description  获取钉钉用户详情
     * @author  yangzibin
     * @date    2024/1/17 10:51
     * @param	extUserId
     * @param	orgId
     * @return  java.util.Map<java.lang.String,java.lang.Object>
     */
    Map<String,Object>  queryExtUserInfo(String extUserId,String orgId);


   /**
    * @description 根据系统userId获取钉钉UserId
    * @author  yangzibin
    * @date    2024/3/19 9:51
    * @param	userId
    * @return  com.hotent.uc.model.OrgExternalUser
    */
    OrgExternalUser  queryExtUserInfoById(String userId);


    void addExtUserInfo(UserVo userVo);

}
