1. fix
This commit is contained in:
2026-07-11 09:16:37 +08:00
parent fbbefeb4a5
commit 2f2142d7cc
5 changed files with 39 additions and 23 deletions

15
pom.xml
View File

@@ -314,6 +314,21 @@
</buildArgs>
</configuration>
</plugin>
<plugin>
<groupId>com.google.cloud.tools</groupId>
<artifactId>jib-maven-plugin</artifactId>
<version>3.4.0</version>
<configuration>
<allowInsecureRegistries>true</allowInsecureRegistries>
<to>
<image>192.168.31.132:8888/library/blade-api:4.6.0.RELEASE</image>
<auth>
<username>${docker.username}</username>
<password>${docker.password}</password>
</auth>
</to>
</configuration>
</plugin>
</plugins>
</pluginManagement>
<plugins>

View File

@@ -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<DictBizApiVO> 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);
}

View File

@@ -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

View File

@@ -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

View File

@@ -1,6 +1,6 @@
#服务器配置
server:
port: 80
port: 8080
undertow:
threads:
# 设置IO线程数, 它主要执行非阻塞的任务,它们会负责多个连接, 默认设置每个CPU核心一个线程