Authored by mali

Merge branch 'test6.9.13' of http://git.yoho.cn/ufo/yohoufo-fore into test6.9.13

... ... @@ -366,4 +366,12 @@ public class BuyerOrderController {
LOG.info("method ufo.buyer.cancelCompute out, orderCode is {}, uid is {}", orderCode, uid);
return new ApiResponse.ApiResponseBuilder().data(occr).code(200).message("成功").build();
}
@RequestMapping(params = "method=ufo.buyerOrder.goodsDetail")
public ApiResponse orderGoodsDetail(@RequestParam("orderCode") long orderCode,
@RequestParam("uid") int uid){
LOG.info("in ufo.buyerOrder.goodsDetail uid {} orderCode {}", uid, orderCode);
GoodsInfo goodsInfo = buyerOrderViewService.getGoodsInfoOfOrder(uid, orderCode);
return new ApiResponse.ApiResponseBuilder().data(goodsInfo).code(200).message("成功").build();
}
}
... ...
... ... @@ -2,13 +2,17 @@ package com.yohoufo.order.service.impl;
import com.yoho.error.ServiceError;
import com.yoho.error.exception.ServiceException;
import com.yohobuy.ufo.model.order.bo.GoodsInfo;
import com.yohobuy.ufo.model.order.common.OrderStatus;
import com.yohobuy.ufo.model.order.common.TabType;
import com.yohobuy.ufo.model.order.resp.OrderCancelComputeResult;
import com.yohobuy.ufo.model.order.resp.OrderListInfo;
import com.yohobuy.ufo.model.order.resp.PageResp;
import com.yohobuy.ufo.model.order.vo.OrderListVo;
import com.yohoufo.dal.order.BuyerOrderGoodsMapper;
import com.yohoufo.dal.order.model.BuyerOrder;
import com.yohoufo.dal.order.model.SellerOrderGoods;
import com.yohoufo.order.convert.GoodsInfoConvertor;
import com.yohoufo.order.model.dto.BuyerPenaltyCalResult;
import com.yohoufo.order.model.request.OrderListRequest;
import com.yohoufo.order.model.request.OrderRequest;
... ... @@ -50,6 +54,9 @@ public class BuyerOrderViewService implements IOrderListService, IOrderDetailSer
@Autowired
BuyerOrderGoodsMapper buyerOrderGoodsMapper;
@Autowired
private BuyerOrderAssistant buyerOrderAssistant;
@Override
public PageResp getOrderListForErpGW(OrderListRequest request) {
... ... @@ -148,4 +155,17 @@ public class BuyerOrderViewService implements IOrderListService, IOrderDetailSer
.build();
return occr;
}
public GoodsInfo getGoodsInfoOfOrder(int uid, long orderCode){
logger.info("getGoodsInfoOfOrder uid {} orderCode {}", uid, orderCode);
final TabType tabType = TabType.BUY;
GoodsInfo goodsInfo = null;
BuyerOrderAssistant.PreparedData preparedData = buyerOrderAssistant.prepare(orderCode);
SellerOrderGoods psog;
if ((psog= preparedData.getSellerOrderGoods()) != null){
goodsInfo = GoodsInfoConvertor.sellerOrderGoods2GoodsInfo(psog, tabType);
}
return goodsInfo;
}
}
... ...