Authored by mali

寄存列表兼容

... ... @@ -38,7 +38,7 @@
<sql id="Base_Column_List" >
id, product_id, goods_id, storage_id, deposit_code, shelf_code, owner_uid, order_code,
skup, status, order_status, update_time, create_time, deposit_start_time, deposit_end_time,
edit_pid, del_status, out_type, new_order_code, new_skup, parent_order_code, source, deposit_type
edit_pid, del_status, out_type, new_order_code, new_skup, parent_order_code, source, deposit_type, parent_order_code
</sql>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
select
... ...
... ... @@ -123,7 +123,7 @@ public class DepositOrderService {
GoodsInfo goodsInfo = getGoodsInfo(storageDeposit); // 查询购买商品的详细信息
AddressInfo addressInfo = getAddressInfo(req, orderCode);
AddressInfo addressInfo = getAddressInfo(req, orderCode, storageDeposit.getParentOrderCode());
addressInfo.setAddress_id_str(AddressUtil.getEncryptStr(String.valueOf(addressInfo.getAddress_id())));// 加密addressId
... ... @@ -136,13 +136,31 @@ public class DepositOrderService {
.userAddress(addressInfo).priceInfo(priceInfo).goodsInfo(goodsInfo).build();
}
private AddressInfo getAddressInfo(DepositOrderComputeReq req, Long orderCode) {
private AddressInfo getAddressInfo(DepositOrderComputeReq req, Long orderCode, Long parentOrderCode) {
CodeMeta codeMeta = orderCodeGenerator.expId(orderCode);
AddressInfo addressInfo = null;
if (OrderCodeType.BUYER_TYPE.getType() == codeMeta.getType()) {
addressInfo = buyerOrderMetaService.getHiddenAddressInfo(req.getUid(), orderCode); // 获取用户的地址
} else {
addressInfo = appraiseOrderMetaService.getHidderUserAddress(orderCode);
if (null == addressInfo) {
addressInfo = appraiseOrderMetaService.getHidderUserAddress(parentOrderCode);
}
}
return addressInfo;
}
private AddressInfo getRecallAddressInfo(DepositOrderComputeReq req, Long orderCode, Long parentOrderCode) {
CodeMeta codeMeta = orderCodeGenerator.expId(orderCode);
AddressInfo addressInfo = null;
if (OrderCodeType.BUYER_TYPE.getType() == codeMeta.getType()) {
addressInfo = buyerOrderMetaService.getRecallAddressInfo(req.getUid(), orderCode);
} else {
addressInfo = appraiseOrderMetaService.getHidderUserAddress(orderCode);
if (null == addressInfo) {
addressInfo = appraiseOrderMetaService.getHidderUserAddress(parentOrderCode);
}
}
return addressInfo;
}
... ... @@ -232,7 +250,7 @@ public class DepositOrderService {
ExpressInfoDetail lastExpressInfoDetail = queryExpressInfoDetail(depositDetailBo); // 查询最新的物流动态
AddressInfo addressInfo = buyerOrderMetaService.getRecallAddressInfo(req.getUid(), storageDeposit.getOrderCode());
AddressInfo addressInfo = getRecallAddressInfo(req, storageDeposit.getOrderCode(), storageDeposit.getParentOrderCode());
GoodsInfo goodsInfo = getGoodsInfo(storageDeposit); // 查询购买商品的详细信息
... ...