Authored by Lixiaodi

增加保证金明细信息

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