yujian
2019-01-10 46bc8fdcbd6af5328490bed36272586a37b6237f
fanli/src/main/java/com/yeshi/fanli/service/impl/order/CommonOrderServiceImpl.java
@@ -13,6 +13,7 @@
import org.apache.commons.beanutils.PropertyUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.yeshi.utils.taobao.TbImgUtil;
import com.yeshi.fanli.dao.mybatis.order.CommonOrderGoodsMapper;
import com.yeshi.fanli.dao.mybatis.order.CommonOrderMapper;
@@ -29,6 +30,7 @@
import com.yeshi.fanli.service.inter.order.CommonOrderService;
import com.yeshi.fanli.util.Constant;
import com.yeshi.fanli.util.MoneyBigDecimalUtil;
import com.yeshi.fanli.util.StringUtil;
import com.yeshi.fanli.util.factory.CommonOrderGoodsFactory;
import com.yeshi.fanli.util.taobao.TaoBaoOrderUtil;
import com.yeshi.fanli.util.taobao.TaoKeApiUtil;
@@ -81,14 +83,14 @@
   public List<CommonOrderVO> listGroupOrderNoByUid(long start, int count, Long uid, Integer state, Integer type,
         Integer orderState, String orderNo, String startTime, String endTime, Integer dateType)
         throws CommonOrderException {
      return commonOrderMapper.listGroupOrderNoByUid(start, count, uid, state, type, orderState, orderNo, startTime,
      return commonOrderMapper.listUserOrder(start, count, uid, state, type, orderState, orderNo, startTime,
            endTime, dateType);
   }
   @Override
   public long countGroupOrderNoByUid(Long uid, Integer state, Integer type, Integer orderState, String orderNo,
         String startTime, String endTime, Integer dateType) throws CommonOrderException {
      return commonOrderMapper.countGroupOrderNoByUid(uid, state, type, orderState, orderNo, startTime, endTime,
      return commonOrderMapper.countUserOrder(uid, state, type, orderState, orderNo, startTime, endTime,
            dateType);
   }
@@ -108,7 +110,7 @@
      }
      // 商品信息
      List<CommonOrderVO> listGoods = commonOrderMapper.listByOrderNoAndType(listOrder);
      List<CommonOrderVO> listGoods = commonOrderMapper.listOrderGoodsInfo(listOrder);
      // 订单商品为空
      if (listGoods == null || listGoods.size() == 0) {
         return listOrder;
@@ -121,18 +123,18 @@
   }
   @Override
   public Map<String, BigDecimal> countOrderByHongBaoType(Long uid, Integer day) {
      return commonOrderMapper.countOrderByHongBaoType(uid, day);
   public Map<String, BigDecimal> countHistoryOrder(Long uid, Integer day) {
      return commonOrderMapper.countHistoryOrder(uid, day);
   }
   @Override
   public long countOrder(Long uid, Integer type, Integer day) {
      return commonOrderMapper.countBonusOrder(uid, type, day);
   public long countBonusOrderNumber(Long uid, Integer type, Integer day, String startTime, String endTime) {
      return commonOrderMapper.countBonusOrderNumber(uid, type, day, startTime, endTime);
   }
   @Override
   public BigDecimal countOrderMoney(Long uid, Integer type, Integer day) {
      return commonOrderMapper.countBonusOrderMoney(uid, type, day);
   public BigDecimal countBonusOrderMoney(Long uid, Integer type, Integer day, String startTime, String endTime) {
      return commonOrderMapper.countBonusOrderMoney(uid, type, day, startTime, endTime);
   }
   @Override
@@ -170,6 +172,11 @@
                  e.printStackTrace();
               }
               String picture = commonGoodsVO.getPicture();
               if (!StringUtil.isNullOrEmpty(picture) && !picture.contains("320x320")) {
                  commonGoodsVO.setPicture(TbImgUtil.getTBSize320Img(picture));
               }
               Integer hongBaoType = order.getHongBaoType();
               // 邀请订单信息保护
               if (HongBaoV2.TYPE_YAOQING == hongBaoType || HongBaoV2.TYPE_YIJI == hongBaoType
@@ -427,11 +434,6 @@
      return commonOrderList;
   }
   @Override
   public Map<String, Object> countMoneyGroupOrderNoByUid(Long uid, Integer type, String orderNo, String startTime,
         String endTime, Integer day) {
      return commonOrderMapper.countMoneyGroupOrderNoByUid(uid, type, orderNo, startTime, endTime, day);
   }
   @Override
   public long countByUidAndOrderStateWithOrderBalanceTime(Long uid, int state, Date minDate, Date maxDate) {