|
|
package com.yohoufo.order.service.seller.deposit;
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.yohobuy.ufo.model.order.bo.TimeoutBo;
|
|
|
import com.yohobuy.ufo.model.order.common.AppraiseOrderStatus;
|
|
|
import com.yohobuy.ufo.model.order.common.OrderAttributes;
|
|
|
import com.yohobuy.ufo.model.order.common.TabType;
|
|
|
import com.yohobuy.ufo.model.order.constants.SellerDepositOrderListType;
|
|
|
import com.yohobuy.ufo.model.order.constants.SkupType;
|
|
|
import com.yohobuy.ufo.model.order.req.SellerDepositOrderListReq;
|
|
|
import com.yohobuy.ufo.model.order.req.SellerDepositOrderPrdListReq;
|
|
|
import com.yohobuy.ufo.model.order.resp.DepositOrderInStorePrdListResp;
|
...
|
...
|
@@ -25,6 +28,7 @@ import com.yohoufo.order.constants.MetaKey; |
|
|
import com.yohoufo.order.convert.ProductConvertor;
|
|
|
import com.yohoufo.order.convert.SellerOrderConvertor;
|
|
|
import com.yohoufo.order.model.dto.SellerOrderComputeResult;
|
|
|
import com.yohoufo.order.service.impl.AbsOrderViewService;
|
|
|
import com.yohoufo.order.utils.LoggerUtils;
|
|
|
import lombok.Builder;
|
|
|
import org.slf4j.Logger;
|
...
|
...
|
@@ -37,7 +41,7 @@ import java.util.function.Function; |
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
@Service
|
|
|
public class SellerDepositOrderListService {
|
|
|
public class SellerDepositOrderListService extends AbsOrderViewService {
|
|
|
private final Logger logger = LoggerUtils.getSellerOrderLogger();
|
|
|
|
|
|
@Autowired
|
...
|
...
|
@@ -118,12 +122,16 @@ public class SellerDepositOrderListService { |
|
|
.imgUrl(ImageUrlAssist.getAllProductPicUrl(paog.getImageUrl(), "goodsimg", "center", "d2hpdGU="))
|
|
|
.build())
|
|
|
.collect(Collectors.toCollection(()->new ArrayList<>(aogList.size())));
|
|
|
|
|
|
TimeoutBo timeout = calTimeout(TabType.BUY, uid, orderCode, pao.getStatus(),
|
|
|
pao.getCreateTime(), oa);
|
|
|
return SellerDepositOrderListResp.builder()
|
|
|
.uid(uid)
|
|
|
.orderCode(orderCode)
|
|
|
.earnestMoney(BigDecimalHelper.formatNumber(pao.getAmount(), BigDecimalHelper.FORMAT_TWOBITAFTERPOINT))
|
|
|
.status(status)
|
|
|
.statuStr(appraiseOrderStatus.statusStr(oa))
|
|
|
.timeout(timeout)
|
|
|
.buttons(appraiseOrderStatus.listButtons(oa))
|
|
|
.productList(productList)
|
|
|
.build();
|
...
|
...
|
@@ -268,6 +276,16 @@ public class SellerDepositOrderListService { |
|
|
.collect(Collectors.toCollection(()->new ArrayList<>(paogs.size())));
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public Logger getLogger() {
|
|
|
return logger;
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
protected String buildOrderTypeTag(Integer orderAttr, SkupType skupType) {
|
|
|
return null;
|
|
|
}
|
|
|
|
|
|
@Builder
|
|
|
static class OrderDataNode{
|
|
|
int sknNum;
|
...
|
...
|
|