...
|
...
|
@@ -55,8 +55,8 @@ public class TradeBillsService { |
|
|
record.setTradeType(1);//1:保证金;2:货款;3:补偿款
|
|
|
record.setIncomeOutcome(1);// 1:用户收入; 2:用户支出
|
|
|
|
|
|
BigDecimal earnestMoney;
|
|
|
BigDecimal amount;
|
|
|
BigDecimal earnestMoney = BigDecimal.ZERO;
|
|
|
BigDecimal amount = BigDecimal.ZERO;
|
|
|
try {
|
|
|
JSONObject metavalue = JSON.parseObject(meta.getMetaValue());
|
|
|
BigDecimal rate = metavalue.getJSONObject("serviceFeeRate").getBigDecimal("payChannelRate");
|
...
|
...
|
@@ -64,7 +64,7 @@ public class TradeBillsService { |
|
|
amount = earnestMoney.multiply(BigDecimal.ONE.subtract(rate)).multiply(new BigDecimal("-1")).setScale(2, BigDecimal.ROUND_HALF_UP);
|
|
|
} catch (Exception e) {
|
|
|
logger.error("PayRecordErr计费信息不完整, uid is {}, skup is {}, err is {}", uid, skup, e.getMessage());
|
|
|
return;
|
|
|
// return;
|
|
|
}
|
|
|
record.setAmount(earnestMoney);
|
|
|
record.setSystemAmount(amount);// 有货收入
|
...
|
...
|
@@ -108,12 +108,13 @@ 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;
|
|
|
// return;
|
|
|
}
|
|
|
record.setSystemAmount(amount);// 有货收入
|
|
|
|
|
|
record.setTradeStatus(tradeStatus);//0:订单未完结;1:订单完结
|
|
|
record.setCreateTime((int) (System.currentTimeMillis() / 1000));
|
|
|
addTradeBills(record);
|
...
|
...
|
|