From 2f2142d7cc262d067b1579367f29d33d93f14a2c Mon Sep 17 00:00:00 2001 From: RayL Date: Sat, 11 Jul 2026 09:16:37 +0800 Subject: [PATCH] update: 1. fix --- pom.xml | 15 +++++++++++++++ .../kiosk/service/impl/KioskServiceImpl.java | 13 ++++++------- src/main/resources/application-dev.yml | 14 +++++++------- src/main/resources/application-prod.yml | 18 ++++++++++-------- src/main/resources/application.yml | 2 +- 5 files changed, 39 insertions(+), 23 deletions(-) diff --git a/pom.xml b/pom.xml index b0a793b..385b1c4 100644 --- a/pom.xml +++ b/pom.xml @@ -314,6 +314,21 @@ + + com.google.cloud.tools + jib-maven-plugin + 3.4.0 + + true + + 192.168.31.132:8888/library/blade-api:4.6.0.RELEASE + + ${docker.username} + ${docker.password} + + + + diff --git a/src/main/java/org/springblade/modules/kiosk/service/impl/KioskServiceImpl.java b/src/main/java/org/springblade/modules/kiosk/service/impl/KioskServiceImpl.java index aa1c623..01d324c 100644 --- a/src/main/java/org/springblade/modules/kiosk/service/impl/KioskServiceImpl.java +++ b/src/main/java/org/springblade/modules/kiosk/service/impl/KioskServiceImpl.java @@ -3,6 +3,7 @@ package org.springblade.modules.kiosk.service.impl; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; +import org.springblade.common.cache.ParamCache; import org.springblade.core.log.exception.ServiceException; import org.springblade.core.oss.OssTemplate; import org.springblade.core.oss.model.BladeFile; @@ -18,12 +19,10 @@ import org.springblade.modules.kiosk.service.*; import org.springblade.modules.system.pojo.entity.User; import org.springblade.modules.system.service.IDeptService; import org.springblade.modules.system.service.IDictBizService; -import org.springblade.modules.system.service.IParamService; import org.springblade.modules.system.service.IUserService; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.web.multipart.MultipartFile; -import org.thymeleaf.ITemplateEngine; import java.io.IOException; import java.io.InputStream; @@ -47,8 +46,6 @@ public class KioskServiceImpl implements IKioskApiService { private final IDictBizService dictService; - private final IParamService paramService; - private final ICategoryService categoryService; private final IPhotoAttachmentService photoAttachmentService; @@ -77,8 +74,9 @@ public class KioskServiceImpl implements IKioskApiService { private static final String autoCleanKey = "kiosk.default.autoCleanSeconds"; + private static final String uploadAddress = "kiosk.upload.address"; + private static final Integer taxPercent = 15; - private final ITemplateEngine iTemplateEngine; @Override public List categoryType() { @@ -149,7 +147,8 @@ public class KioskServiceImpl implements IKioskApiService { String uploadKey = codePrefix + StringPool.COLON + user.getDeptId() + StringPool.COLON + user.getAccount(); String code = StringUtil.random(8, RandomType.ALL); redis.setEx(uploadKey, code, 900L); - return StringUtil.format("https://up.tttzai.com?code={}&machine={}&store={}", code, user.getAccount(), user.getDeptId()); + String address = ParamCache.getValue(uploadAddress); + return StringUtil.format("{}?code={}&machine={}&store={}", address, code, user.getAccount(), user.getDeptId()); } @Override @@ -406,7 +405,7 @@ public class KioskServiceImpl implements IKioskApiService { @Override public Integer autoCleanSeconds() { - String value = paramService.getValue(autoCleanKey); + String value = ParamCache.getValue(autoCleanKey); return Integer.valueOf(value); } diff --git a/src/main/resources/application-dev.yml b/src/main/resources/application-dev.yml index 42d84aa..eaee8ec 100644 --- a/src/main/resources/application-dev.yml +++ b/src/main/resources/application-dev.yml @@ -3,9 +3,9 @@ spring: data: redis: ##redis 单机环境配置 - host: localhost + host: 192.168.31.132 port: 6379 - password: + password: 112233 database: 0 ssl: enabled: false @@ -15,9 +15,9 @@ spring: # commandTimeout: 5000 datasource: # MySql - url: jdbc:mysql://localhost:3306/memory_block?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true + url: jdbc:mysql://192.168.31.132:3306/memory_block?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true username: root - password: root + password: Root123! # PostgreSQL #url: jdbc:postgresql://127.0.0.1:5432/bladex_boot #username: postgres @@ -56,7 +56,7 @@ oss: #minio、s3、qiniu、alioss、huaweiobs、tencentcos name: minio #租户模式 - tenant-mode: true + tenant-mode: false #oss服务地址 endpoint: http://192.168.31.132:9000 #oss转换服务地址,用于内网上传后将返回地址改为转换的外网地址 @@ -75,5 +75,5 @@ blade: ##是否启用分布式锁 enabled: false ##redis服务地址 - address: redis://localhost:6379 - password: + address: redis://192.168.31.132:6379 + password: 112233 diff --git a/src/main/resources/application-prod.yml b/src/main/resources/application-prod.yml index dc791b2..fd602cc 100644 --- a/src/main/resources/application-prod.yml +++ b/src/main/resources/application-prod.yml @@ -5,7 +5,7 @@ spring: ##redis 单机环境配置 ##将docker脚本部署的redis服务映射为宿主机ip ##生产环境推荐使用阿里云高可用redis服务并设置密码 - host: 192.168.31.132 + host: 127.0.0.1 port: 6379 password: 112233 database: 0 @@ -16,9 +16,9 @@ spring: # nodes: 127.0.0.1:7001,127.0.0.1:7002,127.0.0.1:7003 # commandTimeout: 5000 datasource: - url: jdbc:mysql://192.168.31.132:3306/memory_block?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true + url: jdbc:mysql://127.0.0.1:3306/memory_block?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true username: root - password: Root123! + password: PSwd123!@# #第三方登陆 social: @@ -35,13 +35,15 @@ oss: #租户模式 tenant-mode: false #oss服务地址 - endpoint: http://192.168.31.132:9000 + endpoint: http://127.0.0.1:9000 #oss转换服务地址,用于内网上传后将返回地址改为转换的外网地址 - transform-endpoint: https://image.tttzai.com + transform-endpoint: http://52.65.62.15:9000 #访问key - access-key: minioadmin + access-key: admin +# access-key: minioadmin #密钥key - secret-key: 112minioadmin + secret-key: Test@Minio123 +# secret-key: 112minioadmin #存储桶 bucket-name: memory-block @@ -53,5 +55,5 @@ blade: enabled: false ##将docker脚本部署的redis服务映射为宿主机ip ##生产环境推荐使用阿里云高可用redis服务并设置密码 - address: redis://192.168.31.132:6379 + address: redis://127.0.0.1:6379 password: 112233 diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 1abd23a..82e9702 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -1,6 +1,6 @@ #服务器配置 server: - port: 80 + port: 8080 undertow: threads: # 设置IO线程数, 它主要执行非阻塞的任务,它们会负责多个连接, 默认设置每个CPU核心一个线程