Authored by chenchao

fix skup type transfer missed

... ... @@ -122,6 +122,9 @@ public class SellerOrderPrepareProcessor {
//
context.setBackAddress(noHiddenBackAddress);
context.setBackHiddenAddress(hiddenBackAddress);
//
SkupType skupType = SkupType.getSkupType(req.getSkupType());
context.setSkupType(skupType);
//step 1: rpc get product detail by storage id
//ufo.product.storage.data
GoodsInfo goodsInfo = getProductDetail(context);
... ... @@ -138,9 +141,7 @@ public class SellerOrderPrepareProcessor {
}catch (UfoServiceException ex){
context.setPriceOverFlowTips( ex.getErrorMessage());
}
//
SkupType skupType = SkupType.getSkupType(req.getSkupType());
context.setSkupType(skupType);
// compute every fee from price
OrderComputeHandler computeHandler = orderComputeProvider.findBySkupType(skupType);
SellerOrderComputeResult computeResult = computeHandler.compute(goodsInfo.getPrice());
... ... @@ -261,28 +262,13 @@ public class SellerOrderPrepareProcessor {
throw new UfoServiceException(400, "storageId 错误");
}
/*
int addressId = AddressUtil.getDecryptStr(req.getAddressId());
if (addressId < 0){
log.warn("seller submit order addressId invalidate, uid {}, storageId {}, addressId is {}",
uid, storageId, req.getAddressId());
throw new ServiceException(ServiceError.ORDER_ADDRESSID_INVALIDATE);
}
//the address of send back 2 seller
//
AddressInfo hiddenBackAddress = userProxyService.getHiddenAddressInfo(uid, addressId);
AddressInfo noHiddenBackAddress = userProxyService.getAddressInfoNotHidden(uid, addressId);
if(AddressHelper.isNeedUpdate(noHiddenBackAddress)){
log.warn("seller submit addressId need update, uid is {}, storageId is {}, addressId is {}",
uid, storageId, addressId);
throw new ServiceException(ServiceError.ORDER_ADDRESS_NEED_UPDATE);
}*/
//
SellerOrderContext context = new SellerOrderContext();
context.setUid(uid);
context.setStorageId(storageId);
context.setSalePrice(salePrice);
SkupType skupType = SkupType.IN_STOCK;
context.setSkupType(skupType);
//TODO set noHiddenBackAddress & hiddenBackAddress
//context.setBackAddress(noHiddenBackAddress);
//context.setBackHiddenAddress(hiddenBackAddress);
... ... @@ -305,7 +291,7 @@ public class SellerOrderPrepareProcessor {
goodsInfo.setStorageNum(storageNum);
// compute every fee from price
SkupType skupType = SkupType.IN_STOCK;
OrderComputeHandler computeHandler = orderComputeProvider.findBySkupType(skupType);
SellerOrderComputeResult computeResult = computeHandler.compute(goodsInfo.getPrice());
log.info("in buildImportPrdCxt , uid {}, storageId {}, price {}, computeResult {}", uid, storageId,
... ...