修复openapi、file模块docker部署失败的问题
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
# 数据源配置
|
||||
spring:
|
||||
datasource:
|
||||
url: ${blade.datasource.dev.url}
|
||||
username: ${blade.datasource.dev.username}
|
||||
password: ${blade.datasource.dev.password}
|
||||
@@ -0,0 +1,6 @@
|
||||
# 数据源配置
|
||||
spring:
|
||||
datasource:
|
||||
url: ${blade.datasource.prod.url}
|
||||
username: ${blade.datasource.prod.username}
|
||||
password: ${blade.datasource.prod.password}
|
||||
@@ -0,0 +1,6 @@
|
||||
# 数据源配置
|
||||
spring:
|
||||
datasource:
|
||||
url: ${blade.datasource.test.url}
|
||||
username: ${blade.datasource.test.username}
|
||||
password: ${blade.datasource.test.password}
|
||||
@@ -1,32 +1,21 @@
|
||||
server:
|
||||
port: 8107
|
||||
|
||||
#数据源配置
|
||||
spring:
|
||||
datasource:
|
||||
url: ${blade.datasource.dev.url}
|
||||
username: ${blade.datasource.dev.username}
|
||||
password: ${blade.datasource.dev.password}
|
||||
application:
|
||||
name: blade-file
|
||||
cloud:
|
||||
nacos:
|
||||
discovery:
|
||||
namespace: ${spring.profiles.active}
|
||||
config:
|
||||
file-extension: yaml
|
||||
namespace: ${spring.profiles.active}
|
||||
shared-configs:
|
||||
- data-id: third-party-api.yaml
|
||||
- data-id: blade.yaml
|
||||
refresh: true
|
||||
- data-id: blade-${spring.profiles.active}.yaml
|
||||
refresh: true
|
||||
|
||||
#第三方接口本地默认配置,Nacos third-party-api.yaml 可覆盖
|
||||
thirdParty:
|
||||
ocr:
|
||||
baseUrl: ${OCR_BASE_URL:http://127.0.0.1:8080}
|
||||
baseOtherUrl: ${OCR_BASE_OTHER_URL:http://127.0.0.1:8080}
|
||||
wps:
|
||||
baseUrl: ${WPS_BASE_URL:http://127.0.0.1:8080}
|
||||
oa:
|
||||
baseUrl: ${OA_BASE_URL:http://127.0.0.1:8080}
|
||||
track:
|
||||
baseUrl: ${TRACK_BASE_URL:http://127.0.0.1:8080}
|
||||
mk:
|
||||
baseUrl: ${MK_BASE_URL:http://127.0.0.1:8080}
|
||||
|
||||
#spring:
|
||||
# application:
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
# 数据源配置
|
||||
spring:
|
||||
datasource:
|
||||
url: ${blade.datasource.dev.url}
|
||||
username: ${blade.datasource.dev.username}
|
||||
password: ${blade.datasource.dev.password}
|
||||
@@ -0,0 +1,6 @@
|
||||
# 数据源配置
|
||||
spring:
|
||||
datasource:
|
||||
url: ${blade.datasource.prod.url}
|
||||
username: ${blade.datasource.prod.username}
|
||||
password: ${blade.datasource.prod.password}
|
||||
@@ -0,0 +1,6 @@
|
||||
# 数据源配置
|
||||
spring:
|
||||
datasource:
|
||||
url: ${blade.datasource.test.url}
|
||||
username: ${blade.datasource.test.username}
|
||||
password: ${blade.datasource.test.password}
|
||||
@@ -1,32 +1,21 @@
|
||||
server:
|
||||
port: 8108
|
||||
|
||||
#数据源配置
|
||||
spring:
|
||||
datasource:
|
||||
url: ${blade.datasource.dev.url}
|
||||
username: ${blade.datasource.dev.username}
|
||||
password: ${blade.datasource.dev.password}
|
||||
application:
|
||||
name: blade-openapi
|
||||
cloud:
|
||||
nacos:
|
||||
discovery:
|
||||
namespace: ${spring.profiles.active}
|
||||
config:
|
||||
file-extension: yaml
|
||||
namespace: ${spring.profiles.active}
|
||||
shared-configs:
|
||||
- data-id: third-party-api.yaml
|
||||
- data-id: blade.yaml
|
||||
refresh: true
|
||||
- data-id: blade-${spring.profiles.active}.yaml
|
||||
refresh: true
|
||||
|
||||
#第三方接口本地默认配置,Nacos third-party-api.yaml 可覆盖
|
||||
thirdParty:
|
||||
ocr:
|
||||
baseUrl: ${OCR_BASE_URL:http://127.0.0.1:8080}
|
||||
baseOtherUrl: ${OCR_BASE_OTHER_URL:http://127.0.0.1:8080}
|
||||
wps:
|
||||
baseUrl: ${WPS_BASE_URL:http://127.0.0.1:8080}
|
||||
oa:
|
||||
baseUrl: ${OA_BASE_URL:http://127.0.0.1:8080}
|
||||
track:
|
||||
baseUrl: ${TRACK_BASE_URL:http://127.0.0.1:8080}
|
||||
mk:
|
||||
baseUrl: ${MK_BASE_URL:http://127.0.0.1:8080}
|
||||
|
||||
#spring:
|
||||
# application:
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
package org.springblade.transport.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
@@ -379,19 +380,27 @@ public class CustomerArchiveServiceImpl extends BaseServiceImpl<CustomerArchiveM
|
||||
}
|
||||
|
||||
private void validateUnique(CustomerArchiveVO customer) {
|
||||
if (count(Wrappers.<CustomerArchive>lambdaQuery()
|
||||
LambdaQueryWrapper<CustomerArchive> unifiedCreditCodeQuery = Wrappers.<CustomerArchive>lambdaQuery()
|
||||
.eq(CustomerArchive::getUnifiedCreditCode, customer.getUnifiedCreditCode())
|
||||
.eq(CustomerArchive::getIsDeleted, 0)
|
||||
.ne(Func.isNotEmpty(customer.getId()), CustomerArchive::getId, customer.getId())) > 0L) {
|
||||
.eq(CustomerArchive::getIsDeleted, 0);
|
||||
if (customer.getId() != null) {
|
||||
unifiedCreditCodeQuery.ne(CustomerArchive::getId, customer.getId());
|
||||
}
|
||||
if (count(unifiedCreditCodeQuery) > 0L) {
|
||||
throw new ServiceException("统一社会信用代码已存在");
|
||||
}
|
||||
if (Func.isNotEmpty(customer.getCustomerCode()) && count(Wrappers.<CustomerArchive>lambdaQuery()
|
||||
if (Func.isNotEmpty(customer.getCustomerCode())) {
|
||||
LambdaQueryWrapper<CustomerArchive> customerCodeQuery = Wrappers.<CustomerArchive>lambdaQuery()
|
||||
.eq(CustomerArchive::getCustomerCode, customer.getCustomerCode())
|
||||
.eq(CustomerArchive::getIsDeleted, 0)
|
||||
.ne(Func.isNotEmpty(customer.getId()), CustomerArchive::getId, customer.getId())) > 0L) {
|
||||
.eq(CustomerArchive::getIsDeleted, 0);
|
||||
if (customer.getId() != null) {
|
||||
customerCodeQuery.ne(CustomerArchive::getId, customer.getId());
|
||||
}
|
||||
if (count(customerCodeQuery) > 0L) {
|
||||
throw new ServiceException("客商编号已存在");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void replaceDetail(Long customerId, CustomerArchiveVO customer) {
|
||||
deleteDetail(List.of(customerId), false);
|
||||
@@ -718,7 +727,12 @@ public class CustomerArchiveServiceImpl extends BaseServiceImpl<CustomerArchiveM
|
||||
}
|
||||
|
||||
private void grantNewCustomerToIncludedUsers(CustomerArchive customer) {
|
||||
baseMapper.selectIncludeNewCustomerUserIds(customer.getTenantId()).forEach(userId -> {
|
||||
List<Long> userIds = new ArrayList<>(baseMapper.selectIncludeNewCustomerUserIds(customer.getTenantId()));
|
||||
Long currentUserId = AuthUtil.getUserId();
|
||||
if (Func.isNotEmpty(currentUserId) && !userIds.contains(currentUserId)) {
|
||||
userIds.add(currentUserId);
|
||||
}
|
||||
userIds.forEach(userId -> {
|
||||
UserCustomerScope scope = new UserCustomerScope();
|
||||
scope.setUserId(userId);
|
||||
scope.setCustomerId(customer.getId());
|
||||
|
||||
Reference in New Issue
Block a user