| | |
| | | private static final String COURSE_CHAPTER = "https://api.xiaoe-tech.com/xe.course.course.chapter.get/1.0.0"; |
| | | //获取店铺商品分组列表 |
| | | private static final String COURSE_GROUP_LIST = "https://api.xiaoe-tech.com/xe.resource_tags.list/1.0.0"; |
| | | //获取店铺商品分组列表 |
| | | private static final String CREATE_LIVE_PASSWORD = "https://api.xiaoe-tech.com/xe.alive.live_password.create/1.0.0"; |
| | | |
| | | |
| | | /** |
| | |
| | | xiaoeLiveVOPage.setRecords(xiaoeLiveVos); |
| | | xiaoeLiveVOPage.setCurrent(dto.getPage()); |
| | | xiaoeLiveVOPage.setPages(data.getLong("page_count")); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | return xiaoeLiveVOPage; |
| | |
| | | } |
| | | return courseChapterVOList; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取开播口令 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | public JSONObject createLivePassword(String id) { |
| | | Map<String, Object> requestParams = new HashMap<>(); |
| | | requestParams.put("alive_id", id); |
| | | requestParams.put("access_token", getAccessToken()); |
| | | String post = HttpUtil.post(CREATE_LIVE_PASSWORD, JSONObject.toJSONString(requestParams)); |
| | | if (StringUtils.isNotBlank(post)) { |
| | | log.info("获取开播口令返回结果:{}" ,post); |
| | | JSONObject jsonObject = JSONObject.parseObject(post); |
| | | if (jsonObject.get("code").equals(0)) { |
| | | JSONObject data = jsonObject.getJSONObject("data"); |
| | | return data; |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | |
| | | public static void main(String[] args) { |
| | | String urlString = BASE_URL + |
| | | "?app_id=appwmuwNWD48082" + |