修复TJ MGN BUG

yun-zuoyi
puxiao.liao 5 years ago
parent 68a079fa69
commit 85feb7927a

@ -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);

Loading…
Cancel
Save