update:
1. fix
This commit is contained in:
15
pom.xml
15
pom.xml
@@ -314,6 +314,21 @@
|
|||||||
</buildArgs>
|
</buildArgs>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</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>
|
</plugins>
|
||||||
</pluginManagement>
|
</pluginManagement>
|
||||||
<plugins>
|
<plugins>
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package org.springblade.modules.kiosk.service.impl;
|
|||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springblade.common.cache.ParamCache;
|
||||||
import org.springblade.core.log.exception.ServiceException;
|
import org.springblade.core.log.exception.ServiceException;
|
||||||
import org.springblade.core.oss.OssTemplate;
|
import org.springblade.core.oss.OssTemplate;
|
||||||
import org.springblade.core.oss.model.BladeFile;
|
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.pojo.entity.User;
|
||||||
import org.springblade.modules.system.service.IDeptService;
|
import org.springblade.modules.system.service.IDeptService;
|
||||||
import org.springblade.modules.system.service.IDictBizService;
|
import org.springblade.modules.system.service.IDictBizService;
|
||||||
import org.springblade.modules.system.service.IParamService;
|
|
||||||
import org.springblade.modules.system.service.IUserService;
|
import org.springblade.modules.system.service.IUserService;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
import org.thymeleaf.ITemplateEngine;
|
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
@@ -47,8 +46,6 @@ public class KioskServiceImpl implements IKioskApiService {
|
|||||||
|
|
||||||
private final IDictBizService dictService;
|
private final IDictBizService dictService;
|
||||||
|
|
||||||
private final IParamService paramService;
|
|
||||||
|
|
||||||
private final ICategoryService categoryService;
|
private final ICategoryService categoryService;
|
||||||
|
|
||||||
private final IPhotoAttachmentService photoAttachmentService;
|
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 autoCleanKey = "kiosk.default.autoCleanSeconds";
|
||||||
|
|
||||||
|
private static final String uploadAddress = "kiosk.upload.address";
|
||||||
|
|
||||||
private static final Integer taxPercent = 15;
|
private static final Integer taxPercent = 15;
|
||||||
private final ITemplateEngine iTemplateEngine;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<DictBizApiVO> categoryType() {
|
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 uploadKey = codePrefix + StringPool.COLON + user.getDeptId() + StringPool.COLON + user.getAccount();
|
||||||
String code = StringUtil.random(8, RandomType.ALL);
|
String code = StringUtil.random(8, RandomType.ALL);
|
||||||
redis.setEx(uploadKey, code, 900L);
|
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
|
@Override
|
||||||
@@ -406,7 +405,7 @@ public class KioskServiceImpl implements IKioskApiService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Integer autoCleanSeconds() {
|
public Integer autoCleanSeconds() {
|
||||||
String value = paramService.getValue(autoCleanKey);
|
String value = ParamCache.getValue(autoCleanKey);
|
||||||
return Integer.valueOf(value);
|
return Integer.valueOf(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,9 +3,9 @@ spring:
|
|||||||
data:
|
data:
|
||||||
redis:
|
redis:
|
||||||
##redis 单机环境配置
|
##redis 单机环境配置
|
||||||
host: localhost
|
host: 192.168.31.132
|
||||||
port: 6379
|
port: 6379
|
||||||
password:
|
password: 112233
|
||||||
database: 0
|
database: 0
|
||||||
ssl:
|
ssl:
|
||||||
enabled: false
|
enabled: false
|
||||||
@@ -15,9 +15,9 @@ spring:
|
|||||||
# commandTimeout: 5000
|
# commandTimeout: 5000
|
||||||
datasource:
|
datasource:
|
||||||
# MySql
|
# 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
|
username: root
|
||||||
password: root
|
password: Root123!
|
||||||
# PostgreSQL
|
# PostgreSQL
|
||||||
#url: jdbc:postgresql://127.0.0.1:5432/bladex_boot
|
#url: jdbc:postgresql://127.0.0.1:5432/bladex_boot
|
||||||
#username: postgres
|
#username: postgres
|
||||||
@@ -56,7 +56,7 @@ oss:
|
|||||||
#minio、s3、qiniu、alioss、huaweiobs、tencentcos
|
#minio、s3、qiniu、alioss、huaweiobs、tencentcos
|
||||||
name: minio
|
name: minio
|
||||||
#租户模式
|
#租户模式
|
||||||
tenant-mode: true
|
tenant-mode: false
|
||||||
#oss服务地址
|
#oss服务地址
|
||||||
endpoint: http://192.168.31.132:9000
|
endpoint: http://192.168.31.132:9000
|
||||||
#oss转换服务地址,用于内网上传后将返回地址改为转换的外网地址
|
#oss转换服务地址,用于内网上传后将返回地址改为转换的外网地址
|
||||||
@@ -75,5 +75,5 @@ blade:
|
|||||||
##是否启用分布式锁
|
##是否启用分布式锁
|
||||||
enabled: false
|
enabled: false
|
||||||
##redis服务地址
|
##redis服务地址
|
||||||
address: redis://localhost:6379
|
address: redis://192.168.31.132:6379
|
||||||
password:
|
password: 112233
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ spring:
|
|||||||
##redis 单机环境配置
|
##redis 单机环境配置
|
||||||
##将docker脚本部署的redis服务映射为宿主机ip
|
##将docker脚本部署的redis服务映射为宿主机ip
|
||||||
##生产环境推荐使用阿里云高可用redis服务并设置密码
|
##生产环境推荐使用阿里云高可用redis服务并设置密码
|
||||||
host: 192.168.31.132
|
host: 127.0.0.1
|
||||||
port: 6379
|
port: 6379
|
||||||
password: 112233
|
password: 112233
|
||||||
database: 0
|
database: 0
|
||||||
@@ -16,9 +16,9 @@ spring:
|
|||||||
# nodes: 127.0.0.1:7001,127.0.0.1:7002,127.0.0.1:7003
|
# nodes: 127.0.0.1:7001,127.0.0.1:7002,127.0.0.1:7003
|
||||||
# commandTimeout: 5000
|
# commandTimeout: 5000
|
||||||
datasource:
|
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
|
username: root
|
||||||
password: Root123!
|
password: PSwd123!@#
|
||||||
|
|
||||||
#第三方登陆
|
#第三方登陆
|
||||||
social:
|
social:
|
||||||
@@ -35,13 +35,15 @@ oss:
|
|||||||
#租户模式
|
#租户模式
|
||||||
tenant-mode: false
|
tenant-mode: false
|
||||||
#oss服务地址
|
#oss服务地址
|
||||||
endpoint: http://192.168.31.132:9000
|
endpoint: http://127.0.0.1:9000
|
||||||
#oss转换服务地址,用于内网上传后将返回地址改为转换的外网地址
|
#oss转换服务地址,用于内网上传后将返回地址改为转换的外网地址
|
||||||
transform-endpoint: https://image.tttzai.com
|
transform-endpoint: http://52.65.62.15:9000
|
||||||
#访问key
|
#访问key
|
||||||
access-key: minioadmin
|
access-key: admin
|
||||||
|
# access-key: minioadmin
|
||||||
#密钥key
|
#密钥key
|
||||||
secret-key: 112minioadmin
|
secret-key: Test@Minio123
|
||||||
|
# secret-key: 112minioadmin
|
||||||
#存储桶
|
#存储桶
|
||||||
bucket-name: memory-block
|
bucket-name: memory-block
|
||||||
|
|
||||||
@@ -53,5 +55,5 @@ blade:
|
|||||||
enabled: false
|
enabled: false
|
||||||
##将docker脚本部署的redis服务映射为宿主机ip
|
##将docker脚本部署的redis服务映射为宿主机ip
|
||||||
##生产环境推荐使用阿里云高可用redis服务并设置密码
|
##生产环境推荐使用阿里云高可用redis服务并设置密码
|
||||||
address: redis://192.168.31.132:6379
|
address: redis://127.0.0.1:6379
|
||||||
password: 112233
|
password: 112233
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#服务器配置
|
#服务器配置
|
||||||
server:
|
server:
|
||||||
port: 80
|
port: 8080
|
||||||
undertow:
|
undertow:
|
||||||
threads:
|
threads:
|
||||||
# 设置IO线程数, 它主要执行非阻塞的任务,它们会负责多个连接, 默认设置每个CPU核心一个线程
|
# 设置IO线程数, 它主要执行非阻塞的任务,它们会负责多个连接, 默认设置每个CPU核心一个线程
|
||||||
|
|||||||
Reference in New Issue
Block a user