From cb7e84fe6e40f3ce3ed1fe3fb3b4c0da8c847793 Mon Sep 17 00:00:00 2001 From: Pu Zhibing <393733352@qq.com> Date: 星期三, 27 八月 2025 23:51:22 +0800 Subject: [PATCH] 修改bug --- DriverQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/api/DriverController.java | 11 ++++++----- 1 files changed, 6 insertions(+), 5 deletions(-) diff --git a/DriverQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/api/DriverController.java b/DriverQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/api/DriverController.java index 2578fde..de7aa4d 100644 --- a/DriverQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/api/DriverController.java +++ b/DriverQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/api/DriverController.java @@ -530,9 +530,11 @@ return ResultUtil.tokenErr(); } Driver driver = driverService.selectById(uid); - String areaCode = driver.getAreaCode(); + String areaCode = driver.getPlaceOfEmployment(); TDriverPromotionActivity tDriverPromotionActivity = driverPromotionActivityService.selectOne(new EntityWrapper<TDriverPromotionActivity>() .eq("districtCode", areaCode) + .eq("state", 1) + .eq("remove", 0) .eq("status", 2) .last("LIMIT 1")); if(tDriverPromotionActivity!=null){ @@ -565,8 +567,8 @@ accessToken = getAccessToken(); } int index=0; - - if(ToolUtil.isEmpty(img)) { + String urlLink = driver.getShareLink(); + if(ToolUtil.isEmpty(img) || ToolUtil.isEmpty(urlLink)) { RestTemplate rest = new RestTemplate(); // 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; @@ -574,7 +576,7 @@ param.put("page", "pages/home/home"); param.put("width", 430); //二维码尺寸 param.put("scene", "driverId=" + uid); //二维码尺寸 - param.put("env_version", "trial"); //二维码尺寸 + param.put("env_version", "release"); //二维码尺寸 HttpRequest post = HttpUtil.createPost(url); post.body(JSON.toJSONString(param)); @@ -584,7 +586,6 @@ redisTemplate.opsForValue().set("DRIVER_WX_IMG" + uid, img,30, TimeUnit.DAYS); } - String urlLink = driver.getShareLink(); if(ToolUtil.isEmpty(urlLink)) { index=1; String url1 = "https://api.weixin.qq.com/wxa/generate_urllink?access_token=" + accessToken; -- Gitblit v1.7.1