浏览代码

coding:微信配置

zhangqin 1 天之前
父节点
当前提交
db174ec91c
共有 1 个文件被更改,包括 4 次插入3 次删除
  1. 4 3
      fs-ad-new-api/src/main/java/com/fs/app/controller/WeChatController.java

+ 4 - 3
fs-ad-new-api/src/main/java/com/fs/app/controller/WeChatController.java

@@ -59,15 +59,16 @@ public class WeChatController {
                             .execute();
                     JSONObject obj = JSONObject.parseObject(execute2.body());
                     access_token = obj.getString("access_token");
+                    log.info("getSchemeUrl:{}", obj);
                     advMiniConfig.setAccessToken(access_token);
-                    advMiniConfig.setExpiresIn(LocalDateTime.now().plusSeconds(obj.getLong("expires_in")));
+                    advMiniConfig.setExpiresIn(LocalDateTime.now().plusSeconds(obj.getInteger("expires_in")));
                     advMiniConfigService.updateById(advMiniConfig);
                 }
                 Map<String, Object> map = new HashMap<>();
                 Map<String, Object> map2 = new HashMap<>();
-                map2.put("path", "/pages/shopping/productDetails");
+                map2.put("path", "pages/home/productList");
                 map2.put("query", "traceId=" + traceId);
-                map2.put("env_version", "trial");
+                    map2.put("env_version", "trial");
                 map.put("jump_wxa", map2);
                 map.put("is_expire", false);
                 HttpResponse execute = HttpRequest.post("https://api.weixin.qq.com/wxa/generatescheme?access_token=" + access_token)