Pu Zhibing
3 天以前 cb7e84fe6e40f3ce3ed1fe3fb3b4c0da8c847793
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;