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("查询成功"); // 返回填充了数据的分页对象