1
|
package com.yohoufo.order.service.seller.deposit;
|
1
|
package com.yohoufo.order.service.seller.deposit;
|
2
|
|
2
|
|
3
|
import com.alibaba.fastjson.JSONObject;
|
3
|
import com.alibaba.fastjson.JSONObject;
|
|
|
4
|
+import com.yohobuy.ufo.model.order.bo.TimeoutBo;
|
4
|
import com.yohobuy.ufo.model.order.common.AppraiseOrderStatus;
|
5
|
import com.yohobuy.ufo.model.order.common.AppraiseOrderStatus;
|
5
|
import com.yohobuy.ufo.model.order.common.OrderAttributes;
|
6
|
import com.yohobuy.ufo.model.order.common.OrderAttributes;
|
|
|
7
|
+import com.yohobuy.ufo.model.order.common.TabType;
|
6
|
import com.yohobuy.ufo.model.order.constants.SellerDepositOrderListType;
|
8
|
import com.yohobuy.ufo.model.order.constants.SellerDepositOrderListType;
|
|
|
9
|
+import com.yohobuy.ufo.model.order.constants.SkupType;
|
7
|
import com.yohobuy.ufo.model.order.req.SellerDepositOrderListReq;
|
10
|
import com.yohobuy.ufo.model.order.req.SellerDepositOrderListReq;
|
8
|
import com.yohobuy.ufo.model.order.req.SellerDepositOrderPrdListReq;
|
11
|
import com.yohobuy.ufo.model.order.req.SellerDepositOrderPrdListReq;
|
9
|
import com.yohobuy.ufo.model.order.resp.DepositOrderInStorePrdListResp;
|
12
|
import com.yohobuy.ufo.model.order.resp.DepositOrderInStorePrdListResp;
|
|
@@ -25,6 +28,7 @@ import com.yohoufo.order.constants.MetaKey; |
|
@@ -25,6 +28,7 @@ import com.yohoufo.order.constants.MetaKey; |
25
|
import com.yohoufo.order.convert.ProductConvertor;
|
28
|
import com.yohoufo.order.convert.ProductConvertor;
|
26
|
import com.yohoufo.order.convert.SellerOrderConvertor;
|
29
|
import com.yohoufo.order.convert.SellerOrderConvertor;
|
27
|
import com.yohoufo.order.model.dto.SellerOrderComputeResult;
|
30
|
import com.yohoufo.order.model.dto.SellerOrderComputeResult;
|
|
|
31
|
+import com.yohoufo.order.service.impl.AbsOrderViewService;
|
28
|
import com.yohoufo.order.utils.LoggerUtils;
|
32
|
import com.yohoufo.order.utils.LoggerUtils;
|
29
|
import lombok.Builder;
|
33
|
import lombok.Builder;
|
30
|
import org.slf4j.Logger;
|
34
|
import org.slf4j.Logger;
|
|
@@ -37,7 +41,7 @@ import java.util.function.Function; |
|
@@ -37,7 +41,7 @@ import java.util.function.Function; |
37
|
import java.util.stream.Collectors;
|
41
|
import java.util.stream.Collectors;
|
38
|
|
42
|
|
39
|
@Service
|
43
|
@Service
|
40
|
-public class SellerDepositOrderListService {
|
44
|
+public class SellerDepositOrderListService extends AbsOrderViewService {
|
41
|
private final Logger logger = LoggerUtils.getSellerOrderLogger();
|
45
|
private final Logger logger = LoggerUtils.getSellerOrderLogger();
|
42
|
|
46
|
|
43
|
@Autowired
|
47
|
@Autowired
|
|
@@ -118,12 +122,16 @@ public class SellerDepositOrderListService { |
|
@@ -118,12 +122,16 @@ public class SellerDepositOrderListService { |
118
|
.imgUrl(ImageUrlAssist.getAllProductPicUrl(paog.getImageUrl(), "goodsimg", "center", "d2hpdGU="))
|
122
|
.imgUrl(ImageUrlAssist.getAllProductPicUrl(paog.getImageUrl(), "goodsimg", "center", "d2hpdGU="))
|
119
|
.build())
|
123
|
.build())
|
120
|
.collect(Collectors.toCollection(()->new ArrayList<>(aogList.size())));
|
124
|
.collect(Collectors.toCollection(()->new ArrayList<>(aogList.size())));
|
|
|
125
|
+
|
|
|
126
|
+ TimeoutBo timeout = calTimeout(TabType.BUY, uid, orderCode, pao.getStatus(),
|
|
|
127
|
+ pao.getCreateTime(), oa);
|
121
|
return SellerDepositOrderListResp.builder()
|
128
|
return SellerDepositOrderListResp.builder()
|
122
|
.uid(uid)
|
129
|
.uid(uid)
|
123
|
.orderCode(orderCode)
|
130
|
.orderCode(orderCode)
|
124
|
.earnestMoney(BigDecimalHelper.formatNumber(pao.getAmount(), BigDecimalHelper.FORMAT_TWOBITAFTERPOINT))
|
131
|
.earnestMoney(BigDecimalHelper.formatNumber(pao.getAmount(), BigDecimalHelper.FORMAT_TWOBITAFTERPOINT))
|
125
|
.status(status)
|
132
|
.status(status)
|
126
|
.statuStr(appraiseOrderStatus.statusStr(oa))
|
133
|
.statuStr(appraiseOrderStatus.statusStr(oa))
|
|
|
134
|
+ .timeout(timeout)
|
127
|
.buttons(appraiseOrderStatus.listButtons(oa))
|
135
|
.buttons(appraiseOrderStatus.listButtons(oa))
|
128
|
.productList(productList)
|
136
|
.productList(productList)
|
129
|
.build();
|
137
|
.build();
|
|
@@ -268,6 +276,16 @@ public class SellerDepositOrderListService { |
|
@@ -268,6 +276,16 @@ public class SellerDepositOrderListService { |
268
|
.collect(Collectors.toCollection(()->new ArrayList<>(paogs.size())));
|
276
|
.collect(Collectors.toCollection(()->new ArrayList<>(paogs.size())));
|
269
|
}
|
277
|
}
|
270
|
|
278
|
|
|
|
279
|
+ @Override
|
|
|
280
|
+ public Logger getLogger() {
|
|
|
281
|
+ return logger;
|
|
|
282
|
+ }
|
|
|
283
|
+
|
|
|
284
|
+ @Override
|
|
|
285
|
+ protected String buildOrderTypeTag(Integer orderAttr, SkupType skupType) {
|
|
|
286
|
+ return null;
|
|
|
287
|
+ }
|
|
|
288
|
+
|
271
|
@Builder
|
289
|
@Builder
|
272
|
static class OrderDataNode{
|
290
|
static class OrderDataNode{
|
273
|
int sknNum;
|
291
|
int sknNum;
|