From 0b6189c1c208a4f1c4cd4b230dba10b3581d1ff9 Mon Sep 17 00:00:00 2001 From: kongdeqiang <123456> Date: 星期四, 16 五月 2024 16:01:16 +0800 Subject: [PATCH] fix: 获取司机配送员信息接口修改 --- xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/entity/OrderTask.java | 36 +++--------------------------------- 1 files changed, 3 insertions(+), 33 deletions(-) diff --git a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/entity/OrderTask.java b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/entity/OrderTask.java index 8a795af..2afa212 100644 --- a/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/entity/OrderTask.java +++ b/xboot-modules/xboot-your/src/main/java/cn/exrick/xboot/your/entity/OrderTask.java @@ -1,6 +1,7 @@ package cn.exrick.xboot.your.entity; import cn.exrick.xboot.core.base.XbootBaseEntity; +import cn.exrick.xboot.your.util.ImageShowUtil; import cn.hutool.core.util.StrUtil; import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableName; @@ -136,39 +137,8 @@ private List<OrderDetail> orderDetails; public String getImg() { - if (StrUtil.isEmpty(img)) { - return null; - } - String temp = ""; - String[] imgs = img.split(","); - for (int i = 0; i < imgs.length; i++) { - String url = imgs[i]; - if (StrUtil.isNotEmpty(url)) { - if (url.contains("http") && url.contains("/xboot")) { - try{ - if("".equals(temp)){ - temp += "/xboot" + url.split("/xboot")[1]; - }else{ - temp += ",/xboot" + url.split("/xboot")[1]; - } - }catch (Exception e){ - if("".equals(temp)){ - temp += url; - }else{ - temp += "," + url; - } - } - } else { - if("".equals(temp)){ - temp += url; - }else { - temp += "," + url; - } - } - } - } - img = temp; - return img; + this.img = ImageShowUtil.getImgX(this.img); + return this.img; } public static void main(String[] args) { String img = ",,http://111.63.178.115:9091/xboot/file/view/1712990736426864641,,/xboot/file/view/1712990822305239041,,"; -- Gitblit v1.9.1