四会课小程序领取0719.md 2.63 KB

996.icu

四会课程 小程序领取接口0719

1. 微信用户登录,跟原来接口一样
  • URL: {{localhost}}/boxfish-online-card/wxUser/userLogin
  • Method: POST
  • RequestBody:
{
  // 登录凭证
  "jsCode": "wx_jsCode",
  // 用户信息
  "nickName": "user_nickName",
  "avatarUrl":"user_avatarUrl"
}
  • ResponseBody:
    // status
    private ResponseStatus status;
    private String message;
    // body
    private String openId;
    private String wxToken;
2. 通过邀请码,建立邀请关系
  • URL: {{localhost}}/boxfish-online-card/wx_mini/addUserRelationship/v2
  • Method: POST
  • RequestBody:
{
    "openId": "user_openId",
    "invitationCode": "invitation_code"
}
  • ResponseBody:
public static class Response {
    // status
    private ResponseStatus status;
    private String message;

    // 邀请人信息
    private String invitationOpenId;
    private String invitationNickName;
    private String invitationAvatarUrl;
}
3. 用户查询领取信息接口
  • URL: {{localhost}}/boxfish-online-card/order/mini/getUserObtainSummary
  • Method: POST
  • RequestBody:
{
  "userOpenId": "open_id_userOpenId"
}
  • ResponseBody:
{
  "status": "SUCCESS",

  // 正价课 是否领取 + 领取正价课手机号
  "courseProductHasObtain": true,
  "courseProductOrderMobile": "1233344",
  // 体验课 是否领取 + 领取体验课手机号
  "courseExperienceHasObtain": false,
  "courseExperienceOrderMobile": "223455667766",

  // 用户身份 + 用户邀请码
  "userType": "BUSINESS",
  "userInvitationCode": "100000004",

  // 经销商 邀请领取人信息
  "invitationList": [
    {
      "openId":"invitation_openId",
      "nickName": "张三",
      "avatarUrl": "avatar_avatarUrl",
      "flagPlaceOrder": true,
      "orderTime": "2019-07-19 00:00:11"
    }
  ]
}
4. 小程序领取课程提交接口
  • URL: {{localhost}}/boxfish-online-card/order/mini/submitCourseOrder
  • Method: POST
  • RequestBody:
{
  // 领取人openId
  "openId": "openId",
  // 邀请人的邀请码
  "invitationCode": 100000001,

  // 领取课程类型:体验课 = 'COURSE_EXPERIENCE', 正式课 = "COURSE_PRODUCT"
  "courseType": "COURSE_EXPERIENCE",
  // 领取的教材版本
  "versionCode": "versionCode",

  // 领取人信息
  "orderName": "orderName",
  "orderMobile": "orderMobile",

  // 领取人地址
  "orderProvince": "orderProvince",
  "orderCity": "orderCity",
  "orderCounty": "orderCounty",
  "orderAddressDetail": "orderAddressDetail"
}