liusheng
2024-07-22 9e99e7e192c62c2274f8f5362b354cbf55c3d80f
ruoyi-project/src/main/java/com/ruoyi/project/service/impl/ServiceReimbursementServiceImpl.java
@@ -156,7 +156,7 @@
    }
    @Override
    @Transactional
    @Transactional(rollbackFor = Exception.class)
    public Boolean addSharedData(Long id) {
        log.info("addSharedData方法的入参id :{}", id);
        //先判断一下share表是否已经插入
@@ -204,6 +204,7 @@
                    Boolean aBoolean = sharedService.delResharedInfoById(serviceReimbursementShared.getId());
                    log.error("文件上传失败,将分享表数据回滚:{}", aBoolean);
                }
                e.getMessage();
                return false;
            }
@@ -308,15 +309,14 @@
                log.info("filePath的修改:{}", filePath);
                String url = rbDetailFile.getUrl();
                //file用的是绝对位置
                String substring = url.substring(url.indexOf("/profile/upload") + "/profile/upload".length());
                String fileName = url.substring(url.indexOf("/profile/upload") + "/profile/upload".length());
                String strFile = rbDetailFile.getUrl().replace(filePath, "/profile/upload");
                System.out.println("reimbursement服务的filePath + substring是乱码吗: " + filePath + substring);
                File filetest = new File(filePath + substring);
                File fileUpload = new File(filePath + fileName);
                log.info("请求第三方的入参strFile : {}, strFUrl : {}", strFile, filePath);
                String struploadResult = HttpClientKit.sendPostWithFile(filetest, strFUrl);
                String struploadResult = HttpClientKit.sendPostWithFile(fileUpload, strFUrl);
                log.info("第三方传回的数据: {}", struploadResult);
                if (StringUtils.isEmpty(struploadResult)) {
                    log.info("HttpClientKit.sendPostWithFile 请求为空了 filetest:{},  strFUrl:{} ", filetest, strFUrl);
                    log.info("HttpClientKit.sendPostWithFile 请求为空了 struploadResult:{},  strFUrl:{} ", struploadResult, strFUrl);
                    return 0;
                }