|
|
@@ -12,6 +12,10 @@ import com.uas.platform.core.exception.IllegalOperatorException;
|
|
|
import com.uas.platform.core.model.PageInfo;
|
|
|
import com.uas.platform.core.model.ServiceCode;
|
|
|
import com.uas.platform.core.model.Status;
|
|
|
+import com.uas.platform.core.persistence.criteria.CriterionExpression;
|
|
|
+import com.uas.platform.core.persistence.criteria.LogicalExpression;
|
|
|
+import com.uas.platform.core.persistence.criteria.PredicateUtils;
|
|
|
+import com.uas.platform.core.persistence.criteria.SimpleExpression;
|
|
|
import org.apache.commons.collections.CollectionUtils;
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
@@ -222,7 +226,12 @@ public class BrandSubmitServiceImpl implements BrandSubmitService {
|
|
|
@Override
|
|
|
public Page<BrandSubmit> findAllBrand(final PageInfo pageInfo, String keyword) {
|
|
|
if (StringUtils.hasText(keyword)) {
|
|
|
- pageInfo.filter("nameEn", keyword, true);
|
|
|
+ SimpleExpression nameEn = new SimpleExpression("nameEn", keyword, CriterionExpression.Operator.LIKE);
|
|
|
+ SimpleExpression nameCn = new SimpleExpression("nameCn", keyword, CriterionExpression.Operator.LIKE);
|
|
|
+ SimpleExpression userName = new SimpleExpression("userModify.userName", keyword, CriterionExpression.Operator.LIKE);
|
|
|
+ SimpleExpression[] simpleExpressions = new SimpleExpression[]{nameEn, nameCn, userName};
|
|
|
+ LogicalExpression logicalExpression = PredicateUtils.or(simpleExpressions);
|
|
|
+ pageInfo.expression(logicalExpression);
|
|
|
}
|
|
|
return brandSubmitDao.findAll(new Specification<BrandSubmit>() {
|
|
|
@Override
|