Parcourir la source

批量查询canshow

lyhzzz il y a 3 ans
Parent
commit
c85e124ba9

+ 3 - 0
platform-common/src/main/java/com/platform/utils/LettuceRedisClientUtils.java

@@ -23,6 +23,7 @@ public class LettuceRedisClientUtils {
         RedisURI redisUri = RedisURI.builder()
                 .withHost(ResourceUtil.getConfigByName("spring.redis.host"))
                 .withPort(new Integer(ResourceUtil.getConfigByName("spring.redis.port")))
+                .withPassword(ResourceUtil.getConfigByName("spring.redis.password"))
                 .withTimeout(Duration.of(10, ChronoUnit.SECONDS))
                 .build();
         // <2> 创建客户端
@@ -45,6 +46,7 @@ public class LettuceRedisClientUtils {
         RedisURI redisUri = RedisURI.builder()
                 .withHost(ResourceUtil.getConfigByName("spring.redis.host"))
                 .withPort(new Integer(ResourceUtil.getConfigByName("spring.redis.port")))
+                .withPassword(ResourceUtil.getConfigByName("spring.redis.password"))
                 .withTimeout(Duration.of(10, ChronoUnit.SECONDS))
                 .build();
         // <2> 创建客户端
@@ -67,6 +69,7 @@ public class LettuceRedisClientUtils {
         RedisURI redisUri = RedisURI.builder()                    // <1> 创建单机连接的连接信息
                 .withHost(ResourceUtil.getConfigByName("spring.redis.host"))
                 .withPort(new Integer(ResourceUtil.getConfigByName("spring.redis.port")))
+                .withPassword(ResourceUtil.getConfigByName("spring.redis.password"))
                 .withTimeout(Duration.of(10, ChronoUnit.SECONDS))
                 .build();
         // <2> 创建客户端

+ 1 - 1
platform-common/src/main/java/com/platform/utils/OssCheckPointUploadUtil.java

@@ -44,7 +44,7 @@ public class OssCheckPointUploadUtil {
             log.info("本地文件为:{}" ,uploadFile);
             // Sets the concurrent upload task number to 5.
             uploadFileRequest.setTaskNum(5);
-            // Sets the part size to 1MB.
+            // Sets the part size to 1MB.1
             uploadFileRequest.setPartSize(1024 * 1024 * 1);
             // 开启断点续传,默认关闭。
             // Enables the checkpoint file. By default it's off.

+ 4 - 0
platform-shop/src/main/java/com/platform/service/impl/BrandServiceImpl.java

@@ -209,6 +209,10 @@ public class BrandServiceImpl implements BrandService {
         String ossQueryUrl = ResourceUtil.getConfigByName("oss.query.url");
         String ossImagePath = ResourceUtil.getConfigByName("oss.image.file.path");
         //生成带看页面的二维码
+        File imagePath = new File(imageFilePath);
+        if(!imagePath.exists()){
+            imagePath.mkdirs();
+        }
         String imageLocalPath = imageFilePath + brand.getSceneNum() + System.currentTimeMillis() + "_QRCode.png";
         log.info("生成二维码的本地缓存路径:{}" , imageLocalPath);
         log.info("生成二维码的appId={},appSecret={}" , viewerWxAppId , viewerWxAppSecret);