| | |
| | | String url = WxConstant.CREATE_CODE_URL.replace("ACCESS_TOKEN", accessToken); |
| | | // 发送请求 |
| | | try { |
| | | HashMap<String, String> map = new HashMap<>(); |
| | | map.put("path", ""); |
| | | HashMap<String, Object> map = new HashMap<>(); |
| | | map.put("page", "pages/invite/invite"); |
| | | map.put("scene", "clinicId=" + crmClinic.getId()); |
| | | map.put("check_path", false); |
| | | HttpHeaders headers = new HttpHeaders(); |
| | | headers.setContentType(MediaType.APPLICATION_JSON); |
| | | HttpEntity requestEntity = new HttpEntity(map, headers); |
| | |
| | | byte[] bytes = rep.getBody(); |
| | | ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(bytes); |
| | | MultipartFile file = new MockMultipartFile(ContentType.APPLICATION_OCTET_STREAM.toString(), byteArrayInputStream); |
| | | String stringApiResult = ObsUploadUtil.obsUpload(file); |
| | | String stringApiResult = ObsUploadUtil.obsUploadQrCode(file,"qrcode_"+crmClinic.getId()+".jpg"); |
| | | crmClinic.setQrCode(stringApiResult); |
| | | } catch (Exception e) { |
| | | log.error("生成小程序码失败:{}", e.getMessage()); |