Authored by chenchao

record bill log

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