From c2131d095bc4f7285d9298dd6ca32e3f578114fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=AF=8C=E5=BA=B7?= <15630117759@163.com> Date: Sun, 4 Aug 2024 09:11:56 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=A0=B9=E6=8D=AE=E5=BA=97?= =?UTF-8?q?=E9=93=BA=E8=8E=B7=E5=8F=96=E5=BA=97=E9=93=BA=E5=9B=BE=E6=A0=87?= =?UTF-8?q?=EF=BC=88=E5=AD=98=E7=9A=84=E6=98=AF=E4=BA=8C=E7=BB=B4=E7=A0=81?= =?UTF-8?q?=EF=BC=89=EF=BC=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/application.yml | 12 ++++++---- hiver-admin/test-output/test-report.html | 18 +++++++------- .../hiver/mall/controller/ShopController.java | 24 +++++++++++++++++++ 3 files changed, 41 insertions(+), 13 deletions(-) diff --git a/hiver-admin/src/main/resources/application.yml b/hiver-admin/src/main/resources/application.yml index b423c524..766361e3 100644 --- a/hiver-admin/src/main/resources/application.yml +++ b/hiver-admin/src/main/resources/application.yml @@ -25,8 +25,8 @@ spring: timeout-per-shutdown-phase: 10S # 数据源 datasource: - url: jdbc:mysql://154.8.162.157:3306/hiver_shop?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=GMT%2B8&allowPublicKeyRetrieval=true&allowMultiQueries=true -# url: jdbc:mysql://8.140.198.243:3306/hiver_shop?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=GMT%2B8&allowPublicKeyRetrieval=true&allowMultiQueries=true +# url: jdbc:mysql://154.8.162.157:3306/hiver_shop?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=GMT%2B8&allowPublicKeyRetrieval=true&allowMultiQueries=true + url: jdbc:mysql://8.140.198.243:3306/hiver_shop?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=GMT%2B8&allowPublicKeyRetrieval=true&allowMultiQueries=true username: reddoor # Jasypt加密 可到common-utils中找到JasyptUtil加解密工具类生成加密结果 格式为ENC(加密结果) 以下解密结果为123456 password: ENC(Zla4U4+yRLPhicvuX2TmiEgxEpzP4dk8BHzFDEtiEhwLQIIaftZrrEUJZce6efoe) @@ -67,8 +67,8 @@ spring: ddl-auto: update # Redis 若设有密码自行添加配置password redis: - host: 154.8.162.157 -# host: 8.140.198.243 +# host: 154.8.162.157 + host: 8.140.198.243 password: reddoor168 # 数据库索引 默认0 database: 1 @@ -330,6 +330,10 @@ ignored: - /hiver/app/sale/get/** - /hiver/app/return/list - /hiver/app/return/get/** + # 根据商品id获取商品子图,分享订单,客户查看商品子图使用 + - /hiver/app/productPicture/getProductPictureByProductId + # 根据店铺id获取店铺二维码信息 + - /hiver/app/shop/getshopIconById # # 临时增加 - /hiver/app/purchase/getPurchaseListOfSupplier diff --git a/hiver-admin/test-output/test-report.html b/hiver-admin/test-output/test-report.html index f600fc08..fe5b89eb 100644 --- a/hiver-admin/test-output/test-report.html +++ b/hiver-admin/test-output/test-report.html @@ -5,7 +5,7 @@ -HiverԱ +Hiver���Ա��� @@ -35,7 +35,7 @@ Hiver
  • - 02, 2024 22:25:05 +���� 03, 2024 19:26:13
  • @@ -84,7 +84,7 @@

    passTest

    -

    22:25:06 / 0.015 secs

    +

    19:26:14 ���� / 0.017 secs

    @@ -92,9 +92,9 @@
    #test-id=1
    passTest
    -08.02.2024 22:25:06 -08.02.2024 22:25:06 -0.015 secs +08.03.2024 19:26:14 +08.03.2024 19:26:14 +0.017 secs
    @@ -104,7 +104,7 @@ Pass - 22:25:06 + 19:26:14 Test passed @@ -128,13 +128,13 @@

    Started

    -

    02, 2024 22:25:05

    +

    ���� 03, 2024 19:26:13

    Ended

    -

    02, 2024 22:25:06

    +

    ���� 03, 2024 19:26:14

    diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/ShopController.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/ShopController.java index 0625e8be..5fe313e2 100644 --- a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/ShopController.java +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/ShopController.java @@ -358,4 +358,28 @@ public class ShopController { shopService.update(oldShop); return ResultUtil.success("更新成功"); } + + /** + * 根据店铺id获取店铺shopIcon(二维码信息) + * + * @param id + * @return Result + * @author 王富康 + * @date 2024/8/3 + */ + @RequestMapping(value = "/getshopIconById", method = RequestMethod.POST) + @ApiOperation("根据店铺id获取店铺shopIcon") + public Result getshopIconById(String id) { + if (StringUtils.isEmpty(id)) { + return ResultUtil.error("店铺id不能为空"); + } + final Shop shop = shopService.findById(id); + if (shop == null) { + return ResultUtil.error("店铺不存在"); + } + if (StringUtils.isEmpty(shop.getShopIcon())) { + return ResultUtil.error("店铺图标不存在"); + } + return ResultUtil.data(shop.getShopIcon()); + } }