From e1c149c97479b9b811ba373e08746cf453b3a8aa Mon Sep 17 00:00:00 2001 From: Gitea Date: Wed, 17 May 2023 11:07:23 +0800 Subject: [PATCH] =?UTF-8?q?=E5=95=86=E5=9F=8E=E5=9B=BE=E7=89=87=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/org/jeecg/common/util/ImageUrl.java | 5 +++++ .../controller/ZyAccessoriesController.java | 3 ++- .../zygoods/controller/ZyGoodsController.java | 19 ++++++++++--------- .../controller/ZyOrdersController.java | 3 ++- .../system/controller/SysUserController.java | 4 ++-- 5 files changed, 21 insertions(+), 13 deletions(-) create mode 100644 jeecg-boot/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/common/util/ImageUrl.java diff --git a/jeecg-boot/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/common/util/ImageUrl.java b/jeecg-boot/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/common/util/ImageUrl.java new file mode 100644 index 00000000..5c97b16c --- /dev/null +++ b/jeecg-boot/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/common/util/ImageUrl.java @@ -0,0 +1,5 @@ +package org.jeecg.common.util; + +public class ImageUrl { + public static final String Image_Url = "http://10.100.200.112:10085/jeecg-boot/sys/common/static/"; +} diff --git a/jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/accessories/controller/ZyAccessoriesController.java b/jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/accessories/controller/ZyAccessoriesController.java index b4f161aa..7a69cfeb 100644 --- a/jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/accessories/controller/ZyAccessoriesController.java +++ b/jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/accessories/controller/ZyAccessoriesController.java @@ -11,6 +11,7 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.jeecg.common.api.vo.Result; import org.jeecg.common.system.query.QueryGenerator; +import org.jeecg.common.util.ImageUrl; import org.jeecg.common.util.oConvertUtils; import org.jeecg.modules.demo.accessories.entity.ZyAccessories; import org.jeecg.modules.demo.accessories.service.IZyAccessoriesService; @@ -154,7 +155,7 @@ public class ZyAccessoriesController extends JeecgController queryById(@RequestParam(name="id",required=true) String id) { ZyAccessories zyAccessories = zyAccessoriesService.getById(id); - zyAccessories.setPicture("http://localhost:10085/jeecg-boot/sys/common/static/"+zyAccessories.getPicture()); + zyAccessories.setPicture(ImageUrl.Image_Url+zyAccessories.getPicture()); if(zyAccessories==null) { return Result.error("未找到对应数据"); } diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/zygoods/controller/ZyGoodsController.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/zygoods/controller/ZyGoodsController.java index 36f8c228..7915973b 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/zygoods/controller/ZyGoodsController.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/zygoods/controller/ZyGoodsController.java @@ -9,6 +9,7 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.jeecg.common.api.vo.Result; import org.jeecg.common.system.query.QueryGenerator; +import org.jeecg.common.util.ImageUrl; import org.jeecg.common.util.UniqueRanNumUtils; import org.jeecg.common.util.oConvertUtils; import org.jeecg.modules.demo.base.entity.ZyClothsModular; @@ -478,7 +479,7 @@ public class ZyGoodsController extends JeecgController for(int i = 0 ; i < pageList.getRecords().size();i++){ Zxdz zxdz = new Zxdz(); zxdz.setId(pageList.getRecords().get(i).getId()); - zxdz.setImgUrl("http://localhost:10085/jeecg-boot/sys/common/static/"+pageList.getRecords().get(i).getDefaultPicture()); + zxdz.setImgUrl(ImageUrl.Image_Url+pageList.getRecords().get(i).getDefaultPicture()); zxdz.setPrice(pageList.getRecords().get(i).getUnitPrice()); zxdz.setTitle1(zyClothsTypeService.getById(pageList.getRecords().get(i).getClothsTypeId()).getTypeName()); zxdz.setTitle2(pageList.getRecords().get(i).getGoodsName()); @@ -511,7 +512,7 @@ public class ZyGoodsController extends JeecgController for(int i = 0 ; i < pageList.getRecords().size();i++){ Tcsp tcsp = new Tcsp(); tcsp.setId(pageList.getRecords().get(i).getId()); - tcsp.setImgUrl("http://localhost:10085/jeecg-boot/sys/common/static/"+pageList.getRecords().get(i).getDefaultPicture()); + tcsp.setImgUrl(ImageUrl.Image_Url+pageList.getRecords().get(i).getDefaultPicture()); tcsp.setTime(pageList.getRecords().get(i).getUnitPrice()); tcsp.setTitle(pageList.getRecords().get(i).getGoodsName()); tcspList.add(tcsp); @@ -553,7 +554,7 @@ public class ZyGoodsController extends JeecgController for(int j = 0 ; j < pageList.getRecords().size();j++){ Fzlx fzlx = new Fzlx(); fzlx.setId(pageList.getRecords().get(j).getId()); - fzlx.setImgUrl("http://localhost:10085/jeecg-boot/sys/common/static/"+pageList.getRecords().get(j).getDefaultPicture()); + fzlx.setImgUrl(ImageUrl.Image_Url+pageList.getRecords().get(j).getDefaultPicture()); fzlx.setTitle1(zyClothsTypeService.getById(pageList.getRecords().get(j).getClothsTypeId()).getTypeName()); fzlx.setTitle2(pageList.getRecords().get(j).getGoodsName()); String tag1 = zyClothsStyleService.getById(pageList.getRecords().get(j).getStyleId()).getCharacteristic(); @@ -594,7 +595,7 @@ public class ZyGoodsController extends JeecgController for(int l = 0 ; l < pageListn.getRecords().size();l++){ Fzlx fzlx = new Fzlx(); fzlx.setId(pageListn.getRecords().get(l).getId()); - fzlx.setImgUrl("http://localhost:10085/jeecg-boot/sys/common/static/"+pageListn.getRecords().get(l).getDefaultPicture()); + fzlx.setImgUrl(ImageUrl.Image_Url+pageListn.getRecords().get(l).getDefaultPicture()); fzlx.setTitle1(zyClothsTypeService.getById(pageListn.getRecords().get(l).getClothsTypeId()).getTypeName()); fzlx.setTitle2(pageListn.getRecords().get(l).getGoodsName()); String tag1 = zyClothsStyleService.getById(pageListn.getRecords().get(l).getStyleId()).getCharacteristic(); @@ -635,7 +636,7 @@ public class ZyGoodsController extends JeecgController for(int n = 0 ; n < pageListt.getRecords().size();n++){ Fzlx fzlx = new Fzlx(); fzlx.setId(pageListt.getRecords().get(n).getId()); - fzlx.setImgUrl("http://localhost:10085/jeecg-boot/sys/common/static/"+pageListt.getRecords().get(n).getDefaultPicture()); + fzlx.setImgUrl(ImageUrl.Image_Url+pageListt.getRecords().get(n).getDefaultPicture()); fzlx.setTitle1(zyClothsTypeService.getById(pageListt.getRecords().get(n).getClothsTypeId()).getTypeName()); fzlx.setTitle2(pageListt.getRecords().get(n).getGoodsName()); String tag1 = zyClothsStyleService.getById(pageListt.getRecords().get(n).getStyleId()).getCharacteristic(); @@ -751,7 +752,7 @@ public class ZyGoodsController extends JeecgController for (int i = 0 ; i < pageList.size() ; i++){ FzlxSp fzlxSp = new FzlxSp(); fzlxSp.setId(pageList.get(i).getId()); - fzlxSp.setImgUrl("http://localhost:10085/jeecg-boot/sys/common/static/"+pageList.get(i).getDefaultPicture()); + fzlxSp.setImgUrl(ImageUrl.Image_Url+pageList.get(i).getDefaultPicture()); fzlxSp.setCurrentPrice(pageList.get(i).getPromotionPrice()); fzlxSp.setHistoricalPrice(pageList.get(i).getUnitPrice()); fzlxSp.setTitle(pageList.get(i).getGoodsName()); @@ -779,7 +780,7 @@ public class ZyGoodsController extends JeecgController for (int i = 0 ; i < pageList.size() ; i++){ FzlxSp fzlxSp = new FzlxSp(); fzlxSp.setId(pageList.get(i).getId()); - fzlxSp.setImgUrl("http://localhost:10085/jeecg-boot/sys/common/static/"+pageList.get(i).getDefaultPicture()); + fzlxSp.setImgUrl(ImageUrl.Image_Url+pageList.get(i).getDefaultPicture()); fzlxSp.setCurrentPrice(pageList.get(i).getPromotionPrice()); fzlxSp.setHistoricalPrice(pageList.get(i).getUnitPrice()); fzlxSp.setTitle(pageList.get(i).getGoodsName()); @@ -805,7 +806,7 @@ public class ZyGoodsController extends JeecgController String[] baseUrl = zyGoods.getGoodsPicture().split(","); String str = ""; for (int i = 0 ; i < baseUrl.length;i++){ - str = str +"http://localhost:10085/jeecg-boot/sys/common/static/"+baseUrl[i]+","; + str = str +ImageUrl.Image_Url+baseUrl[i]+","; } mapgoods.put("baseUrl",str.substring(0,str.length()-1).split(",")); //模块数据 @@ -827,7 +828,7 @@ public class ZyGoodsController extends JeecgController Mk mk = new Mk(); mk.setId(listzcm.get(j).getId()); mk.setText(listzcm.get(j).getModularName()); - mk.setUrl("http://localhost:10085/jeecg-boot/sys/common/static/"+listzcm.get(j).getPictureUrl()); + mk.setUrl(ImageUrl.Image_Url+listzcm.get(j).getPictureUrl()); listmk.add(mk); } mapgoods.put("selectedClothList",listmk); diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/zyorders/controller/ZyOrdersController.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/zyorders/controller/ZyOrdersController.java index 6c8be146..7f10c6ea 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/zyorders/controller/ZyOrdersController.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/zyorders/controller/ZyOrdersController.java @@ -13,6 +13,7 @@ import org.apache.shiro.SecurityUtils; import org.jeecg.common.api.vo.Result; import org.jeecg.common.system.query.QueryGenerator; import org.jeecg.common.system.vo.LoginUser; +import org.jeecg.common.util.ImageUrl; import org.jeecg.common.util.oConvertUtils; import org.jeecg.modules.demo.accessories.service.IZyAccessoriesService; import org.jeecg.modules.demo.base.service.IZyClothsTypeService; @@ -552,7 +553,7 @@ public class ZyOrdersController extends JeecgController queryWrapperogs = QueryGenerator.initQueryWrapper(orderGoods, req.getParameterMap()); queryWrapperogs.eq("orders_id",zyOrdersList.get(i).getId()); List orderGoodsList = orderGoodsService.list(queryWrapperogs); - g2.setUrl("http://localhost:10085/jeecg-boot/sys/common/static/"+orderGoodsList.get(0).getDefaultPicture()); + g2.setUrl(ImageUrl.Image_Url+orderGoodsList.get(0).getDefaultPicture()); g2.setName(orderGoodsList.get(0).getGoodsName()); g2.setGoodsId(orderGoodsList.get(0).getGoodsId()); g2.setType(zyClothsStyleService.getById(orderGoodsList.get(0).getStyleId()).getStyleNames()); @@ -1648,7 +1648,7 @@ public class SysUserController { flstr = flstr + zyAccessoriesService.getById(listga.get(k).getAccessoriesId()).getContents()+","; } g1.setName(zlstr+flstr.substring(0,flstr.length()-1)); - g1.setDefaultPicture("http://localhost:10085/jeecg-boot/sys/common/static/"+orderGoodsList.get(0).getDefaultPicture()); + g1.setDefaultPicture(ImageUrl.Image_Url+orderGoodsList.get(0).getDefaultPicture()); g1.setPayTotalPrice(orderGoodsList.get(0).getPayTotalPrice()+""); g1.setUnitPrice(orderGoodsList.get(0).getUnitPrice()+""); g1.setCreateTime(zyOrders.getOrderTime());