|
|
@@ -586,12 +586,13 @@ public class InquiryForSaleServiceImpl implements InquiryForSaleService {
|
|
|
return remindIPage;
|
|
|
}
|
|
|
|
|
|
- public IPage<InquiryEnRemind> findEnRemindByPageInfo(final PageInfo pageInfo, final SearchFilter filter, Integer isAll) {
|
|
|
+ public IPage<InquiryEnRemind> findEnRemindByPageInfo(final PageInfo pageInfo, final SearchFilter filter) {
|
|
|
Sort sort = new Sort(Sort.Direction.DESC, "date");
|
|
|
if (pageInfo.getOffset() == 0) {
|
|
|
pageInfo.setOffset(pageInfo.getPageSize() * (pageInfo.getPageNumber() - 1));
|
|
|
}
|
|
|
pageInfo.setSort(sort);
|
|
|
+ Integer isAll = null;
|
|
|
if (null != filter) {
|
|
|
if (StringUtils.hasText(filter.getKeyword())) {
|
|
|
SimpleExpression title = new SimpleExpression("prodTitle", filter.getKeyword(), CriterionExpression.Operator.LIKE, true);
|
|
|
@@ -610,9 +611,10 @@ public class InquiryForSaleServiceImpl implements InquiryForSaleService {
|
|
|
if (filter.getEndDate() != null) {
|
|
|
pageInfo.expression(PredicateUtils.lte("reDate", new Date(filter.getEndDate()), false));
|
|
|
}
|
|
|
- }
|
|
|
- if (!StringUtils.isEmpty(isAll) && isAll == 0) {
|
|
|
- pageInfo.filter("remindStatus", 0);
|
|
|
+ if (!StringUtils.isEmpty(filter.getIsAll()) && filter.getIsAll() == 0) {
|
|
|
+ pageInfo.filter("remindStatus", 0);
|
|
|
+ isAll = filter.getIsAll();
|
|
|
+ }
|
|
|
}
|
|
|
Page reminds = inquiryEnRemindDao.findAll(new Specification<InquiryEnRemind>() {
|
|
|
public Predicate toPredicate(Root<InquiryEnRemind> root, CriteriaQuery<?> query, CriteriaBuilder builder) {
|
|
|
@@ -620,7 +622,7 @@ public class InquiryForSaleServiceImpl implements InquiryForSaleService {
|
|
|
return null;
|
|
|
}
|
|
|
}, pageInfo);
|
|
|
- return covertEnRemindIPage(reminds);
|
|
|
+ return covertEnRemindIPage(reminds, isAll);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
@@ -742,7 +744,7 @@ public class InquiryForSaleServiceImpl implements InquiryForSaleService {
|
|
|
* @param enReminds 推荐询价信息
|
|
|
* @return
|
|
|
*/
|
|
|
- private IPage<InquiryEnRemind> covertEnRemindIPage(Page enReminds) {
|
|
|
+ private IPage<InquiryEnRemind> covertEnRemindIPage(Page enReminds, Integer isAll) {
|
|
|
IPage<InquiryEnRemind> remindIPage = IPageUtils.covertIgnoreContent(enReminds);
|
|
|
if (!CollectionUtils.isEmpty(enReminds.getContent())) {
|
|
|
List<InquiryEnRemind> remindList = enReminds.getContent();
|
|
|
@@ -766,6 +768,10 @@ public class InquiryForSaleServiceImpl implements InquiryForSaleService {
|
|
|
remind.setStatus(Status.FINISH.value());
|
|
|
}
|
|
|
}
|
|
|
+ if (!StringUtils.isEmpty(isAll) && isAll == 0) {
|
|
|
+ remind.setInquiry(null);
|
|
|
+ remind.setQuotation(null);
|
|
|
+ }
|
|
|
}
|
|
|
remindIPage.setContent(remindList);
|
|
|
}
|