Commit 5c69ce46 by 程裕兵

feat:流水列表增加可退余额

parent 51680ce1
...@@ -71,7 +71,8 @@ public class CashierConvert { ...@@ -71,7 +71,8 @@ public class CashierConvert {
return result; return result;
} }
public static PageVO<StudioCashierRecordVO> convertPageVO(Page<StudioCashierRecord> page) { public static PageVO<StudioCashierRecordVO> convertPageVO(Page<StudioCashierRecord> page,
List<StudioCashierRecordVO> list) {
return PageVO.convert(page, convertList(page.getContent())); return PageVO.convert(page, convertList(page.getContent()));
} }
......
...@@ -127,7 +127,13 @@ public class StudioCashierServiceImpl implements StudioCashierService { ...@@ -127,7 +127,13 @@ public class StudioCashierServiceImpl implements StudioCashierService {
PageBrandCashierRecordQuery query = JSON.parseObject(JSON.toJSONString(params), PageBrandCashierRecordQuery query = JSON.parseObject(JSON.toJSONString(params),
PageBrandCashierRecordQuery.class); PageBrandCashierRecordQuery.class);
Page<StudioCashierRecord> page = studioCashierRecordRpService.page(query); Page<StudioCashierRecord> page = studioCashierRecordRpService.page(query);
return CashierConvert.convertPageVO(page); List<String> payNos = page.getContent().stream()
.filter(e -> BrandCashierTransTypeEnum.PAY.getCode().equals(e.getTransType()))
.map(StudioCashierRecord::getTransNo)
.collect(Collectors.toList());
Map<String, List<StudioCashierRecord>> payNoRefundMap = studioCashierRecordRpService.mapByRelatedTransNos(
payNos);
return PageVO.convert(page, CashierConvert.convertList(page.getContent(), payNoRefundMap));
} }
@Override @Override
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment