Authored by Lixiaodi

增加保证金明细信息

... ... @@ -360,8 +360,18 @@ public class MerchantOrderPaymentService extends AbstractOrderPaymentService {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy年MM月dd日 HH:mm");
for (SellerWalletDetail detail : resultList) {
JSONObject result = new JSONObject();
result.put("amount", detail.getAmount().setScale(2).toString());
if (detail.getAmount().compareTo(BigDecimal.ZERO) >= 0) {
result.put("amount", "+" + detail.getAmount().setScale(2).toString());
} else {
result.put("amount", detail.getAmount().setScale(2).toString());
}
result.put("type", sw.getType());
if (sw.getType() == 1) {
result.put("name", "充值保证金");
}
if (sw.getType() / 10 == 3 || sw.getType() == 61) {
result.put("name", "支付保证金");
}
result.put("info", SellerWalletDetail.Type.of(sw.getType()).getName());
result.put("time", sdf.format(new Date(1000L * detail.getCreateTime())));
array.add(result);
... ...