|
@@ -6,6 +6,7 @@ import com.google.common.collect.Lists; |
|
@@ -6,6 +6,7 @@ import com.google.common.collect.Lists; |
6
|
import com.yohobuy.ufo.model.ProductInfo;
|
6
|
import com.yohobuy.ufo.model.ProductInfo;
|
7
|
import com.yohobuy.ufo.model.enums.StorageCheckEnum;
|
7
|
import com.yohobuy.ufo.model.enums.StorageCheckEnum;
|
8
|
import com.yohobuy.ufo.model.order.bo.SellerBo;
|
8
|
import com.yohobuy.ufo.model.order.bo.SellerBo;
|
|
|
9
|
+import com.yohobuy.ufo.model.order.common.OrderAttributes;
|
9
|
import com.yohobuy.ufo.model.order.common.OrderStatus;
|
10
|
import com.yohobuy.ufo.model.order.common.OrderStatus;
|
10
|
import com.yohobuy.ufo.model.order.common.SellerFuncEnum;
|
11
|
import com.yohobuy.ufo.model.order.common.SellerFuncEnum;
|
11
|
import com.yohobuy.ufo.model.order.common.SkupStatus;
|
12
|
import com.yohobuy.ufo.model.order.common.SkupStatus;
|
|
@@ -13,6 +14,8 @@ import com.yohobuy.ufo.model.order.constants.SkupType; |
|
@@ -13,6 +14,8 @@ import com.yohobuy.ufo.model.order.constants.SkupType; |
13
|
import com.yohobuy.ufo.model.order.req.*;
|
14
|
import com.yohobuy.ufo.model.order.req.*;
|
14
|
import com.yohobuy.ufo.model.order.resp.*;
|
15
|
import com.yohobuy.ufo.model.order.resp.*;
|
15
|
import com.yohobuy.ufo.model.order.vo.AddressInfo;
|
16
|
import com.yohobuy.ufo.model.order.vo.AddressInfo;
|
|
|
17
|
+import com.yohobuy.ufo.model.order.vo.OrderGoodsInfo;
|
|
|
18
|
+import com.yohobuy.ufo.model.order.vo.OrderGoodsListVo;
|
16
|
import com.yohobuy.ufo.model.request.product.ProductImportTranItemBo;
|
19
|
import com.yohobuy.ufo.model.request.product.ProductImportTranItemBo;
|
17
|
import com.yohobuy.ufo.model.request.product.ProductRequestBo;
|
20
|
import com.yohobuy.ufo.model.request.product.ProductRequestBo;
|
18
|
import com.yohobuy.ufo.model.response.ProductDetailResp;
|
21
|
import com.yohobuy.ufo.model.response.ProductDetailResp;
|
|
@@ -25,6 +28,7 @@ import com.yohoufo.dal.order.model.*; |
|
@@ -25,6 +28,7 @@ import com.yohoufo.dal.order.model.*; |
25
|
import com.yohoufo.order.common.BillTradeStatus;
|
28
|
import com.yohoufo.order.common.BillTradeStatus;
|
26
|
import com.yohoufo.order.common.TradeType;
|
29
|
import com.yohoufo.order.common.TradeType;
|
27
|
import com.yohoufo.order.model.dto.*;
|
30
|
import com.yohoufo.order.model.dto.*;
|
|
|
31
|
+import com.yohoufo.order.model.request.OrderListRequest;
|
28
|
import com.yohoufo.order.service.IErpFastDeliveryService;
|
32
|
import com.yohoufo.order.service.IErpFastDeliveryService;
|
29
|
import com.yohoufo.order.service.handler.SellerDecrPriceTaskHandler;
|
33
|
import com.yohoufo.order.service.handler.SellerDecrPriceTaskHandler;
|
30
|
import com.yohoufo.order.service.handler.SellerDownShelfTaskHandler;
|
34
|
import com.yohoufo.order.service.handler.SellerDownShelfTaskHandler;
|
|
@@ -44,6 +48,7 @@ import org.apache.commons.collections.CollectionUtils; |
|
@@ -44,6 +48,7 @@ import org.apache.commons.collections.CollectionUtils; |
44
|
import org.apache.commons.lang.StringUtils;
|
48
|
import org.apache.commons.lang.StringUtils;
|
45
|
import org.slf4j.Logger;
|
49
|
import org.slf4j.Logger;
|
46
|
import org.slf4j.LoggerFactory;
|
50
|
import org.slf4j.LoggerFactory;
|
|
|
51
|
+import org.springframework.beans.BeanUtils;
|
47
|
import org.springframework.beans.factory.annotation.Autowired;
|
52
|
import org.springframework.beans.factory.annotation.Autowired;
|
48
|
import org.springframework.stereotype.Service;
|
53
|
import org.springframework.stereotype.Service;
|
49
|
|
54
|
|
|
@@ -93,8 +98,6 @@ public class ErpFastDeliveryServiceImpl implements IErpFastDeliveryService { |
|
@@ -93,8 +98,6 @@ public class ErpFastDeliveryServiceImpl implements IErpFastDeliveryService { |
93
|
@Autowired
|
98
|
@Autowired
|
94
|
PriceComputePrepareProcessor priceComputePrepareProcessor;
|
99
|
PriceComputePrepareProcessor priceComputePrepareProcessor;
|
95
|
|
100
|
|
96
|
- @Autowired
|
|
|
97
|
- private SellerOrderGoodsMapper sellerOrderGoodsMapper;
|
|
|
98
|
|
101
|
|
99
|
@Autowired
|
102
|
@Autowired
|
100
|
private BuyerOrderMapper buyerOrderMapper;
|
103
|
private BuyerOrderMapper buyerOrderMapper;
|
|
@@ -106,6 +109,9 @@ public class ErpFastDeliveryServiceImpl implements IErpFastDeliveryService { |
|
@@ -106,6 +109,9 @@ public class ErpFastDeliveryServiceImpl implements IErpFastDeliveryService { |
106
|
private OrdersPayTransferMapper ordersPayTransferMapper;
|
109
|
private OrdersPayTransferMapper ordersPayTransferMapper;
|
107
|
|
110
|
|
108
|
@Autowired
|
111
|
@Autowired
|
|
|
112
|
+ SellerOrderGoodsMapper sellerOrderGoodsMapper;
|
|
|
113
|
+
|
|
|
114
|
+ @Autowired
|
109
|
private TradeBillsMapper tradeBillsMapper;
|
115
|
private TradeBillsMapper tradeBillsMapper;
|
110
|
|
116
|
|
111
|
private static final String ADDRESS_STR = "{\"address\":\"松金公路2758号sneakerburger仓储中心\",\"address_id\":17560803,\"area\":\"上海 金山区 张堰镇\",\"areaCode\":\"310116103\",\"consignee\":\"阿津\",\"isUpdate\":\"N\",\"mobile\":\"18121153590\",\"phone\":\"\",\"zipCode\":\"\"}";
|
117
|
private static final String ADDRESS_STR = "{\"address\":\"松金公路2758号sneakerburger仓储中心\",\"address_id\":17560803,\"area\":\"上海 金山区 张堰镇\",\"areaCode\":\"310116103\",\"consignee\":\"阿津\",\"isUpdate\":\"N\",\"mobile\":\"18121153590\",\"phone\":\"\",\"zipCode\":\"\"}";
|
|
@@ -136,6 +142,51 @@ public class ErpFastDeliveryServiceImpl implements IErpFastDeliveryService { |
|
@@ -136,6 +142,51 @@ public class ErpFastDeliveryServiceImpl implements IErpFastDeliveryService { |
136
|
|
142
|
|
137
|
|
143
|
|
138
|
/**
|
144
|
/**
|
|
|
145
|
+ * 查询极速商品
|
|
|
146
|
+ * @param request
|
|
|
147
|
+ * @return
|
|
|
148
|
+ */
|
|
|
149
|
+ public OrderGoodsListVo getOrderGoodsList(FastDeliveryGetShelfReq request){
|
|
|
150
|
+
|
|
|
151
|
+ if (request.getUid() < 0){
|
|
|
152
|
+ logger.warn("uid is empty");
|
|
|
153
|
+ throw new UfoServiceException(400, "参数[uid]不合法");
|
|
|
154
|
+ }
|
|
|
155
|
+
|
|
|
156
|
+ checkFastDeliveryAuth(request.getUid());
|
|
|
157
|
+
|
|
|
158
|
+ request.setPage(request.getPage()<=0?1:request.getPage());
|
|
|
159
|
+ request.setLimit(request.getLimit()<=0?10:request.getLimit());
|
|
|
160
|
+
|
|
|
161
|
+ int attr = OrderAttributes.FAST_DELIVERY.getCode();
|
|
|
162
|
+ int total = sellerOrderGoodsMapper.selectCntByUidAndAttr(request.getUid(), attr);
|
|
|
163
|
+
|
|
|
164
|
+ if (total == 0){
|
|
|
165
|
+ return null;
|
|
|
166
|
+ }
|
|
|
167
|
+
|
|
|
168
|
+ int offset = (request.getPage() - 1) * request.getLimit();
|
|
|
169
|
+ List<SellerOrderGoods> sellerOrderGoods = sellerOrderGoodsMapper.selectByUidAndAttr(request.getUid(), attr, offset, request.getLimit());
|
|
|
170
|
+
|
|
|
171
|
+ List<OrderGoodsInfo> goodsInfoList = sellerOrderGoods.stream().map(this::covertTo).collect(Collectors.toList());
|
|
|
172
|
+
|
|
|
173
|
+ return OrderGoodsListVo.builder()
|
|
|
174
|
+ .page(request.getPage())
|
|
|
175
|
+ .pageSize(request.getLimit())
|
|
|
176
|
+ .pagetotal(total)
|
|
|
177
|
+ .goodsInfoList(goodsInfoList)
|
|
|
178
|
+ .build();
|
|
|
179
|
+
|
|
|
180
|
+ }
|
|
|
181
|
+
|
|
|
182
|
+ public OrderGoodsInfo covertTo(SellerOrderGoods sellerOrderGoods){
|
|
|
183
|
+
|
|
|
184
|
+ OrderGoodsInfo orderGoodsInfo = new OrderGoodsInfo();
|
|
|
185
|
+ BeanUtils.copyProperties(sellerOrderGoods, orderGoodsInfo);
|
|
|
186
|
+ orderGoodsInfo.setStatusDesc(SkupStatus.getSkupStatus(orderGoodsInfo.getStatus()).getDesc());
|
|
|
187
|
+ return orderGoodsInfo;
|
|
|
188
|
+ }
|
|
|
189
|
+ /**
|
139
|
* 查询上架商品的信息
|
190
|
* 查询上架商品的信息
|
140
|
* @param req
|
191
|
* @param req
|
141
|
*/
|
192
|
*/
|