Merge branch 'test6.9.8' of http://git.yoho.cn/ufo/yohoufo-fore into test6.9.8
Showing
2 changed files
with
13 additions
and
7 deletions
@@ -45,6 +45,7 @@ import com.yohoufo.order.service.pay.AbstractPayService; | @@ -45,6 +45,7 @@ import com.yohoufo.order.service.pay.AbstractPayService; | ||
45 | import com.yohoufo.order.service.proxy.InBoxFacade; | 45 | import com.yohoufo.order.service.proxy.InBoxFacade; |
46 | import com.yohoufo.order.service.proxy.OrderStatusFlowService; | 46 | import com.yohoufo.order.service.proxy.OrderStatusFlowService; |
47 | import com.yohoufo.order.service.proxy.ProductProxyService; | 47 | import com.yohoufo.order.service.proxy.ProductProxyService; |
48 | +import com.yohoufo.order.utils.BuyerOrderUtils; | ||
48 | import com.yohoufo.order.utils.LoggerUtils; | 49 | import com.yohoufo.order.utils.LoggerUtils; |
49 | import org.apache.commons.collections.CollectionUtils; | 50 | import org.apache.commons.collections.CollectionUtils; |
50 | import org.apache.commons.lang3.StringUtils; | 51 | import org.apache.commons.lang3.StringUtils; |
@@ -121,15 +122,20 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { | @@ -121,15 +122,20 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { | ||
121 | * @param orderRequest | 122 | * @param orderRequest |
122 | */ | 123 | */ |
123 | public void confirm(OrderRequest orderRequest){ | 124 | public void confirm(OrderRequest orderRequest){ |
124 | - OrderStatus expectStatus = OrderStatus.WAITING_RECEIVE; | 125 | + |
125 | // 参数检查 ![待收货] 不合法 | 126 | // 参数检查 ![待收货] 不合法 |
126 | DataNode node = checkBase(orderRequest); | 127 | DataNode node = checkBase(orderRequest); |
128 | + BuyerOrder buyerOrder = node.buyerOrderInDB; | ||
129 | + // 待寄存或待收货 | ||
130 | + OrderStatus expectStatus = BuyerOrderUtils.isDeposit(buyerOrder) ? | ||
131 | + OrderStatus.JUDGE_PASS_WAIT_WAREHOUSE : OrderStatus.WAITING_RECEIVE; | ||
127 | checkStatus(node,orderRequest, expectStatus); | 132 | checkStatus(node,orderRequest, expectStatus); |
128 | - int uid; | ||
129 | - long orderCode; | ||
130 | - int sellerUid = node.buyerOrderInDB.getSellerUid(); | ||
131 | - // TODO 更新状态为已收货、SKUP的状态应该还是已出售 | ||
132 | - if (1 == buyerOrderMapper.updateStatusByOrderCode(orderCode=orderRequest.getOrderCode(), uid=orderRequest.getUid(), | 133 | + int uid = buyerOrder.getUid(); |
134 | + long orderCode = buyerOrder.getOrderCode(); | ||
135 | + int sellerUid = buyerOrder.getSellerUid(); | ||
136 | + | ||
137 | + // 更新状态为已收货、SKUP的状态应该还是已出售 | ||
138 | + if (1 == buyerOrderMapper.updateStatusByOrderCode(orderCode, uid, | ||
133 | expectStatus.getCode(), | 139 | expectStatus.getCode(), |
134 | OrderStatus.DONE.getCode(), | 140 | OrderStatus.DONE.getCode(), |
135 | DateUtil.getCurrentTimeSecond())) { | 141 | DateUtil.getCurrentTimeSecond())) { |
-
Please register or login to post a comment