huanghongfa
2021-07-21 e8d587a11ed6e7e44ffcff948960cfdfa26744fa
修改bug
1个文件已修改
6 ■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/WxOfficialApi.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/WxOfficialApi.java
@@ -73,7 +73,7 @@
        Map<String, Object> map = new HashMap<>();
        map.put("type", "news"); // news表示图文类型的素材,具体看API文档
        map.put("offset", 0);
        map.put("count", 1);
        map.put("count", 10);
        // 将map转换成json字符串
        String paramBody = JSON.toJSONString(map); // 这里用了Alibaba的fastjson
@@ -112,13 +112,13 @@
            }
        }
        List<String> resultList = new ArrayList<>();
        List<JSONObject> resultList = new ArrayList<>();
        if(!tokenList.isEmpty()){
            tokenList.forEach(token -> {
                try {
                    String result = officialApi.getContentList(token);
                    log.info("通过token获取文章列表成功,返回结果:" + result);
                    resultList.add(result);
                    resultList.add(JSON.parseObject(result));
                }catch (Exception e){
                    log.error("通过token获取文章列表失败,错误原因:" + e.getMessage());
                }