|
@@ -110,12 +110,24 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
|
|
|
// 查询数据
|
|
|
Page<Order> dictItemPage = this.page(
|
|
|
new Page<>(pageNum, pageSize),
|
|
|
- new LambdaQueryWrapper<Order>()
|
|
|
+ new LambdaQueryWrapper<Order>().eq(queryParams.getGoodId() != null,Order::getGoodId,queryParams.getGoodId())
|
|
|
+ .eq(queryParams.getPayStatus() != null,Order::getPayStatus,queryParams.getPayStatus())
|
|
|
//.like(StrUtil.isNotBlank(keywords), PayOrder::getCategoryName, keywords)
|
|
|
);
|
|
|
|
|
|
// 实体转换
|
|
|
Page<PayOrderVO> pageResult = converter.entity2Page(dictItemPage);
|
|
|
+
|
|
|
+ if(CollectionUtil.isNotEmpty(pageResult.getRecords())){
|
|
|
+ List<PayOrderVO> list = pageResult.getRecords().stream().map(item -> {
|
|
|
+ Integer amountsPayable = item.getAmountsPayable();
|
|
|
+ if (amountsPayable != null) {
|
|
|
+ item.setAmountActuallyPaid(new BigDecimal(amountsPayable).divide(new BigDecimal(100)));
|
|
|
+ }
|
|
|
+ return item;
|
|
|
+ }).collect(Collectors.toList());
|
|
|
+ pageResult.setRecords(list);
|
|
|
+ }
|
|
|
return pageResult;
|
|
|
}
|
|
|
|