...
|
...
|
@@ -23,6 +23,7 @@ import com.yohoufo.order.model.request.OrderListRequest; |
|
|
import com.yohoufo.order.service.IOrderListService;
|
|
|
import com.yohoufo.order.service.cache.OrderCacheService;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.commons.collections.CollectionUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
...
|
...
|
@@ -63,8 +64,10 @@ public class SellerOrderListService extends AbsOrderListService implements IOrde |
|
|
.page(request.getPage())
|
|
|
.pageSize(orderListVo.getPageSize())
|
|
|
.total(orderListVo.getTotal())
|
|
|
.pagetotal(orderListVo.getPagetotal());;
|
|
|
return respBuilder.data(orderListVo.getOrderList()).build();
|
|
|
.pagetotal(orderListVo.getPagetotal());
|
|
|
List<OrderListInfo> oliList = orderListVo.getOrderList();
|
|
|
resetDynamicProporties(oliList);
|
|
|
return respBuilder.data(oliList).build();
|
|
|
}
|
|
|
PageResp orderListInfoRsp;
|
|
|
int type;
|
...
|
...
|
@@ -117,6 +120,17 @@ public class SellerOrderListService extends AbsOrderListService implements IOrde |
|
|
return orderListInfoRsp;
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
protected void resetDynamicProporties(List<OrderListInfo> list) {
|
|
|
if(CollectionUtils.isNotEmpty(list)){
|
|
|
list.forEach(oli -> {
|
|
|
if (oli.getStatus() == SkupStatus.CAN_NOT_SELL.getCode()){
|
|
|
oli.setLeftTime(calLeftTime(oli.getSecendLevelCreateTime()));
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
|
|
|
OrderListInfo buildOrderListInfo(SellerOrderGoods sellerOrderGoods,
|
|
|
SellerOrder sellerOrder) {
|
|
|
|
...
|
...
|
@@ -124,18 +138,17 @@ public class SellerOrderListService extends AbsOrderListService implements IOrde |
|
|
orderListInfo.setUid(sellerOrder.getUid());
|
|
|
orderListInfo.setOrderCode(sellerOrder.getOrderCode());
|
|
|
orderListInfo.setRealPrice(sellerOrderGoods.getGoodsPrice().toPlainString());
|
|
|
// 订单中状态显示
|
|
|
orderListInfo.setStatus(sellerOrder.getStatus() == null ? -1 : sellerOrder.getStatus());
|
|
|
|
|
|
SellerOrderStatus sellerOrderStatus = SellerOrderStatus.getSellerOrderStatus(orderListInfo.getStatus());
|
|
|
SkupStatus skupStatus = sellerOrderStatus.getSkupStatus();
|
|
|
|
|
|
SellerOrderStatus sellerOrderStatus = SellerOrderStatus.getSellerOrderStatus(sellerOrder.getStatus());
|
|
|
SkupStatus skupStatus = sellerOrderStatus.getSkupStatus();
|
|
|
if (skupStatus == null){
|
|
|
log.warn("get seller Order List skupStatus not exist, uid is {}, orderCode is {}, status is {}",
|
|
|
sellerOrder.getUid(), orderListInfo.getOrderCode(), sellerOrder.getStatus());
|
|
|
return null;
|
|
|
}
|
|
|
|
|
|
// 订单中状态显示
|
|
|
orderListInfo.setStatus(skupStatus.getCode());
|
|
|
orderListInfo.setStatuStr(skupStatus.getDesc());
|
|
|
|
|
|
// 按钮显示
|
...
|
...
|
@@ -157,7 +170,7 @@ public class SellerOrderListService extends AbsOrderListService implements IOrde |
|
|
goodsInfo.setGoodPrice(sellerOrderGoods.getGoodsPrice().toPlainString());
|
|
|
goodsInfo.setStorageId(sellerOrderGoods.getStorageId());
|
|
|
orderListInfo.setGoodsInfo(goodsInfo);
|
|
|
|
|
|
orderListInfo.setSecendLevelCreateTime(sellerOrder.getCreateTime());
|
|
|
orderListInfo.setCreateTime(DateUtil.formatDate(sellerOrder.getCreateTime(), DateUtil.yyyy_MM_dd_HH_mm_SS));
|
|
|
return orderListInfo;
|
|
|
}
|
...
|
...
|
|