admin
2020-01-18 43a00f6b852dcf91cf51fb8f1a5c1386ee437a35
fanli/src/main/java/com/yeshi/fanli/service/impl/order/CommonOrderServiceImpl.java
@@ -45,6 +45,8 @@
import com.yeshi.fanli.exception.order.CommonOrderException;
import com.yeshi.fanli.exception.taobao.TaobaoGoodsDownException;
import com.yeshi.fanli.log.LogHelper;
import com.yeshi.fanli.log.LogManager;
import com.yeshi.fanli.log.LogType;
import com.yeshi.fanli.service.inter.common.JumpDetailV2Service;
import com.yeshi.fanli.service.inter.config.ConfigService;
import com.yeshi.fanli.service.inter.config.SystemCouponService;
@@ -187,12 +189,12 @@
   @Override
   public List<CommonOrderVO> getOrderByUid(AcceptData acceptData, Integer page, Long uid, Integer state, Integer type,
         Integer orderState, String orderNo, String startTime, String endTime, Integer dateType, List<Integer> listSource)
         throws CommonOrderException, Exception {
         Integer orderState, String orderNo, String startTime, String endTime, Integer dateType,
         List<Integer> listSource) throws CommonOrderException, Exception {
      int pageSize = Constant.PAGE_SIZE;
      List<CommonOrderVO> listOrder = commonOrderMapper.listUserOrder((page - 1) * pageSize, pageSize, uid, state, type,
            orderState, orderNo, startTime, endTime,   dateType, listSource);
      List<CommonOrderVO> listOrder = commonOrderMapper.listUserOrder((page - 1) * pageSize, pageSize, uid, state,
            type, orderState, orderNo, startTime, endTime, dateType, listSource);
      // 订单信息为空
      if (listOrder == null || listOrder.size() == 0) {
@@ -914,11 +916,15 @@
            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(), "");
               try {
                  taoBaoGoods = TaoBaoUtil.getSimpleGoodsBrief(taoBaoOrder.getAuctionId());
                  // 记录商品分类
               } catch (Exception e1) {
                  CommonGoods commonGoods = commonGoodsService.getCommonGoodsByGoodsIdAndGoodsType(
                        taoBaoOrder.getAuctionId(), Constant.SOURCE_TYPE_TAOBAO);
@@ -1661,7 +1667,6 @@
      return commonOrderMapper.count24HValidOrderByUid(uid, minTime);
   }
   
   @Override
   public long countSearchOrderByUid(Long uid, List<ESOrder> list) {
      return commonOrderMapper.countSearchOrderByUid(uid, list);
@@ -1690,7 +1695,6 @@
      return listVO;
   }
   
   /**
    * 订单信息加工
    * 
@@ -1699,7 +1703,8 @@
    * @param listGoods
    * @param uid
    */
   private void orderVOFactoryNew(List<CommonOrderVO> listOrder, List<CommonOrderVO> listGoods, Long uid) throws Exception {
   private void orderVOFactoryNew(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>();
@@ -1896,8 +1901,7 @@
                  orderStateContent = "售后成功";
                  WeiQuanInfo weiQuanInfo = new WeiQuanInfo();
                  weiQuanInfo.setOldHongBao("¥" + hongBao.setScale(2, BigDecimal.ROUND_DOWN).toString());
                  weiQuanInfo
                        .setWqHongBao("售后:-¥" + weiQuanMoney.setScale(2, BigDecimal.ROUND_DOWN).toString());
                  weiQuanInfo.setWqHongBao("售后:-¥" + weiQuanMoney.setScale(2, BigDecimal.ROUND_DOWN).toString());
                  hongBao = MoneyBigDecimalUtil.sub(hongBao, weiQuanMoney);
                  order.setWeiQuanInfo(weiQuanInfo);
               }
@@ -1941,8 +1945,8 @@
            signList.add(CommonOrder.TYPE_INVITE);
            // 超级会员补贴信息
            InviteOrderSubsidy orderSubsidy = inviteOrderSubsidyService.getByOrderNoAndType(uid,
                  order.getOrderNo(), sourceType);
            InviteOrderSubsidy orderSubsidy = inviteOrderSubsidyService.getByOrderNoAndType(uid, order.getOrderNo(),
                  sourceType);
            if (orderSubsidy != null) {
               ClientTextStyleVO subsidyInfo = new ClientTextStyleVO();
               subsidyInfo.setContent("(补贴¥" + orderSubsidy.getMoney() + ")");
@@ -2055,8 +2059,8 @@
    * @param list
    * @param signList
    */
   private void couponFactoryNew(CommonOrderVO order, boolean hasRewardCoupon, Integer hongBaoState, Integer hongBaoType,
         List<UserSystemCouponRecord> list, Long uid, boolean vip) throws Exception {
   private void couponFactoryNew(CommonOrderVO order, boolean hasRewardCoupon, Integer hongBaoState,
         Integer hongBaoType, List<UserSystemCouponRecord> list, Long uid, boolean vip) throws Exception {
      // 是否免单商品
      boolean freeOrder = false;
      // 是否奖励成功
@@ -2179,6 +2183,5 @@
         }
      }
   }
}