Skip to content

Latest commit

 

History

History
160 lines (126 loc) · 5.54 KB

AlipayCommerceEcEmployeeInfoApi.md

File metadata and controls

160 lines (126 loc) · 5.54 KB

AlipayCommerceEcEmployeeInfoApi

All URIs are relative to https://openapi.alipay.com

Method HTTP request Description
modify PUT /v3/alipay/commerce/ec/employee/info 修改员工基础信息
query GET /v3/alipay/commerce/ec/employee/info/query 查询员工详情

modify

AlipayCommerceEcEmployeeInfoModifyResponseModel modify(alipayCommerceEcEmployeeInfoModifyModel)

修改员工基础信息

修改员工基础信息

Example

// Import classes:
import com.alipay.v3.ApiClient;
import com.alipay.v3.ApiException;
import com.alipay.v3.Configuration;
import com.alipay.v3.util.*;
import com.alipay.v3.api.models.*;
import com.alipay.v3.api.AlipayCommerceEcEmployeeInfoApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://openapi.alipay.com");
    // 设置alipayConfig参数(全局设置一次)
    AlipayConfig config = new AlipayConfig();
    config.setAppId("app_id");
    config.setPrivateKey("private_key");
    config.setAlipayPublicKey("alipay_public_key");
    config.setEncryptKey("encrypt_key");
    defaultClient.setAlipayConfig(config);

    AlipayCommerceEcEmployeeInfoApi apiInstance = new AlipayCommerceEcEmployeeInfoApi(defaultClient);
    AlipayCommerceEcEmployeeInfoModifyModel alipayCommerceEcEmployeeInfoModifyModel = new AlipayCommerceEcEmployeeInfoModifyModel(); // AlipayCommerceEcEmployeeInfoModifyModel | 
    try {
      AlipayCommerceEcEmployeeInfoModifyResponseModel result = apiInstance.modify(alipayCommerceEcEmployeeInfoModifyModel);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling AlipayCommerceEcEmployeeInfoApi#modify");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
alipayCommerceEcEmployeeInfoModifyModel AlipayCommerceEcEmployeeInfoModifyModel [optional]

Return type

AlipayCommerceEcEmployeeInfoModifyResponseModel

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 common response -
0 请求失败 -

query

AlipayCommerceEcEmployeeInfoQueryResponseModel query(enterpriseId, employeeId, openId, userId, mobile)

查询员工详情

根据员工id或员工uid查询企业下某个员工的详细信息

Example

// Import classes:
import com.alipay.v3.ApiClient;
import com.alipay.v3.ApiException;
import com.alipay.v3.Configuration;
import com.alipay.v3.util.*;
import com.alipay.v3.api.models.*;
import com.alipay.v3.api.AlipayCommerceEcEmployeeInfoApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://openapi.alipay.com");
    // 设置alipayConfig参数(全局设置一次)
    AlipayConfig config = new AlipayConfig();
    config.setAppId("app_id");
    config.setPrivateKey("private_key");
    config.setAlipayPublicKey("alipay_public_key");
    config.setEncryptKey("encrypt_key");
    defaultClient.setAlipayConfig(config);

    AlipayCommerceEcEmployeeInfoApi apiInstance = new AlipayCommerceEcEmployeeInfoApi(defaultClient);
    String enterpriseId = "2088441363102941"; // String | 企业id
    String employeeId = "228420000000057942506"; // String | 员工id
    String openId = "074a1CcTG1LelxKe4xQC0zgNdId0nxi95b5lsNpazWYoCo5"; // String | 蚂蚁统一会员ID
    String userId = "2088501304519332"; // String | 蚂蚁统一会员ID
    String mobile = "134XXXX2526"; // String | 员工手机号码
    try {
      AlipayCommerceEcEmployeeInfoQueryResponseModel result = apiInstance.query(enterpriseId, employeeId, openId, userId, mobile);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling AlipayCommerceEcEmployeeInfoApi#query");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
enterpriseId String 企业id [optional]
employeeId String 员工id [optional]
openId String 蚂蚁统一会员ID [optional]
userId String 蚂蚁统一会员ID [optional]
mobile String 员工手机号码 [optional]

Return type

AlipayCommerceEcEmployeeInfoQueryResponseModel

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 common response -
0 请求失败 -