|
|
package com.yohoufo.order.service.impl;
|
|
|
|
|
|
import com.google.common.collect.Lists;
|
|
|
import com.google.common.collect.Maps;
|
|
|
import com.yoho.error.ServiceError;
|
|
|
import com.yoho.error.exception.ServiceException;
|
...
|
...
|
@@ -17,7 +16,10 @@ import com.yohoufo.dal.order.BuyerOrderGoodsMapper; |
|
|
import com.yohoufo.dal.order.BuyerOrderMapper;
|
|
|
import com.yohoufo.dal.order.SellerOrderGoodsMapper;
|
|
|
import com.yohoufo.dal.order.SellerOrderMapper;
|
|
|
import com.yohoufo.dal.order.model.*;
|
|
|
import com.yohoufo.dal.order.model.BuyerOrder;
|
|
|
import com.yohoufo.dal.order.model.BuyerOrderGoods;
|
|
|
import com.yohoufo.dal.order.model.SellerOrder;
|
|
|
import com.yohoufo.dal.order.model.SellerOrderGoods;
|
|
|
import com.yohoufo.order.constants.ViewType;
|
|
|
import com.yohoufo.order.model.request.OrderListRequest;
|
|
|
import com.yohoufo.order.service.IOrderListService;
|
...
|
...
|
@@ -30,6 +32,7 @@ import com.yohoufo.order.service.support.codegenerator.bean.CodeMeta; |
|
|
import com.yohoufo.order.service.wrapper.SellerOrderTimeoutWrapper;
|
|
|
import com.yohoufo.order.utils.LoggerUtils;
|
|
|
import com.yohoufo.order.utils.OrderAssist;
|
|
|
import com.yohoufo.order.utils.SellerGoodsHelper;
|
|
|
import com.yohoufo.order.utils.TimeUtils;
|
|
|
import org.apache.commons.collections.CollectionUtils;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
...
|
...
|
@@ -300,9 +303,10 @@ public class SellerOrderListService extends AbsOrderListService implements IOrde |
|
|
orderListInfo.setEarnestMoney(sellerOrder.getEarnestMoney());
|
|
|
|
|
|
//
|
|
|
|
|
|
GoodsInfo goodsInfo = new GoodsInfo();
|
|
|
goodsInfo.setColorName(sellerOrderGoods.getColorName());
|
|
|
goodsInfo.setProductName(sellerOrderGoods.getProductName());
|
|
|
goodsInfo.setProductName(SellerGoodsHelper.addFlag2GoodsNameHead(sellerOrderGoods.getProductName(), skupType));
|
|
|
goodsInfo.setGoodImg(ImageUrlAssist.getAllProductPicUrl(sellerOrderGoods.getImageUrl(), "goodsimg", "center", "d2hpdGU="));
|
|
|
goodsInfo.setSizeName(sellerOrderGoods.getSizeName());
|
|
|
goodsInfo.setProductId(sellerOrderGoods.getProductId());
|
...
|
...
|
@@ -344,41 +348,6 @@ public class SellerOrderListService extends AbsOrderListService implements IOrde |
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
OrderListInfo convertOrderInfo(SellerOrderInfo sellerOrderInfo, Map<Integer, Long> buyerOrderMap) {
|
|
|
|
|
|
OrderListInfo orderListInfo = new OrderListInfo();
|
|
|
orderListInfo.setUid(sellerOrderInfo.getUid());
|
|
|
orderListInfo.setOrderCode(sellerOrderInfo.getOrderCode());
|
|
|
orderListInfo.setRealPrice(sellerOrderInfo.getGoodsPrice().toPlainString());
|
|
|
|
|
|
// 订单中状态显示
|
|
|
SkupStatus skupStatus = SkupStatus.getSkupStatus(sellerOrderInfo.getStatus().intValue());
|
|
|
if (skupStatus != null){
|
|
|
orderListInfo.setStatus(skupStatus.getCode());
|
|
|
orderListInfo.setStatuStr(skupStatus.getDesc());
|
|
|
}
|
|
|
|
|
|
orderListInfo.setSkup(sellerOrderInfo.getSkup());
|
|
|
|
|
|
GoodsInfo goodsInfo = new GoodsInfo();
|
|
|
goodsInfo.setColorName(sellerOrderInfo.getColorName());
|
|
|
goodsInfo.setProductName(sellerOrderInfo.getProductName());
|
|
|
goodsInfo.setGoodImg(ImageUrlAssist.getAllProductPicUrl(sellerOrderInfo.getImageUrl(), "goodsimg", "center", "d2hpdGU="));
|
|
|
goodsInfo.setSizeName(sellerOrderInfo.getSizeName());
|
|
|
goodsInfo.setProductId(sellerOrderInfo.getProductId());
|
|
|
goodsInfo.setGoodPrice(sellerOrderInfo.getGoodsPrice().toPlainString());
|
|
|
orderListInfo.setGoodsInfo(goodsInfo);
|
|
|
|
|
|
orderListInfo.setCreateTime(DateUtil.formatDate(sellerOrderInfo.getCreateTime(), DateUtil.yyyy_MM_dd_HH_mm_SS));
|
|
|
|
|
|
// 查询skup的买家订单号
|
|
|
orderListInfo.setBuyerOrderCode(buyerOrderMap.get(sellerOrderInfo.getSkup()));
|
|
|
|
|
|
return orderListInfo;
|
|
|
}
|
|
|
|
|
|
|
|
|
@Override
|
|
|
protected List<Integer> initOrderListRequest(OrderListRequest request) {
|
|
|
if (request.getUid() < 0){
|
...
|
...
|
|