|
|
@@ -17,7 +17,6 @@ import com.uas.ps.inquiry.page.SearchFilter;
|
|
|
import com.uas.ps.inquiry.page.criteria.*;
|
|
|
import com.uas.ps.inquiry.page.exception.IllegalOperatorException;
|
|
|
import com.uas.ps.inquiry.service.PublicInquiryService;
|
|
|
-import com.uas.ps.inquiry.support.InquiryBufferedLogger;
|
|
|
import com.uas.ps.inquiry.util.*;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
@@ -34,7 +33,10 @@ import org.springframework.ui.ModelMap;
|
|
|
import org.springframework.util.CollectionUtils;
|
|
|
import org.springframework.util.StringUtils;
|
|
|
|
|
|
-import javax.persistence.criteria.*;
|
|
|
+import javax.persistence.criteria.CriteriaBuilder;
|
|
|
+import javax.persistence.criteria.CriteriaQuery;
|
|
|
+import javax.persistence.criteria.Predicate;
|
|
|
+import javax.persistence.criteria.Root;
|
|
|
import java.text.SimpleDateFormat;
|
|
|
import java.util.*;
|
|
|
|
|
|
@@ -528,7 +530,7 @@ public class PublicInquiryServiceImpl implements PublicInquiryService {
|
|
|
long start = System.currentTimeMillis();
|
|
|
log.info("发送消息实体" + JSON.toJSONString(models));
|
|
|
String res = HttpUtil.doPost(PS_MESSAGE_URL + "/messages", FlexJsonUtils.toJsonDeep(models));
|
|
|
- log.info("消息请求发送日志" + res);
|
|
|
+ log.info("消息请求发送");
|
|
|
log.info("/messages , 条数: " + models.size() + ",耗时:" + (System.currentTimeMillis() - start));
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
@@ -1135,6 +1137,22 @@ public class PublicInquiryServiceImpl implements PublicInquiryService {
|
|
|
}
|
|
|
info.setSort(sort);
|
|
|
if (null != filter) {
|
|
|
+ if (filter.getFromDate() != null) {
|
|
|
+ info.expression(PredicateUtils.gte("offerTime", new Date(filter.getFromDate()), false));
|
|
|
+ }
|
|
|
+ if (filter.getEndDate() != null) {
|
|
|
+ info.expression(PredicateUtils.lte("offerTime", new Date(filter.getEndDate()), false));
|
|
|
+ }
|
|
|
+ // 此处的 fromDelivery 作为发布时间过滤
|
|
|
+ if (filter.getFromDelivery() != null) {
|
|
|
+ info.expression(PredicateUtils.gte("date", new Date(filter.getFromDelivery()), false));
|
|
|
+ }
|
|
|
+ if (filter.getEndDelivery() != null) {
|
|
|
+ info.expression(PredicateUtils.lte("date", new Date(filter.getEndDelivery()), false));
|
|
|
+ }
|
|
|
+ if (filter.getUserUU() != null) {
|
|
|
+ info.expression(PredicateUtils.gte("vendUserUU", filter.getUserUU(), false));
|
|
|
+ }
|
|
|
if (StringUtils.hasText(filter.getKeyword())) {
|
|
|
SimpleExpression cmpCode = new SimpleExpression("cmpCode", filter.getKeyword(), CriterionExpression.Operator.LIKE, true);
|
|
|
SimpleExpression brand = new SimpleExpression("inbrand", filter.getKeyword(), CriterionExpression.Operator.LIKE, true);
|
|
|
@@ -1146,12 +1164,6 @@ public class PublicInquiryServiceImpl implements PublicInquiryService {
|
|
|
LogicalExpression logical = new LogicalExpression(simpleExpressions, CriterionExpression.Operator.OR);
|
|
|
info.expression(logical);
|
|
|
}
|
|
|
- if (filter.getFromDate() != null) {
|
|
|
- info.expression(PredicateUtils.gte("offerTime", new Date(filter.getFromDate()), false));
|
|
|
- }
|
|
|
- if (filter.getEndDate() != null) {
|
|
|
- info.expression(PredicateUtils.lte("offerTime", new Date(filter.getEndDate()), false));
|
|
|
- }
|
|
|
}
|
|
|
Page<PublicInquiryItemInfo> itemInfoPage = itemInfoDao.findAll(new Specification<PublicInquiryItemInfo>() {
|
|
|
@Override
|