cl
2026-04-21 228b881e5a893ec010a194ac42011a4169d0c590
rsf-server/src/main/java/com/vincent/rsf/server/manager/service/CusItemSyncViewQueryService.java
@@ -14,6 +14,8 @@
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.beans.factory.ObjectProvider;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import javax.sql.DataSource;
import java.util.ArrayList;
@@ -25,7 +27,7 @@
import java.util.stream.Collectors;
/**
 * cus_item_sync_view 查询;仅使用副库视图
 * cus_item_sync_view 查询;仅使用副库视图。查询不启事务,{@code NOT_SUPPORTED} 挂起外层以利路由副库。
 */
@UseDataSource(DataSourceNames.DJ_CLOUD_WMS)
@Service
@@ -47,6 +49,7 @@
    /**
     * 取视图前若干行
     */
    @Transactional(propagation = Propagation.NOT_SUPPORTED)
    public List<Map<String, Object>> probeSample(int limit) {
        if (cusItemSyncDataSourceProvider.getIfAvailable() == null) {
            return Collections.emptyList();
@@ -56,6 +59,7 @@
        return toViewMaps(page.getRecords());
    }
    @Transactional(propagation = Propagation.REQUIRES_NEW, readOnly = true)
    public List<Map<String, Object>> listByItemNos(Collection<String> itemNos) {
        if (itemNos == null || itemNos.isEmpty()) {
            return Collections.emptyList();