|
|
@@ -28,6 +28,7 @@ import org.apache.commons.collections.map.HashedMap;
|
|
|
import org.apache.log4j.Logger;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.data.domain.Page;
|
|
|
+import org.springframework.data.domain.Sort;
|
|
|
import org.springframework.data.jpa.domain.Specification;
|
|
|
import org.springframework.jdbc.core.BatchPreparedStatementSetter;
|
|
|
import org.springframework.jdbc.core.ParameterizedPreparedStatementSetter;
|
|
|
@@ -1145,6 +1146,10 @@ public class ProductServiceImpl implements ProductService {
|
|
|
if (null == pageInfo) {
|
|
|
return null;
|
|
|
}
|
|
|
+ if (null == pageInfo.getSort()) {
|
|
|
+ Sort sort = new Sort(Sort.Direction.DESC, "id");
|
|
|
+ pageInfo.setSort(sort);
|
|
|
+ }
|
|
|
if (!StringUtils.isEmpty(keyword)) {
|
|
|
SimpleExpression pBrandEn = new SimpleExpression("pBrandEn", keyword, CriterionExpression.Operator.LIKE);
|
|
|
SimpleExpression title = new SimpleExpression("title", keyword, CriterionExpression.Operator.LIKE);
|