master
parent
6719151bb6
commit
756ec57b90
|
@ -1,5 +1,6 @@
|
||||||
package org.jeecgframework.core.common.dao.jdbc;
|
package org.jeecgframework.core.common.dao.jdbc;
|
||||||
|
|
||||||
|
import java.math.BigInteger;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
@ -89,10 +90,14 @@ public class SimpleJdbcTemplate {
|
||||||
try{
|
try{
|
||||||
Assert.hasText(sql,"sql语句不正确!");
|
Assert.hasText(sql,"sql语句不正确!");
|
||||||
|
|
||||||
if(parameters!=null){
|
if(parameters!=null&¶meters.size()>0){
|
||||||
return namedJdbcTemplate.queryForObject(sql, parameters,long.class);
|
Object res = namedJdbcTemplate.queryForObject(sql, parameters,BigInteger.class);
|
||||||
|
BigInteger a = new BigInteger(res.toString());
|
||||||
|
return a.longValue();
|
||||||
}else{
|
}else{
|
||||||
return jdbcTemplate.queryForObject(sql,long.class);
|
Object res = jdbcTemplate.queryForObject(sql,BigInteger.class);
|
||||||
|
BigInteger a = new BigInteger(res.toString());
|
||||||
|
return a.longValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
}catch (Exception e) {
|
}catch (Exception e) {
|
||||||
|
|
Loading…
Reference in New Issue