| | |
| | | for (TaoBaoOrder taoBaoOrder : taoBaoOrders) { |
| | | CommonOrder newCommonOrder = CommonOrderFactory.create(taoBaoOrder); |
| | | CommonOrderGoods cog = new CommonOrderGoods(); |
| | | cog.setGoodsId(taoBaoOrder.getAuctionId() + ""); |
| | | cog.setGoodsType(Constant.SOURCE_TYPE_TAOBAO); |
| | | newCommonOrder.setCommonOrderGoods(cog); |
| | | |
| | | if ("饿了么".equalsIgnoreCase(taoBaoOrder.getOrderType())) { |
| | | cog.setGoodsId(taoBaoOrder.getTradeId() + ""); |
| | | cog.setGoodsType(Constant.SOURCE_TYPE_ELME); |
| | | cog.setPicture("http://img.flqapp.com/resource/goods/elme_picture_demo.png"); |
| | | cog.setTitle(taoBaoOrder.getTitle()); |
| | | newCommonOrder.setCommonOrderGoods(cog); |
| | | } else { |
| | | cog.setGoodsId(taoBaoOrder.getAuctionId() + ""); |
| | | cog.setGoodsType(Constant.SOURCE_TYPE_TAOBAO); |
| | | newCommonOrder.setCommonOrderGoods(cog); |
| | | } |
| | | newCommonOrder.setStateWholeOrder(wholeOrderState); |
| | | // 订单商品插入 |
| | | List<CommonOrderGoods> commonGoodsList = commonOrderGoodsMapper.listByGoodsIdAndGoodsType(cog.getGoodsId(), |
| | |
| | | if (commonGoodsList.size() <= 0)// 不存在就插入商品 |
| | | { |
| | | TaoBaoGoodsBrief taoBaoGoods = null; |
| | | try { |
| | | taoBaoGoods = TaoKeApiUtil.getSimpleGoodsInfo(taoBaoOrder.getAuctionId()); |
| | | LogManager.getLogger(LogType.taobaoGoods).info(String.format("订单商品分类:%s#%s#%s", |
| | | taoBaoGoods.getAuctionId(), taoBaoGoods.getRootCategoryName(), taoBaoGoods.getLeafName())); |
| | | } catch (TaobaoGoodsDownException e) { |
| | | e.printStackTrace(); |
| | | LogHelper.errorDetailInfo(e, "AUCTIONID:" + taoBaoOrder.getAuctionId(), ""); |
| | | if (cog.getGoodsType() != Constant.SOURCE_TYPE_ELME) { |
| | | try { |
| | | taoBaoGoods = TaoBaoUtil.getSimpleGoodsBrief(taoBaoOrder.getAuctionId()); |
| | | // 记录商品分类 |
| | | taoBaoGoods = TaoKeApiUtil.getSimpleGoodsInfo(taoBaoOrder.getAuctionId()); |
| | | LogManager.getLogger(LogType.taobaoGoods) |
| | | .info(String.format("订单商品分类:%s#%s#%s", taoBaoGoods.getAuctionId(), |
| | | taoBaoGoods.getRootCategoryName(), taoBaoGoods.getLeafName())); |
| | | } catch (TaobaoGoodsDownException e) { |
| | | e.printStackTrace(); |
| | | LogHelper.errorDetailInfo(e, "AUCTIONID:" + taoBaoOrder.getAuctionId(), ""); |
| | | try { |
| | | taoBaoGoods = TaoBaoUtil.getSimpleGoodsBrief(taoBaoOrder.getAuctionId()); |
| | | // 记录商品分类 |
| | | |
| | | } catch (Exception e1) { |
| | | CommonGoods commonGoods = commonGoodsService.getCommonGoodsByGoodsIdAndGoodsType( |
| | | taoBaoOrder.getAuctionId(), Constant.SOURCE_TYPE_TAOBAO); |
| | | if (commonGoods != null) |
| | | taoBaoGoods = TaoBaoUtil.convert(commonGoods); |
| | | } catch (Exception e1) { |
| | | CommonGoods commonGoods = commonGoodsService.getCommonGoodsByGoodsIdAndGoodsType( |
| | | taoBaoOrder.getAuctionId(), Constant.SOURCE_TYPE_TAOBAO); |
| | | if (commonGoods != null) |
| | | taoBaoGoods = TaoBaoUtil.convert(commonGoods); |
| | | } |
| | | } |
| | | } |
| | | if (taoBaoGoods != null) { |
| | |
| | | newCommonOrder.setUserInfo(new UserInfo(uid)); |
| | | commonOrderList.add(addCommonOrder(newCommonOrder)); |
| | | } |
| | | addConfirmMQMsg(commonOrderList); |
| | | return commonOrderList; |
| | | } |
| | | |
| | |
| | | newCommonOrder.setUserInfo(new UserInfo(uid)); |
| | | commonOrderList.add(addCommonOrder(newCommonOrder)); |
| | | } |
| | | addConfirmMQMsg(commonOrderList); |
| | | return commonOrderList; |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | |
| | | // 2.1显示返利说明连接> |
| | | // 2.1显示返利说明连接> 未失效-自购-分享 |
| | | if (VersionUtil.greaterThan_2_1(acceptData.getPlatform(), acceptData.getVersion())) { |
| | | if (CommonOrder.STATE_SX != orderState && thirdCreateTime.getTime() > TimeUtil.convertDateToTemp(Constant.ORDER_SHOW_BRACE_TIME)) { |
| | | if (CommonOrder.STATE_SX != orderState && thirdCreateTime.getTime() > TimeUtil.convertDateToTemp(Constant.ORDER_SHOW_BRACE_TIME) |
| | | && ((HongBaoV2.TYPE_ZIGOU == hongBaoType || 2 == hongBaoType) || HongBaoV2.TYPE_SHARE_GOODS == hongBaoType) ) { |
| | | String rebateLink = configService.get(ConfigKeyEnum.orderRebateDescLink.getKey()); |
| | | order.setRebateLink(rebateLink + "?orderNo=" + orderNo +"&sourceType=" + sourceType); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | BigDecimal hongBao = order.getHongBao(); |
| | | if (hongBao == null) { |