From d622e9ec72b82088ebd5d16eeb16a1c358656c65 Mon Sep 17 00:00:00 2001
From: wangfukang <15630117759@163.com>
Date: Sun, 4 Aug 2024 08:41:17 +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 | 10 ++--
hiver-admin/test-output/test-report.html | 16 +++---
.../hiver/mall/controller/ShopController.java | 50 ++++++++++++++-----
3 files changed, 52 insertions(+), 24 deletions(-)
diff --git a/hiver-admin/src/main/resources/application.yml b/hiver-admin/src/main/resources/application.yml
index e0ca79a7..4afd4e51 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
@@ -332,6 +332,8 @@ ignored:
- /hiver/app/return/get/**
# 根据商品id获取商品子图,分享订单,客户查看商品子图使用
- /hiver/app/productPicture/getProductPictureByProductId
+ # 根据店铺id获取店铺二维码信息
+ - /hiver/app/shop/getshopIconById
# # 临时增加
# 限流及黑名单不拦截的路径
diff --git a/hiver-admin/test-output/test-report.html b/hiver-admin/test-output/test-report.html
index 53d45f86..65e80678 100644
--- a/hiver-admin/test-output/test-report.html
+++ b/hiver-admin/test-output/test-report.html
@@ -35,7 +35,7 @@
Hiver
- 03, 2024 18:35:09
+ 03, 2024 19:26:13
@@ -84,7 +84,7 @@
passTest
-
18:35:10 / 0.018 secs
+
19:26:14 / 0.017 secs
@@ -92,9 +92,9 @@
#test-id=1
passTest
-
08.03.2024 18:35:10
-
08.03.2024 18:35:10
-
0.018 secs
+
08.03.2024 19:26:14
+
08.03.2024 19:26:14
+
0.017 secs
@@ -104,7 +104,7 @@
| Pass |
- 18:35:10 |
+ 19:26:14 |
Test passed
|
@@ -128,13 +128,13 @@
Started
-
03, 2024 18:35:09
+
03, 2024 19:26:13
Ended
-
03, 2024 18:35:10
+
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 b6245094..4c0655bd 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
@@ -254,51 +254,77 @@ public class ShopController {
@RequestMapping(value = "/getShopRebateBalance", method = RequestMethod.POST)
@ApiOperation("获取返佣余额及累计返佣")
- public Result getShopRebateBalance(){
- final Map shopRebateBalance = shopService.getShopRebateBalance();
+ public Result getShopRebateBalance() {
+ final Map shopRebateBalance = shopService.getShopRebateBalance();
return ResultUtil.data(shopRebateBalance);
}
/**
* 根据店铺id获取店铺信息
- * @author 王富康
- * @date 2024/7/27
+ *
* @param id
* @return Result
+ * @author 王富康
+ * @date 2024/7/27
*/
@RequestMapping(value = "/getShopInfoById", method = RequestMethod.POST)
@ApiOperation("根据店铺id获取店铺信息")
- public Result getShopInfoById(String id){
- if(StringUtils.isEmpty(id)){
+ public Result getShopInfoById(String id) {
+ if (StringUtils.isEmpty(id)) {
return ResultUtil.error("店铺id不能为空");
}
- final Shop shop = shopService.findById(id);
+ final Shop shop = shopService.findById(id);
return ResultUtil.data(shop);
}
/**
* 更新店铺图标及备注
- * @author 王富康
- * @date 2024/7/27
+ *
* @param shop
* @return Result
+ * @author 王富康
+ * @date 2024/7/27
*/
@RequestMapping(value = "/updateShopIconAndRemark", method = RequestMethod.POST)
@ApiOperation("更新店铺图标及备注")
public Result updateShopIconAndRemark(@RequestBody Shop shop) {
final String id = shop.getId();
- if(StringUtils.isEmpty(id)){
+ if (StringUtils.isEmpty(id)) {
return ResultUtil.error("店铺id不能为空");
}
final Shop oldShop = shopService.get(id);
// 20240803 不更新店铺图标,可更新店铺地址
- if(shop.getShopAddress() != null){
+ if (shop.getShopAddress() != null) {
oldShop.setShopAddress(shop.getShopAddress());
}
- if(shop.getRemark() != null){
+ if (shop.getRemark() != null) {
oldShop.setRemark(shop.getRemark());
}
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());
+ }
}