修复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:
|
server:
|
||||||
port: 8107
|
port: 8107
|
||||||
|
|
||||||
#数据源配置
|
|
||||||
spring:
|
spring:
|
||||||
datasource:
|
application:
|
||||||
url: ${blade.datasource.dev.url}
|
name: blade-file
|
||||||
username: ${blade.datasource.dev.username}
|
|
||||||
password: ${blade.datasource.dev.password}
|
|
||||||
cloud:
|
cloud:
|
||||||
nacos:
|
nacos:
|
||||||
|
discovery:
|
||||||
|
namespace: ${spring.profiles.active}
|
||||||
config:
|
config:
|
||||||
|
file-extension: yaml
|
||||||
|
namespace: ${spring.profiles.active}
|
||||||
shared-configs:
|
shared-configs:
|
||||||
- data-id: third-party-api.yaml
|
- data-id: blade.yaml
|
||||||
|
refresh: true
|
||||||
|
- data-id: blade-${spring.profiles.active}.yaml
|
||||||
refresh: true
|
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:
|
#spring:
|
||||||
# application:
|
# 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:
|
server:
|
||||||
port: 8108
|
port: 8108
|
||||||
|
|
||||||
#数据源配置
|
|
||||||
spring:
|
spring:
|
||||||
datasource:
|
application:
|
||||||
url: ${blade.datasource.dev.url}
|
name: blade-openapi
|
||||||
username: ${blade.datasource.dev.username}
|
|
||||||
password: ${blade.datasource.dev.password}
|
|
||||||
cloud:
|
cloud:
|
||||||
nacos:
|
nacos:
|
||||||
|
discovery:
|
||||||
|
namespace: ${spring.profiles.active}
|
||||||
config:
|
config:
|
||||||
|
file-extension: yaml
|
||||||
|
namespace: ${spring.profiles.active}
|
||||||
shared-configs:
|
shared-configs:
|
||||||
- data-id: third-party-api.yaml
|
- data-id: blade.yaml
|
||||||
|
refresh: true
|
||||||
|
- data-id: blade-${spring.profiles.active}.yaml
|
||||||
refresh: true
|
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:
|
#spring:
|
||||||
# application:
|
# application:
|
||||||
|
|||||||
@@ -23,6 +23,7 @@
|
|||||||
package org.springblade.transport.service.impl;
|
package org.springblade.transport.service.impl;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
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.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
@@ -379,17 +380,25 @@ public class CustomerArchiveServiceImpl extends BaseServiceImpl<CustomerArchiveM
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void validateUnique(CustomerArchiveVO customer) {
|
private void validateUnique(CustomerArchiveVO customer) {
|
||||||
if (count(Wrappers.<CustomerArchive>lambdaQuery()
|
LambdaQueryWrapper<CustomerArchive> unifiedCreditCodeQuery = Wrappers.<CustomerArchive>lambdaQuery()
|
||||||
.eq(CustomerArchive::getUnifiedCreditCode, customer.getUnifiedCreditCode())
|
.eq(CustomerArchive::getUnifiedCreditCode, customer.getUnifiedCreditCode())
|
||||||
.eq(CustomerArchive::getIsDeleted, 0)
|
.eq(CustomerArchive::getIsDeleted, 0);
|
||||||
.ne(Func.isNotEmpty(customer.getId()), CustomerArchive::getId, customer.getId())) > 0L) {
|
if (customer.getId() != null) {
|
||||||
|
unifiedCreditCodeQuery.ne(CustomerArchive::getId, customer.getId());
|
||||||
|
}
|
||||||
|
if (count(unifiedCreditCodeQuery) > 0L) {
|
||||||
throw new ServiceException("统一社会信用代码已存在");
|
throw new ServiceException("统一社会信用代码已存在");
|
||||||
}
|
}
|
||||||
if (Func.isNotEmpty(customer.getCustomerCode()) && count(Wrappers.<CustomerArchive>lambdaQuery()
|
if (Func.isNotEmpty(customer.getCustomerCode())) {
|
||||||
.eq(CustomerArchive::getCustomerCode, customer.getCustomerCode())
|
LambdaQueryWrapper<CustomerArchive> customerCodeQuery = Wrappers.<CustomerArchive>lambdaQuery()
|
||||||
.eq(CustomerArchive::getIsDeleted, 0)
|
.eq(CustomerArchive::getCustomerCode, customer.getCustomerCode())
|
||||||
.ne(Func.isNotEmpty(customer.getId()), CustomerArchive::getId, customer.getId())) > 0L) {
|
.eq(CustomerArchive::getIsDeleted, 0);
|
||||||
throw new ServiceException("客商编号已存在");
|
if (customer.getId() != null) {
|
||||||
|
customerCodeQuery.ne(CustomerArchive::getId, customer.getId());
|
||||||
|
}
|
||||||
|
if (count(customerCodeQuery) > 0L) {
|
||||||
|
throw new ServiceException("客商编号已存在");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -718,7 +727,12 @@ public class CustomerArchiveServiceImpl extends BaseServiceImpl<CustomerArchiveM
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void grantNewCustomerToIncludedUsers(CustomerArchive customer) {
|
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();
|
UserCustomerScope scope = new UserCustomerScope();
|
||||||
scope.setUserId(userId);
|
scope.setUserId(userId);
|
||||||
scope.setCustomerId(customer.getId());
|
scope.setCustomerId(customer.getId());
|
||||||
|
|||||||
Reference in New Issue
Block a user