From 88c7df1d5089d8e39f356a68eaccc18f308e190c Mon Sep 17 00:00:00 2001 From: yujian <yujian@163.com> Date: 星期二, 24 三月 2020 12:10:07 +0800 Subject: [PATCH] Merge branch 'div' into div-1 --- fanli/src/main/java/com/yeshi/fanli/service/impl/order/CommonOrderServiceImpl.java | 43 +++++++++++++++++++++++++------------------ 1 files changed, 25 insertions(+), 18 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 dad4451..00ed15f 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 @@ -71,7 +71,6 @@ import com.yeshi.fanli.util.jd.JDApiUtil; import com.yeshi.fanli.util.jd.JDUtil; import com.yeshi.fanli.util.pinduoduo.PinDuoDuoApiUtil; -import com.yeshi.fanli.util.taobao.TaoBaoOrderUtil; import com.yeshi.fanli.util.taobao.TaoBaoUtil; import com.yeshi.fanli.util.taobao.TaoKeApiUtil; import com.yeshi.fanli.util.user.UserLevelUtil; @@ -273,6 +272,7 @@ } Map<Long, Boolean> vipUserMap = userVIPInfoService.listByUids(needSelectVIPUidList); + // 璁剧疆鏄惁涓簐ip璁㈠崟 for (CommonOrderVO order : listOrder) { if (order.getHongBaoType() == HongBaoV2.TYPE_YIJI || order.getHongBaoType() == HongBaoV2.TYPE_ERJI @@ -303,8 +303,7 @@ String orderNo = order.getOrderNo(); Integer sourceType = order.getSourceType(); Integer hongBaoType = order.getHongBaoType(); - - + // 鍟嗗搧淇℃伅缁勫悎 for (CommonOrderVO commonOrder : listGoods) { CommonOrderGoods goods = commonOrder.getCommonOrderGoods(); @@ -334,6 +333,7 @@ } commonGoodsVO.setActualPay("浠樻閲戦锛毬�" + totalSettlement); + // 閭�璇疯鍗曚俊鎭繚鎶� if (HongBaoV2.TYPE_YAOQING == hongBaoType || HongBaoV2.TYPE_YIJI == hongBaoType || HongBaoV2.TYPE_ERJI == hongBaoType || HongBaoV2.TYPE_SHARE_YIJI == hongBaoType @@ -360,11 +360,11 @@ order.getListOrderGoods().add(commonGoodsVO); } } - + Date thirdCreateTime = order.getThirdCreateTime(); order.setDownTime("涓嬪崟鏃堕棿锛�" + format.format(thirdCreateTime)); order.setObtainTime(thirdCreateTime.getTime()); - + Date settleTime = order.getSettleTime(); if (settleTime != null) { order.setReceiveTime("鏀惰揣鏃堕棿锛�" + format.format(settleTime)); @@ -905,7 +905,7 @@ wholeOrderState = CommonOrder.STATE_WHOLE_ORDER_BUFENYOUXIAO; for (TaoBaoOrder taoBaoOrder : taoBaoOrders) { - CommonOrder newCommonOrder = TaoBaoOrderUtil.convert(taoBaoOrder); + CommonOrder newCommonOrder = CommonOrderFactory.create(taoBaoOrder); CommonOrderGoods cog = new CommonOrderGoods(); cog.setGoodsId(taoBaoOrder.getAuctionId() + ""); cog.setGoodsType(Constant.SOURCE_TYPE_TAOBAO); @@ -1243,7 +1243,7 @@ @Override public List<CommonOrderVO> listQuery(long start, int count, Integer keyType, String key, Integer state, Integer type, Integer orderState, String startTime, String endTime, Integer source, List<Long> listShopId, - List<Long> listGoodsId, Date minTime, BigDecimal money,BigDecimal payment) throws CommonOrderException { + List<Long> listGoodsId, Date minTime, BigDecimal money, BigDecimal payment) throws CommonOrderException { List<CommonOrderVO> list = null; @@ -1252,7 +1252,7 @@ startTime, endTime, source, payment); } else { list = commonOrderMapper.listQuery(start, count, keyType, key, state, type, orderState, startTime, endTime, - source, listShopId, listGoodsId, minTime, money,payment); + source, listShopId, listGoodsId, minTime, money, payment); } if (list == null) { @@ -1439,7 +1439,7 @@ @Override public long countQuery(Integer keyType, String key, Integer state, Integer type, Integer orderState, String startTime, String endTime, Integer source, List<Long> listShopId, List<Long> listGoodsId, - Date minTime, BigDecimal money,BigDecimal payment) throws CommonOrderException { + Date minTime, BigDecimal money, BigDecimal payment) throws CommonOrderException { if (StringUtil.isNullOrEmpty(key) || keyType == 1) {// 鎼滅储妗嗘棤鍊兼垨鑰呮寜璁㈠崟鍙锋悳绱㈡椂閮藉彧鎼滅储涓昏鍗� return commonOrderMapper.countQueryWithNoChild(keyType, key, state, type, orderState, startTime, endTime, source, payment); @@ -1676,7 +1676,8 @@ } @Override - public List<CommonOrderVO> searchOrderByUid(AcceptData acceptData, int page, int size, Long uid, List<ESOrder> list) throws Exception { + public List<CommonOrderVO> searchOrderByUid(AcceptData acceptData, int page, int size, Long uid, List<ESOrder> list) + throws Exception { List<CommonOrderVO> listVO = commonOrderMapper.searchOrderByUid((page - 1) * size, size, uid, list); // 璁㈠崟淇℃伅涓虹┖ @@ -1706,8 +1707,8 @@ * @param listGoods * @param uid */ - private void orderVOFactoryNew(AcceptData acceptData, List<CommonOrderVO> listOrder, List<CommonOrderVO> listGoods, Long uid) - throws Exception { + private void orderVOFactoryNew(AcceptData acceptData, List<CommonOrderVO> listOrder, List<CommonOrderVO> listGoods, + Long uid) throws Exception { List<String> listTB = new ArrayList<String>(); List<String> listJD = new ArrayList<String>(); List<String> listPDD = new ArrayList<String>(); @@ -1762,7 +1763,6 @@ } } } - SimpleDateFormat format = new SimpleDateFormat("yyyy.MM.dd HH:mm"); SimpleDateFormat formatday = new SimpleDateFormat("yyyy.MM.dd"); @@ -1773,12 +1773,12 @@ boolean vip = userVIPInfoService.isVIP(uid); // 鏄惁瀛樺湪濂栧姳鍒� boolean hasRewardCoupon = userSystemCouponService.getValidRebateCoupon(uid); - + for (CommonOrderVO order : listOrder) { String orderNo = order.getOrderNo(); Integer sourceType = order.getSourceType(); Integer hongBaoType = order.getHongBaoType(); - + // 鍟嗗搧淇℃伅缁勫悎 for (CommonOrderVO commonOrder : listGoods) { CommonOrderGoods goods = commonOrder.getCommonOrderGoods(); @@ -1807,8 +1807,7 @@ totalSettlement = commonOrder.getTotalPayment(); } commonGoodsVO.setActualPay("浠樻閲戦锛毬�" + totalSettlement); - - + // 閭�璇疯鍗曚俊鎭繚鎶� if (HongBaoV2.TYPE_YAOQING == hongBaoType || HongBaoV2.TYPE_YIJI == hongBaoType || HongBaoV2.TYPE_ERJI == hongBaoType || HongBaoV2.TYPE_SHARE_YIJI == hongBaoType @@ -1854,7 +1853,7 @@ order.setRebateLink(rebateLink + "?orderNo=" + orderNo +"&sourceType=" + sourceType); } } - + Date settleTime = order.getSettleTime(); if (settleTime != null) { order.setReceiveTime("鏀惰揣鏃堕棿锛�" + format.format(settleTime)); @@ -2197,4 +2196,12 @@ } } + @Override + public Date getThirdCreateTime(String orderId, int sourceType) { + List<CommonOrder> list = listBySourceTypeAndOrderId(sourceType, orderId); + if (list == null || list.size() == 0) + return null; + return list.get(0).getThirdCreateTime(); + } + } -- Gitblit v1.8.0