Browse Source

增加根据店铺获取店铺图标(存的是二维码),

cangku
王富康 2 years ago
parent
commit
c2131d095b
  1. 12
      hiver-admin/src/main/resources/application.yml
  2. 18
      hiver-admin/test-output/test-report.html
  3. 24
      hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/ShopController.java

12
hiver-admin/src/main/resources/application.yml

@ -25,8 +25,8 @@ spring:
timeout-per-shutdown-phase: 10S timeout-per-shutdown-phase: 10S
# 数据源 # 数据源
datasource: 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://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://8.140.198.243:3306/hiver_shop?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=GMT%2B8&allowPublicKeyRetrieval=true&allowMultiQueries=true
username: reddoor username: reddoor
# Jasypt加密 可到common-utils中找到JasyptUtil加解密工具类生成加密结果 格式为ENC(加密结果) 以下解密结果为123456 # Jasypt加密 可到common-utils中找到JasyptUtil加解密工具类生成加密结果 格式为ENC(加密结果) 以下解密结果为123456
password: ENC(Zla4U4+yRLPhicvuX2TmiEgxEpzP4dk8BHzFDEtiEhwLQIIaftZrrEUJZce6efoe) password: ENC(Zla4U4+yRLPhicvuX2TmiEgxEpzP4dk8BHzFDEtiEhwLQIIaftZrrEUJZce6efoe)
@ -67,8 +67,8 @@ spring:
ddl-auto: update ddl-auto: update
# Redis 若设有密码自行添加配置password # Redis 若设有密码自行添加配置password
redis: redis:
host: 154.8.162.157 # host: 154.8.162.157
# host: 8.140.198.243 host: 8.140.198.243
password: reddoor168 password: reddoor168
# 数据库索引 默认0 # 数据库索引 默认0
database: 1 database: 1
@ -330,6 +330,10 @@ ignored:
- /hiver/app/sale/get/** - /hiver/app/sale/get/**
- /hiver/app/return/list - /hiver/app/return/list
- /hiver/app/return/get/** - /hiver/app/return/get/**
# 根据商品id获取商品子图,分享订单,客户查看商品子图使用
- /hiver/app/productPicture/getProductPictureByProductId
# 根据店铺id获取店铺二维码信息
- /hiver/app/shop/getshopIconById
# # 临时增加 # # 临时增加
- /hiver/app/purchase/getPurchaseListOfSupplier - /hiver/app/purchase/getPurchaseListOfSupplier

18
hiver-admin/test-output/test-report.html

@ -5,7 +5,7 @@
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Hiver测试报告</title> <title>Hiver���Ա���</title>
<link rel="apple-touch-icon" href="spark/logo.png"> <link rel="apple-touch-icon" href="spark/logo.png">
<link rel="shortcut icon" href="spark/logo.png"> <link rel="shortcut icon" href="spark/logo.png">
<link rel="stylesheet" href="spark/spark-style.css"> <link rel="stylesheet" href="spark/spark-style.css">
@ -35,7 +35,7 @@
<a href="#"><span class="badge badge-primary">Hiver</span></a> <a href="#"><span class="badge badge-primary">Hiver</span></a>
</li> </li>
<li class="m-r-10"> <li class="m-r-10">
<a href="#"><span class="badge badge-primary">八月 02, 2024 22:25:05</span></a> <a href="#"><span class="badge badge-primary">���� 03, 2024 19:26:13</span></a>
</li> </li>
</ul> </ul>
</div> </div>
@ -84,7 +84,7 @@
<div class="test-detail"> <div class="test-detail">
<span class="meta text-white badge badge-sm"></span> <span class="meta text-white badge badge-sm"></span>
<p class="name">passTest</p> <p class="name">passTest</p>
<p class="text-sm"><span>22:25:06 下午</span> / <span>0.015 secs</span></p> <p class="text-sm"><span>19:26:14 ����</span> / <span>0.017 secs</span></p>
</div> </div>
<div class="test-contents d-none"> <div class="test-contents d-none">
<div class="detail-head"> <div class="detail-head">
@ -92,9 +92,9 @@
<div class="info"> <div class="info">
<div class='float-right'><span class='badge badge-default'>#test-id=1</span></div> <div class='float-right'><span class='badge badge-default'>#test-id=1</span></div>
<h5 class="test-status text-pass">passTest</h5> <h5 class="test-status text-pass">passTest</h5>
<span class='badge badge-success'>08.02.2024 22:25:06</span> <span class='badge badge-success'>08.03.2024 19:26:14</span>
<span class='badge badge-danger'>08.02.2024 22:25:06</span> <span class='badge badge-danger'>08.03.2024 19:26:14</span>
<span class='badge badge-default'>0.015 secs</span> <span class='badge badge-default'>0.017 secs</span>
</div> </div>
<div class="m-t-10 m-l-5"></div> <div class="m-t-10 m-l-5"></div>
</div> </div>
@ -104,7 +104,7 @@
<tbody> <tbody>
<tr class="event-row"> <tr class="event-row">
<td><span class="badge log pass-bg">Pass</span></td> <td><span class="badge log pass-bg">Pass</span></td>
<td>22:25:06</td> <td>19:26:14</td>
<td> <td>
Test passed Test passed
</td> </td>
@ -128,13 +128,13 @@
<div class="col-md-3"> <div class="col-md-3">
<div class="card"><div class="card-body"> <div class="card"><div class="card-body">
<p class="m-b-0">Started</p> <p class="m-b-0">Started</p>
<h3>八月 02, 2024 22:25:05</h3> <h3>���� 03, 2024 19:26:13</h3>
</div></div> </div></div>
</div> </div>
<div class="col-md-3"> <div class="col-md-3">
<div class="card"><div class="card-body"> <div class="card"><div class="card-body">
<p class="m-b-0">Ended</p> <p class="m-b-0">Ended</p>
<h3>八月 02, 2024 22:25:06</h3> <h3>���� 03, 2024 19:26:14</h3>
</div></div> </div></div>
</div> </div>
<div class="col-md-3"> <div class="col-md-3">

24
hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/ShopController.java

@ -358,4 +358,28 @@ public class ShopController {
shopService.update(oldShop); shopService.update(oldShop);
return ResultUtil.success("更新成功"); 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());
}
} }

Loading…
Cancel
Save