From 233b0814bbb73b5c791ebe3643f4bd91ba2fa959 Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期二, 15 一月 2019 09:06:05 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- fanli/src/main/java/com/yeshi/fanli/service/impl/order/CommonOrderServiceImpl.java | 84 ++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 84 insertions(+), 0 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/service/impl/order/CommonOrderServiceImpl.java b/fanli/src/main/java/com/yeshi/fanli/service/impl/order/CommonOrderServiceImpl.java index 4aced39..fa1f2d4 100644 --- a/fanli/src/main/java/com/yeshi/fanli/service/impl/order/CommonOrderServiceImpl.java +++ b/fanli/src/main/java/com/yeshi/fanli/service/impl/order/CommonOrderServiceImpl.java @@ -546,4 +546,88 @@ } + + @Override + public List<CommonOrderVO> listQuery(long start, int count, Integer keyType, String key, Integer state, + Integer type, Integer orderState, String startTime, String endTime) throws CommonOrderException { + + + List<CommonOrderVO> list = commonOrderMapper.listQuery(start, count,keyType, key, state, type, + orderState, startTime, endTime); + + + if (list == null) { + list = new ArrayList<CommonOrderVO>(); + } + + if (list.size() == 0) { + return list; + } + + SimpleDateFormat format = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss"); + for (CommonOrderVO order : list) { + + // 涓嬪崟鏃堕棿 + Date thirdCreateTime = order.getThirdCreateTime(); + if (thirdCreateTime != null) { + order.setDownTime(format.format(thirdCreateTime)); + } + // 鏀惰揣鏃堕棿 + Date settleTime = order.getSettleTime(); + if (settleTime != null) { + order.setReceiveTime(format.format(settleTime)); + } + + // 鍒拌处鏃堕棿 + Date accountTime = order.getAccountTime(); + if (accountTime != null) { + order.setHongBaoDate(format.format(accountTime)); + } + + BigDecimal settlement = order.getSettlement(); + if (settlement != null && settlement.compareTo(new BigDecimal(0)) > 0) { + order.setPayment(settlement); // 瀹為檯浠樻閲戦 + } + + /* 璁㈠崟杩斿埄绫诲瀷 杞崲 */ + Integer hongBaoType = order.getHongBaoType(); + if (HongBaoV2.TYPE_ZIGOU == hongBaoType || 2 == hongBaoType) { + // 鑷喘 + order.setHongBaoType(1); + } else if (HongBaoV2.TYPE_SHARE_GOODS == hongBaoType) { + // 鍒嗕韩 + order.setHongBaoType(2); + } else if (HongBaoV2.TYPE_YAOQING == hongBaoType || HongBaoV2.TYPE_YIJI == hongBaoType + || HongBaoV2.TYPE_ERJI == hongBaoType || HongBaoV2.TYPE_SHARE_YIJI == hongBaoType + || HongBaoV2.TYPE_SHARE_ERJI == hongBaoType) { + // 閭�璇� + order.setHongBaoType(3); + } + + Integer hongBaoState = order.getHongBaoState(); + if (HongBaoV2.STATE_KELINGQU == hongBaoState || HongBaoV2.STATE_BUKELINGQU == hongBaoState) { + // 鏈埌璐� + order.setHongBaoState(1); + + } else if (HongBaoV2.STATE_YILINGQU == hongBaoState) { + // 宸插埌璐� + order.setHongBaoState(2); + + } else if (HongBaoV2.STATE_SHIXIAO == hongBaoState) { + // 宸插け鏁� + order.setHongBaoState(3); + } + + } + + return list; + + } + + @Override + public long countQuery(Integer keyType, String key, Integer state, Integer type, Integer orderState, + String startTime, String endTime) throws CommonOrderException { + return commonOrderMapper.countQuery(keyType, key, state, type, orderState, startTime, endTime); + } + } -- Gitblit v1.8.0