From efeafd5e13f9ab434c927f91e984c941e744a845 Mon Sep 17 00:00:00 2001 From: zcxlsm Date: Thu, 28 Aug 2025 15:28:05 +0800 Subject: [PATCH] =?UTF-8?q?refactor(sis):=20=E6=9B=BF=E6=8D=A2=E5=9B=BE?= =?UTF-8?q?=E7=89=87URL?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sis/sdk/e8/service/E8PlatformApiService.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/ruoyi-modules/Sis/src/main/java/org/dromara/sis/sdk/e8/service/E8PlatformApiService.java b/ruoyi-modules/Sis/src/main/java/org/dromara/sis/sdk/e8/service/E8PlatformApiService.java index 673c7090..0e3dbc16 100644 --- a/ruoyi-modules/Sis/src/main/java/org/dromara/sis/sdk/e8/service/E8PlatformApiService.java +++ b/ruoyi-modules/Sis/src/main/java/org/dromara/sis/sdk/e8/service/E8PlatformApiService.java @@ -37,6 +37,7 @@ import org.dromara.sis.sdk.e8.domain.voucher.req.IssueVoucherReq; import org.dromara.sis.sdk.e8.domain.voucher.req.OperateVoucherReq; import org.dromara.sis.sdk.e8.domain.voucher.res.IssueVoucherRes; import org.dromara.sis.sdk.e8.utils.E8ApiUtil; +import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; import java.util.HashMap; @@ -55,6 +56,11 @@ public class E8PlatformApiService implements E8PlatformApi { private final E8ApiUtil e8ApiUtil; + @Value("${E8Plat.imgUrl}") + private String imgUrl; + + private final static String URL = "http://192.168.24.8:50030"; + //***************************************客户信息接口******************************************* private final static String CUSTOMER_GET_PAGE_LIST = "/api/E8/customer/get-page-list"; private final static String CUSTOMER_GET_FIRST_OR_DEFAULT = "/api/E8/customer/get-first-or-default"; @@ -422,6 +428,16 @@ public class E8PlatformApiService implements E8PlatformApi { tableData.setTotal(Long.parseLong(result.get("total").toString())); // 从结果映射中获取项目列表,转换为访问记录信息列表后设置到分页对象中 tableData.setRows(JSONUtil.toList(JSONUtil.toJsonStr(result.get("item")), AccessRecordFindRes.class)); + + for (AccessRecordFindRes res : tableData.getRows()){ + if (res.getVoucherUrl() != null && !res.getVoucherUrl().isEmpty()) { + res.setVoucherUrl(res.getVoucherUrl().replace(URL, imgUrl)); + } + + if (res.getPictureUrl() != null && !res.getPictureUrl().isEmpty()) { + res.setPictureUrl(res.getPictureUrl().replace(URL, imgUrl)); + } + } tableData.setCode(200); tableData.setMsg("查询成功"); // 返回填充了数据的分页对象