四会课小程序领取0512.md
4.76 KB
四会课程 小程序领取接口
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/wxUser/addRelationship
- Method: POST
- RequestBody:
{
"openId": "user_openId",
"invitationCode": "invitation_code"
}
- ResponseBody:
public static class Response {
// status
private ResponseStatus status;
private String message;
// 分享人信息
private String sourceOpenId;
private String sourceNickName;
private String sourceAvatarUrl;
// 领取人信息
private String targetOpenId;
private String targetNickName;
private String targetAvatarUrl;
// 用户当前状态
private Boolean flagUserHasObtain; // 是否领取课程
private Long invitationCode; // 已经领取,返回当前用户的邀请码
}
3. 微信用户获取全部的教材版本、年级信息
- URL: {{localhost}}/boxfish-online-card/textbook/version/getTextbookGrade
- Method: POST
- RequestBody:
json字符串
4. 【此接口弃用,转用4.1接口】用户提交教材版本、手机号、地址信息
- URL: {{localhost}}/boxfish-online-card/textbook/version/submitTextbookVersion
- Method: POST
- RequestBody:
public static class Request {
private String name; // 收货人名称
private String mobile;
private String address;
private String versionCode;
private String openId;
private Long invitationCode;
}
- ResponseBody:
public static class Response {
// status
private ResponseStatus status;
private String message;
private Long invitationCode;
}
4.1. 用户提交教材版本、手机号、地址信息,领取四会课程
- URL: {{localhost}}/boxfish-online-card/order/textbook/submitTextbookOrder
- Method: POST
-
RequestBody:
public static class Request { private String versionCode; // 领取versionCode private String orderName; // 收货人名称 private String orderMobile; // 收货人手机号 private String orderProvince; // 省 private String orderCity; // 市 private String orderCounty; // 区 private String orderAddressDetail; // 详细地址 private String openId; // 微信openId private Long invitationCode; // 邀请人的邀请码 }
5. 查询已经领取的教材信息、邀请的用户信息
- URL: {{localhost}}/boxfish-online-card/textbook/obtain/getObtainTextbook
- Method: POST
-
RequestBody:
{ "openId": "wx_user_openId" }
ResponseBody:
public static class Response {
// status
private ResponseStatus status;
private String message;
// 邀请码
private Long invitationCode;
// 领取的课程信息
private List<TextbookInfo> textbookList = new ArrayList<>();
// 邀请的好友信息
private List<WxUserInfo> targetWxUserList = new ArrayList<>();
}
// `textbookList` 信息
public static class TextbookInfo {
private String textbookCover;
private String textbookLabel;
}
// `targetWxUserList` 信息
public static class WxUserInfo {
private String openId;
private String nickName;
private String avatarUrl;
private Boolean flagPlaceOrder;
}
6. 缺用户是否已经建立过绑定关系,如果建立过,返回之前绑定关系的邀请码
- URL: {{localhost}}/boxfish-online-card/wxUser/confirm
- Method: POST
-
RequestBody:
{ "openId": "wx_user_openId" }
ResponseBody:
public static class Response {
// status
private ResponseStatus status;
private String message;
private Boolean flagUserHasInvitationCode;
private Long invitationCode;
}
7. 小程序领取小学期 提交接口
- URL: {{localhost}}/boxfish-online-card/order/textbook/submitXxqOrder
- Method: POST
-
RequestBody:
{ "grade": "GRADE_8_A", "orderName": "领取测试-hua23", "orderMobile": "18388880000", "orderProvince": "北京市", "orderCity": "北京市", "orderCounty": "朝阳区", "orderAddressDetail": "太阳宫", "openId": "oa-sI0UT7aWRT44vi8bIT1i8KYCI", "invitationCode": "100000004" }
-
ResponseBody:
{ "status": "SUCCESS", "message": "领取成功", "invitationCode": 100000340 }