Authored by chenchao

record bill log

@@ -255,6 +255,7 @@ public class BuyerOrderCancelService { @@ -255,6 +255,7 @@ public class BuyerOrderCancelService {
255 BillLogEvent.BillLogEventBuilder blebOfBuyer = BillLogEvent.builder() 255 BillLogEvent.BillLogEventBuilder blebOfBuyer = BillLogEvent.builder()
256 .buyerUid(buyerUid).sellerUid(sellerUid).orderCode(orderCode) 256 .buyerUid(buyerUid).sellerUid(sellerUid).orderCode(orderCode)
257 .payType(buyerOrder.getPayment()).refundCase(RefundCase.BUYER_GOODS_MONEY) 257 .payType(buyerOrder.getPayment()).refundCase(RefundCase.BUYER_GOODS_MONEY)
  258 + .amount(leftBuyerMoney)
258 .skup(skup); 259 .skup(skup);
259 logger.info("in BuyerCancelAfterProcessTask call begin payRefundService.refund buyer, buyerUid {}, orderCode {}, skup {} refundReqOfSeller {}", 260 logger.info("in BuyerCancelAfterProcessTask call begin payRefundService.refund buyer, buyerUid {}, orderCode {}, skup {} refundReqOfSeller {}",
260 buyerUid, orderCode, skup, rprOfBuyer ); 261 buyerUid, orderCode, skup, rprOfBuyer );
@@ -108,12 +108,12 @@ public class TradeBillsService { @@ -108,12 +108,12 @@ public class TradeBillsService {
108 try { 108 try {
109 JSONObject metavalue = JSON.parseObject(meta.getMetaValue()); 109 JSONObject metavalue = JSON.parseObject(meta.getMetaValue());
110 BigDecimal rate = metavalue.getJSONObject("serviceFeeRate").getBigDecimal("payChannelRate"); 110 BigDecimal rate = metavalue.getJSONObject("serviceFeeRate").getBigDecimal("payChannelRate");
111 - amount = amount.multiply(BigDecimal.ONE.subtract(rate)).multiply(new BigDecimal("-1")).setScale(2, BigDecimal.ROUND_HALF_UP); 111 + BigDecimal samount = amount.multiply(BigDecimal.ONE.subtract(rate)).multiply(new BigDecimal("-1")).setScale(2, BigDecimal.ROUND_HALF_UP);
  112 + record.setSystemAmount(samount);// 有货收入
112 } catch (Exception e) { 113 } catch (Exception e) {
113 logger.error("PayRecordErr计费信息不完整, uid is {}, skup is {}, err is {}", uid, skup, e.getMessage()); 114 logger.error("PayRecordErr计费信息不完整, uid is {}, skup is {}, err is {}", uid, skup, e.getMessage());
114 - return;  
115 } 115 }
116 - record.setSystemAmount(amount);// 有货收入 116 +
117 record.setTradeStatus(tradeStatus);//0:订单未完结;1:订单完结 117 record.setTradeStatus(tradeStatus);//0:订单未完结;1:订单完结
118 record.setCreateTime((int) (System.currentTimeMillis() / 1000)); 118 record.setCreateTime((int) (System.currentTimeMillis() / 1000));
119 addTradeBills(record); 119 addTradeBills(record);