...
|
...
|
@@ -6,6 +6,7 @@ import com.google.common.collect.Lists; |
|
|
import com.yohobuy.ufo.model.ProductInfo;
|
|
|
import com.yohobuy.ufo.model.enums.StorageCheckEnum;
|
|
|
import com.yohobuy.ufo.model.order.bo.SellerBo;
|
|
|
import com.yohobuy.ufo.model.order.common.OrderAttributes;
|
|
|
import com.yohobuy.ufo.model.order.common.OrderStatus;
|
|
|
import com.yohobuy.ufo.model.order.common.SellerFuncEnum;
|
|
|
import com.yohobuy.ufo.model.order.common.SkupStatus;
|
...
|
...
|
@@ -13,6 +14,8 @@ import com.yohobuy.ufo.model.order.constants.SkupType; |
|
|
import com.yohobuy.ufo.model.order.req.*;
|
|
|
import com.yohobuy.ufo.model.order.resp.*;
|
|
|
import com.yohobuy.ufo.model.order.vo.AddressInfo;
|
|
|
import com.yohobuy.ufo.model.order.vo.OrderGoodsInfo;
|
|
|
import com.yohobuy.ufo.model.order.vo.OrderGoodsListVo;
|
|
|
import com.yohobuy.ufo.model.request.product.ProductImportTranItemBo;
|
|
|
import com.yohobuy.ufo.model.request.product.ProductRequestBo;
|
|
|
import com.yohobuy.ufo.model.response.ProductDetailResp;
|
...
|
...
|
@@ -25,6 +28,7 @@ import com.yohoufo.dal.order.model.*; |
|
|
import com.yohoufo.order.common.BillTradeStatus;
|
|
|
import com.yohoufo.order.common.TradeType;
|
|
|
import com.yohoufo.order.model.dto.*;
|
|
|
import com.yohoufo.order.model.request.OrderListRequest;
|
|
|
import com.yohoufo.order.service.IErpFastDeliveryService;
|
|
|
import com.yohoufo.order.service.handler.SellerDecrPriceTaskHandler;
|
|
|
import com.yohoufo.order.service.handler.SellerDownShelfTaskHandler;
|
...
|
...
|
@@ -44,6 +48,7 @@ import org.apache.commons.collections.CollectionUtils; |
|
|
import org.apache.commons.lang.StringUtils;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
...
|
...
|
@@ -93,8 +98,6 @@ public class ErpFastDeliveryServiceImpl implements IErpFastDeliveryService { |
|
|
@Autowired
|
|
|
PriceComputePrepareProcessor priceComputePrepareProcessor;
|
|
|
|
|
|
@Autowired
|
|
|
private SellerOrderGoodsMapper sellerOrderGoodsMapper;
|
|
|
|
|
|
@Autowired
|
|
|
private BuyerOrderMapper buyerOrderMapper;
|
...
|
...
|
@@ -106,6 +109,9 @@ public class ErpFastDeliveryServiceImpl implements IErpFastDeliveryService { |
|
|
private OrdersPayTransferMapper ordersPayTransferMapper;
|
|
|
|
|
|
@Autowired
|
|
|
SellerOrderGoodsMapper sellerOrderGoodsMapper;
|
|
|
|
|
|
@Autowired
|
|
|
private TradeBillsMapper tradeBillsMapper;
|
|
|
|
|
|
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 { |
|
|
|
|
|
|
|
|
/**
|
|
|
* 查询极速商品
|
|
|
* @param request
|
|
|
* @return
|
|
|
*/
|
|
|
public OrderGoodsListVo getOrderGoodsList(FastDeliveryGetShelfReq request){
|
|
|
|
|
|
if (request.getUid() < 0){
|
|
|
logger.warn("uid is empty");
|
|
|
throw new UfoServiceException(400, "参数[uid]不合法");
|
|
|
}
|
|
|
|
|
|
checkFastDeliveryAuth(request.getUid());
|
|
|
|
|
|
request.setPage(request.getPage()<=0?1:request.getPage());
|
|
|
request.setLimit(request.getLimit()<=0?10:request.getLimit());
|
|
|
|
|
|
int attr = OrderAttributes.FAST_DELIVERY.getCode();
|
|
|
int total = sellerOrderGoodsMapper.selectCntByUidAndAttr(request.getUid(), attr);
|
|
|
|
|
|
if (total == 0){
|
|
|
return null;
|
|
|
}
|
|
|
|
|
|
int offset = (request.getPage() - 1) * request.getLimit();
|
|
|
List<SellerOrderGoods> sellerOrderGoods = sellerOrderGoodsMapper.selectByUidAndAttr(request.getUid(), attr, offset, request.getLimit());
|
|
|
|
|
|
List<OrderGoodsInfo> goodsInfoList = sellerOrderGoods.stream().map(this::covertTo).collect(Collectors.toList());
|
|
|
|
|
|
return OrderGoodsListVo.builder()
|
|
|
.page(request.getPage())
|
|
|
.pageSize(request.getLimit())
|
|
|
.pagetotal(total)
|
|
|
.goodsInfoList(goodsInfoList)
|
|
|
.build();
|
|
|
|
|
|
}
|
|
|
|
|
|
public OrderGoodsInfo covertTo(SellerOrderGoods sellerOrderGoods){
|
|
|
|
|
|
OrderGoodsInfo orderGoodsInfo = new OrderGoodsInfo();
|
|
|
BeanUtils.copyProperties(sellerOrderGoods, orderGoodsInfo);
|
|
|
orderGoodsInfo.setStatusDesc(SkupStatus.getSkupStatus(orderGoodsInfo.getStatus()).getDesc());
|
|
|
return orderGoodsInfo;
|
|
|
}
|
|
|
/**
|
|
|
* 查询上架商品的信息
|
|
|
* @param req
|
|
|
*/
|
...
|
...
|
|