Commit ed7b8c66 authored by jiaorz's avatar jiaorz

订单押金记录问题

parent b2074d29
......@@ -162,8 +162,13 @@ public class OrderDepositRefundRecordBiz extends BaseBiz<DepositRefundRecordMapp
if(depositRefundRecord != null) {
DepositRefundRecord newValue = new DepositRefundRecord();
BeanUtil.copyProperties(depositRefundRecord, newValue, CopyOptions.create().setIgnoreNullValue(true).setIgnoreError(true));
newValue.setAmount(orderViolation.getPrice());
newValue.setRestAmount(depositRefundRecord.getTotalAmount().subtract(orderViolation.getPrice()));//减去违章金之后的押金
if (orderViolation.getPrice().doubleValue() > 0) {
newValue.setAmount(orderViolation.getPrice());
newValue.setRestAmount(depositRefundRecord.getRestAmount().subtract(orderViolation.getPrice()));//减去违章金之后的押金
} else {
newValue.setAmount(new BigDecimal(0));
newValue.setRestAmount(depositRefundRecord.getRestAmount());//减去违章金之后的押金
}
newValue.setIscomplete(false);
newValue.setId(null);
mapper.insert(newValue);
......
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