Class WeChatWorkCustomerService

java.lang.Object
com.bytedesk.wechat.work.customer.WeChatWorkCustomerService

@Service public class WeChatWorkCustomerService extends Object
企业微信-客户联系功能服务 文档地址: https://developer.work.weixin.qq.com/document/path/92113
Author:
kefux.com
  • Field Details

  • Constructor Details

    • WeChatWorkCustomerService

      public WeChatWorkCustomerService()
  • Method Details

    • getFollowUserList

      public List<String> getFollowUserList(String corpId, String appSecret)
      获取配置了客户联系功能的成员列表
      Parameters:
      corpId - 企业ID
      appSecret - 应用密钥
      Returns:
      配置了客户联系功能的成员列表
    • checkFollowUser

      public WeChatWorkCustomerResponse checkFollowUser(WeChatWorkCustomerRequest request)
      检查用户是否具备客户联系功能
      Parameters:
      request - 包含用户ID和部门ID的请求对象
      Returns:
      检查结果
    • getExternalUserList

      public List<String> getExternalUserList(String corpId, String appSecret, String userId)
      获取客户列表
      Parameters:
      corpId - 企业ID
      appSecret - 应用密钥
      userId - 企业成员的userid
      Returns:
      客户的userid列表
    • getExternalUserDetail

      public WeChatWorkCustomerResponse getExternalUserDetail(String corpId, String appSecret, String externalUserId, String cursor)
      获取客户详情
      Parameters:
      externalUserId - 外部联系人的userid
      cursor - 分页游标
      Returns:
      客户详情
    • batchGetExternalUserDetail

      public org.springframework.data.domain.Page<Map<String,Object>> batchGetExternalUserDetail(WeChatWorkCustomerRequest request)
      批量获取客户详情
      Parameters:
      request - 请求对象
      Returns:
      客户详情列表
    • updateExternalUserRemark

      public boolean updateExternalUserRemark(WeChatWorkCustomerRequest request)
      修改客户备注信息
      Parameters:
      request - 请求对象
      Returns:
      是否成功
    • getCustomerStrategyList

      public WeChatWorkCustomerResponse getCustomerStrategyList(String corpId, String appSecret, String cursor, Integer limit)
      获取规则组列表
      Parameters:
      corpId - 企业ID
      appSecret - 应用密钥
      cursor - 分页游标,首次调用可不填
      limit - 分页大小,默认为1000,最大不超过1000
      Returns:
      规则组列表
    • getCustomerStrategy

      public WeChatWorkCustomerResponse getCustomerStrategy(String corpId, String appSecret, Integer strategyId)
      获取规则组详情
      Parameters:
      corpId - 企业ID
      appSecret - 应用密钥
      strategyId - 规则组id
      Returns:
      规则组详情
    • getCustomerStrategyRange

      public WeChatWorkCustomerResponse getCustomerStrategyRange(String corpId, String appSecret, Integer strategyId, String cursor, Integer limit)
      获取规则组管理范围
      Parameters:
      corpId - 企业ID
      appSecret - 应用密钥
      strategyId - 规则组id
      cursor - 分页游标
      limit - 每个分页的成员/部门节点数,默认为1000,最大为1000
      Returns:
      规则组管理范围
    • createCustomerStrategy

      public WeChatWorkCustomerResponse createCustomerStrategy(WeChatWorkCustomerRequest request)
      创建新的规则组
      Parameters:
      request - 请求对象
      Returns:
      创建结果,包含新创建的规则组id
    • editCustomerStrategy

      public boolean editCustomerStrategy(WeChatWorkCustomerRequest request)
      编辑规则组及其管理范围
      Parameters:
      request - 请求对象
      Returns:
      是否成功
    • deleteCustomerStrategy

      public boolean deleteCustomerStrategy(String corpId, String appSecret, Integer strategyId)
      删除规则组
      Parameters:
      corpId - 企业ID
      appSecret - 应用密钥
      strategyId - 规则组id
      Returns:
      是否成功