|
|
|
@ -1524,7 +1524,7 @@ public class BaseRepositoryImpl<T, ID extends Serializable> extends SimpleJpaRep
|
|
|
|
|
@Override
|
|
|
|
|
public double findMaxByProperties(String sumPropertyName, String groupByName, String[] paramName, Object[] paramValue) {
|
|
|
|
|
if ((paramName != null) && (paramName.length > 0) && (paramValue != null) && (paramValue.length > 0)) {
|
|
|
|
|
StringBuffer sb = new StringBuffer("select max(model." + sumPropertyName + ") from " + persistentClass.getName() + " model where 1=1 ");
|
|
|
|
|
StringBuffer sb = new StringBuffer("select max(CAST(model." + sumPropertyName + " as integer)) from " + persistentClass.getName() + " model where 1=1 ");
|
|
|
|
|
appendQL(sb, paramName, paramValue);
|
|
|
|
|
if(StringUtils.isNotBlank(groupByName)){
|
|
|
|
|
sb.append(" group by model." + groupByName);
|
|
|
|
|