From aa8ff2d61669d0779fdacdba76e26388587b435d Mon Sep 17 00:00:00 2001
From: 44323 <443237572@qq.com>
Date: 星期四, 22 二月 2024 15:40:23 +0800
Subject: [PATCH] 租房新增需求

---
 guns-management/src/main/java/com/stylefeng/guns/modular/system/service/impl/HouseResourceService.java |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/guns-management/src/main/java/com/stylefeng/guns/modular/system/service/impl/HouseResourceService.java b/guns-management/src/main/java/com/stylefeng/guns/modular/system/service/impl/HouseResourceService.java
index 75ca982..c90e436 100644
--- a/guns-management/src/main/java/com/stylefeng/guns/modular/system/service/impl/HouseResourceService.java
+++ b/guns-management/src/main/java/com/stylefeng/guns/modular/system/service/impl/HouseResourceService.java
@@ -392,10 +392,12 @@
         OutputStream outputStream = null;
         String accessToken = wxAppletTools.getAccessToken();
         try {
-            String url = "https://api.weixin.qq.com/cgi-bin/wxaapp/createwxaqrcode?access_token=" + accessToken;
+            String url = "https://api.weixin.qq.com/wxa/getwxacodeunlimit?access_token=" + accessToken;
             Map<String, Object> param = new HashMap<>();
-            param.put("path", "pages/home/home");
-//            param.put("page", "pages/index/index"); // 路径 如果没有默认跳转到首页面微信小程序发布后才可以使用不能添加参数
+            param.put("scene","id="+houseResource.getId());
+            param.put("page", "pageA/houseDetail");
+            param.put("check_path", false);
+            param.put("env_version", "trial");
             param.put("width", 200); //二维码尺寸
             param.put("is_hyaline", true); // 是否需要透明底色, is_hyaline 为true时,生成透明底色的小程序码 参数仅对小程序码生效
             param.put("auto_color", true); // 自动配置线条颜色,如果颜色依然是黑色,则说明不建议配置主色调 参数仅对小程序码生效
@@ -422,7 +424,7 @@
             //获取文件的URl地址
             String imgUrl = ossService.getImgUrl(objectName);
             houseResource.setQrCode(imgUrl);
-            this.baseMapper.insert(houseResource);
+            this.baseMapper.updateById(houseResource);
             System.err.println("看看文件路径" + imgUrl);
         } catch (Exception e) {
             System.err.println("调用小程序生成微信永久小程序码URL接口异常" + e);

--
Gitblit v1.7.1