From 25e129946ade607c6cc163dfc282eff42a326d58 Mon Sep 17 00:00:00 2001
From: ludc
Date: 星期日, 26 十一月 2023 19:29:50 +0800
Subject: [PATCH] 代码提交
---
Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmEngineServiceImpl.java | 10 +++-------
1 files changed, 3 insertions(+), 7 deletions(-)
diff --git a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmEngineServiceImpl.java b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmEngineServiceImpl.java
index 1a85609..c596095 100644
--- a/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmEngineServiceImpl.java
+++ b/Source/UBCS/ubcs-service/ubcs-code/src/main/java/com/vci/ubcs/code/service/impl/MdmEngineServiceImpl.java
@@ -69,11 +69,7 @@
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cache.Cache;
import org.springframework.stereotype.Service;
-import org.springframework.transaction.PlatformTransactionManager;
-import org.springframework.transaction.TransactionStatus;
import org.springframework.transaction.annotation.Transactional;
-import org.springframework.transaction.support.DefaultTransactionDefinition;
-import org.springframework.transaction.support.TransactionTemplate;
import org.springframework.util.CollectionUtils;
import javax.annotation.Resource;
@@ -877,13 +873,13 @@
//涓嶅拷鐣ュぇ灏忓啓銆佷笉鍘荤┖銆佷笉蹇界暐鍏ㄥ崐瑙�
temp = "%s";
}
- queryKey = String.format(temp, "t." + attrId);
+ queryKey = String.format(temp, "nvl("+ "t." + attrId +",'/')");
queryValue = String.format(temp, "'" + (trim ? value.trim() : value) + "'");
conditionMap.put(queryKey, queryValue);
} else {
if(StringUtils.isNotBlank(value)) {
//涓虹┖鐨勬椂鍊欎笉浠h〃涓嶆牎楠岋紝鍙槸涓嶅幓闄ょ浉鍏崇殑淇℃伅
- conditionMap.put("t." + attrId, "'" + value + "'");
+ conditionMap.put("nvl("+ "t." + attrId+",'/')", "'" + value + "'");
}else{
conditionMap.put("t." + attrId, QueryOptionConstant.ISNULL);
}
@@ -1965,7 +1961,7 @@
String sqlHasPage = pageHelper.getLimit() > 0 ? ("select * from (select A.*,rownum RN from (" + sql + whereSubfixForPage) : sql;
String sqlCount = "select count(1) from " + tableName + SPACE + "t" + SPACE + joinTableList.values().stream().collect(Collectors.joining(SPACE))
+ (StringUtils.isBlank(whereSql) ? "" : " where ") + whereSql;
- String sqlId = "select ID from " + tableName + SPACE + "t" + SPACE + joinTableList.values().stream().collect(Collectors.joining(SPACE))
+ String sqlId = "select t.ID from " + tableName + SPACE + "t" + SPACE + joinTableList.values().stream().collect(Collectors.joining(SPACE))
+ (StringUtils.isBlank(whereSql) ? "" : " where ") + whereSql;
CodeTemplateAttrSqlBO sqlBO = new CodeTemplateAttrSqlBO();
sqlBO.setTableName(tableName);
--
Gitblit v1.9.3