Authored by mali

寄存列表兼容

@@ -38,7 +38,7 @@ @@ -38,7 +38,7 @@
38 <sql id="Base_Column_List" > 38 <sql id="Base_Column_List" >
39 id, product_id, goods_id, storage_id, deposit_code, shelf_code, owner_uid, order_code, 39 id, product_id, goods_id, storage_id, deposit_code, shelf_code, owner_uid, order_code,
40 skup, status, order_status, update_time, create_time, deposit_start_time, deposit_end_time, 40 skup, status, order_status, update_time, create_time, deposit_start_time, deposit_end_time,
41 - edit_pid, del_status, out_type, new_order_code, new_skup, parent_order_code, source, deposit_type 41 + edit_pid, del_status, out_type, new_order_code, new_skup, parent_order_code, source, deposit_type, parent_order_code
42 </sql> 42 </sql>
43 <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" > 43 <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
44 select 44 select
@@ -123,7 +123,7 @@ public class DepositOrderService { @@ -123,7 +123,7 @@ public class DepositOrderService {
123 GoodsInfo goodsInfo = getGoodsInfo(storageDeposit); // 查询购买商品的详细信息 123 GoodsInfo goodsInfo = getGoodsInfo(storageDeposit); // 查询购买商品的详细信息
124 124
125 125
126 - AddressInfo addressInfo = getAddressInfo(req, orderCode); 126 + AddressInfo addressInfo = getAddressInfo(req, orderCode, storageDeposit.getParentOrderCode());
127 127
128 addressInfo.setAddress_id_str(AddressUtil.getEncryptStr(String.valueOf(addressInfo.getAddress_id())));// 加密addressId 128 addressInfo.setAddress_id_str(AddressUtil.getEncryptStr(String.valueOf(addressInfo.getAddress_id())));// 加密addressId
129 129
@@ -136,13 +136,31 @@ public class DepositOrderService { @@ -136,13 +136,31 @@ public class DepositOrderService {
136 .userAddress(addressInfo).priceInfo(priceInfo).goodsInfo(goodsInfo).build(); 136 .userAddress(addressInfo).priceInfo(priceInfo).goodsInfo(goodsInfo).build();
137 } 137 }
138 138
139 - private AddressInfo getAddressInfo(DepositOrderComputeReq req, Long orderCode) { 139 + private AddressInfo getAddressInfo(DepositOrderComputeReq req, Long orderCode, Long parentOrderCode) {
140 CodeMeta codeMeta = orderCodeGenerator.expId(orderCode); 140 CodeMeta codeMeta = orderCodeGenerator.expId(orderCode);
141 AddressInfo addressInfo = null; 141 AddressInfo addressInfo = null;
142 if (OrderCodeType.BUYER_TYPE.getType() == codeMeta.getType()) { 142 if (OrderCodeType.BUYER_TYPE.getType() == codeMeta.getType()) {
143 addressInfo = buyerOrderMetaService.getHiddenAddressInfo(req.getUid(), orderCode); // 获取用户的地址 143 addressInfo = buyerOrderMetaService.getHiddenAddressInfo(req.getUid(), orderCode); // 获取用户的地址
144 } else { 144 } else {
145 addressInfo = appraiseOrderMetaService.getHidderUserAddress(orderCode); 145 addressInfo = appraiseOrderMetaService.getHidderUserAddress(orderCode);
  146 +
  147 + if (null == addressInfo) {
  148 + addressInfo = appraiseOrderMetaService.getHidderUserAddress(parentOrderCode);
  149 + }
  150 + }
  151 + return addressInfo;
  152 + }
  153 +
  154 + private AddressInfo getRecallAddressInfo(DepositOrderComputeReq req, Long orderCode, Long parentOrderCode) {
  155 + CodeMeta codeMeta = orderCodeGenerator.expId(orderCode);
  156 + AddressInfo addressInfo = null;
  157 + if (OrderCodeType.BUYER_TYPE.getType() == codeMeta.getType()) {
  158 + addressInfo = buyerOrderMetaService.getRecallAddressInfo(req.getUid(), orderCode);
  159 + } else {
  160 + addressInfo = appraiseOrderMetaService.getHidderUserAddress(orderCode);
  161 + if (null == addressInfo) {
  162 + addressInfo = appraiseOrderMetaService.getHidderUserAddress(parentOrderCode);
  163 + }
146 } 164 }
147 return addressInfo; 165 return addressInfo;
148 } 166 }
@@ -232,7 +250,7 @@ public class DepositOrderService { @@ -232,7 +250,7 @@ public class DepositOrderService {
232 250
233 ExpressInfoDetail lastExpressInfoDetail = queryExpressInfoDetail(depositDetailBo); // 查询最新的物流动态 251 ExpressInfoDetail lastExpressInfoDetail = queryExpressInfoDetail(depositDetailBo); // 查询最新的物流动态
234 252
235 - AddressInfo addressInfo = buyerOrderMetaService.getRecallAddressInfo(req.getUid(), storageDeposit.getOrderCode()); 253 + AddressInfo addressInfo = getRecallAddressInfo(req, storageDeposit.getOrderCode(), storageDeposit.getParentOrderCode());
236 254
237 GoodsInfo goodsInfo = getGoodsInfo(storageDeposit); // 查询购买商品的详细信息 255 GoodsInfo goodsInfo = getGoodsInfo(storageDeposit); // 查询购买商品的详细信息
238 256