| | |
| | | //不忽略大小写、不去空、不忽略全半角 |
| | | 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)) { |
| | | //为空的时候不代表不校验,只是不去除相关的信息 |
| | | conditionMap.put("t." + attrId, "'" + value + "'"); |
| | | conditionMap.put("nvl("+ "t." + attrId+",'/')", "'" + value + "'"); |
| | | }else{ |
| | | conditionMap.put("t." + attrId, QueryOptionConstant.ISNULL); |
| | | } |
| | |
| | | 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); |