Commit edc9a29a by WeiCong

根据hibernate升级做了几处调整

parent 3c5ab77e
......@@ -58,15 +58,23 @@
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.9.7" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.9.7" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.9.7" level="project" />
<orderEntry type="library" name="Maven: org.hibernate:hibernate-core:5.1.17.Final" level="project" />
<orderEntry type="library" name="Maven: org.jboss.logging:jboss-logging:3.3.0.Final" level="project" />
<orderEntry type="library" name="Maven: org.hibernate:hibernate-core:5.6.9.Final" level="project" />
<orderEntry type="library" name="Maven: org.jboss.logging:jboss-logging:3.4.3.Final" level="project" />
<orderEntry type="library" name="Maven: javax.persistence:javax.persistence-api:2.2" level="project" />
<orderEntry type="library" name="Maven: net.bytebuddy:byte-buddy:1.12.9" level="project" />
<orderEntry type="library" name="Maven: antlr:antlr:2.7.7" level="project" />
<orderEntry type="library" name="Maven: org.apache.geronimo.specs:geronimo-jta_1.1_spec:1.1.1" level="project" />
<orderEntry type="library" name="Maven: org.jboss:jandex:2.0.3.Final" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml:classmate:1.3.0" level="project" />
<orderEntry type="library" name="Maven: org.dom4j:dom4j:2.1.1" level="project" />
<orderEntry type="library" name="Maven: org.hibernate:hibernate-c3p0:5.1.17.Final" level="project" />
<orderEntry type="library" name="Maven: org.hibernate.common:hibernate-commons-annotations:5.1.0.Final" level="project" />
<orderEntry type="library" name="Maven: org.jboss.spec.javax.transaction:jboss-transaction-api_1.2_spec:1.1.1.Final" level="project" />
<orderEntry type="library" name="Maven: org.jboss:jandex:2.4.2.Final" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml:classmate:1.5.1" level="project" />
<orderEntry type="library" name="Maven: javax.activation:javax.activation-api:1.2.0" level="project" />
<orderEntry type="library" name="Maven: javax.xml.bind:jaxb-api:2.3.1" level="project" />
<orderEntry type="library" name="Maven: org.glassfish.jaxb:jaxb-runtime:2.3.1" level="project" />
<orderEntry type="library" name="Maven: org.glassfish.jaxb:txw2:2.3.1" level="project" />
<orderEntry type="library" name="Maven: com.sun.istack:istack-commons-runtime:3.0.7" level="project" />
<orderEntry type="library" name="Maven: org.jvnet.staxex:stax-ex:1.8" level="project" />
<orderEntry type="library" name="Maven: com.sun.xml.fastinfoset:FastInfoset:1.2.15" level="project" />
<orderEntry type="library" name="Maven: org.hibernate:hibernate-c3p0:5.6.9.Final" level="project" />
<orderEntry type="library" name="Maven: org.hibernate.common:hibernate-commons-annotations:5.1.2.Final" level="project" />
<orderEntry type="library" name="Maven: org.hibernate.javax.persistence:hibernate-jpa-2.1-api:1.0.2.Final" level="project" />
<orderEntry type="library" name="Maven: com.mchange:c3p0:0.9.5.2" level="project" />
<orderEntry type="library" name="Maven: com.mchange:mchange-commons-java:0.2.11" level="project" />
......
......@@ -30,8 +30,8 @@
<log4j2.version>2.12.1</log4j2.version>
<ehcache.version>2.10.4</ehcache.version>
<jackson.version>2.9.7</jackson.version>
<hibernate.version>5.1.17.Final</hibernate.version>
<hibernate-commons-annotations.version>5.1.0.Final</hibernate-commons-annotations.version>
<hibernate.version>5.6.9.Final</hibernate.version>
<hibernate-commons-annotations.version>5.1.2.Final</hibernate-commons-annotations.version>
<java-jwt.version>2.2.0</java-jwt.version>
<servlet-api.version>2.5</servlet-api.version>
<junit.version>4.12</junit.version>
......
......@@ -4,8 +4,8 @@ import log.Log;
import log.LogFactory;
import org.apache.commons.beanutils.ConstructorUtils;
import org.apache.commons.beanutils.MethodUtils;
import org.hibernate.SQLQuery;
import org.hibernate.Session;
import org.hibernate.query.Query;
import org.hibernate.transform.Transformers;
import org.sss.common.model.Argument;
import org.sss.common.model.IModule;
......@@ -105,8 +105,8 @@ public class PreHandle {
public static boolean initUserInr(String cid, String oid) {
Session session = HibernateUtils.openSession(null);
String ptySql = "select inr,ptytyp from pty where (ptytyp='2' or PTYTYP='1') and cid=?";
SQLQuery sqlQuery = session.createSQLQuery(ptySql);
sqlQuery.setString((int) 0, cid);
Query<Map> sqlQuery = session.createSQLQuery(ptySql);
sqlQuery.setParameter(1, cid);
sqlQuery.setResultTransformer(Transformers.ALIAS_TO_ENTITY_MAP);
List<Map> ptyLst = sqlQuery.list();
......@@ -117,8 +117,8 @@ public class PreHandle {
String ptyinr = (String) ptyRs.get("INR");
String usrSql = "select inr,lgnnam,oprnam from usr where oid=? and ptyinr=?";
sqlQuery = session.createSQLQuery(usrSql);
sqlQuery.setString((int) 0, oid);
sqlQuery.setString(1, ptyinr);
sqlQuery.setParameter(1, oid);
sqlQuery.setParameter(2, ptyinr);
sqlQuery.setResultTransformer(Transformers.ALIAS_TO_ENTITY_MAP);
List<Map> usrLst = sqlQuery.list();
if (usrLst == null || usrLst.size() == 0) {
......
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
handlers = java.util.logging.ConsoleHandler
java.util.logging.ConsoleHandler.level = FINE
java.util.logging.ConsoleHandler.formatter = org.apache.juli.OneLineFormatter
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment