修复openapi、file模块docker部署失败的问题

This commit is contained in:
2026-08-07 12:56:20 +08:00
parent de5cecd0cd
commit ed0e61563c
9 changed files with 77 additions and 49 deletions

View File

@@ -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,17 +380,25 @@ 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()
.eq(CustomerArchive::getCustomerCode, customer.getCustomerCode())
.eq(CustomerArchive::getIsDeleted, 0)
.ne(Func.isNotEmpty(customer.getId()), CustomerArchive::getId, customer.getId())) > 0L) {
throw new ServiceException("客商编号已存在");
if (Func.isNotEmpty(customer.getCustomerCode())) {
LambdaQueryWrapper<CustomerArchive> customerCodeQuery = Wrappers.<CustomerArchive>lambdaQuery()
.eq(CustomerArchive::getCustomerCode, customer.getCustomerCode())
.eq(CustomerArchive::getIsDeleted, 0);
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) {
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());