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