Commit c41a7089 by 程裕兵

feat:refund

parent ca0baf6c
...@@ -188,6 +188,7 @@ public class StudioCashierRecordRpService extends ...@@ -188,6 +188,7 @@ public class StudioCashierRecordRpService extends
public List<StudioCashierRecord> listByRelatedTransNo(Long relatedTransNo) { public List<StudioCashierRecord> listByRelatedTransNo(Long relatedTransNo) {
QueryWrapper<StudioCashierRecord> wrapper = new QueryWrapper<>(); QueryWrapper<StudioCashierRecord> wrapper = new QueryWrapper<>();
wrapper.eq(StudioCashierRecord.RELATED_TRANS_NO, relatedTransNo); wrapper.eq(StudioCashierRecord.RELATED_TRANS_NO, relatedTransNo);
wrapper.orderByDesc(StudioCashierRecord.ID);
return Optional.ofNullable(this.baseMapper.selectList(wrapper)).orElse(new ArrayList<>(1)); return Optional.ofNullable(this.baseMapper.selectList(wrapper)).orElse(new ArrayList<>(1));
} }
} }
...@@ -210,6 +210,8 @@ public class RefundServiceImpl implements RefundService { ...@@ -210,6 +210,8 @@ public class RefundServiceImpl implements RefundService {
StudioCashierRecord record = RefundConvert.convertRefundInit(params, pay, historyRefundActualAmount); StudioCashierRecord record = RefundConvert.convertRefundInit(params, pay, historyRefundActualAmount);
studioCashierRecordRpService.insert(record); studioCashierRecordRpService.insert(record);
studioCashierRecordRpService.updateById(
StudioCashierRecord.builder().id(payId).existRelatedTrans(true).updateTime(new Date()).build());
return record; return record;
}); });
} }
......
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