|
@@ -7,20 +7,25 @@ import com.yohobuy.ufo.model.order.bo.OrderInfo; |
|
@@ -7,20 +7,25 @@ import com.yohobuy.ufo.model.order.bo.OrderInfo; |
7
|
import com.yohobuy.ufo.model.order.common.OrderCodeType;
|
7
|
import com.yohobuy.ufo.model.order.common.OrderCodeType;
|
8
|
import com.yohobuy.ufo.model.order.common.OrderStatus;
|
8
|
import com.yohobuy.ufo.model.order.common.OrderStatus;
|
9
|
import com.yohobuy.ufo.model.order.constants.StorageDepositStatusEnum;
|
9
|
import com.yohobuy.ufo.model.order.constants.StorageDepositStatusEnum;
|
|
|
10
|
+import com.yohoufo.dal.order.SellerOrderGoodsMapper;
|
10
|
import com.yohoufo.dal.order.model.DepositOrder;
|
11
|
import com.yohoufo.dal.order.model.DepositOrder;
|
11
|
import com.yohoufo.dal.order.model.EntrySellerRechargeOrder;
|
12
|
import com.yohoufo.dal.order.model.EntrySellerRechargeOrder;
|
|
|
13
|
+import com.yohoufo.dal.order.model.SellerOrderGoods;
|
12
|
import com.yohoufo.dal.order.model.StorageDeposit;
|
14
|
import com.yohoufo.dal.order.model.StorageDeposit;
|
13
|
import com.yohoufo.order.model.request.PaymentRequest;
|
15
|
import com.yohoufo.order.model.request.PaymentRequest;
|
14
|
import com.yohoufo.order.model.response.PrepayResponse;
|
16
|
import com.yohoufo.order.model.response.PrepayResponse;
|
15
|
import com.yohoufo.order.service.AbstractOrderPaymentService;
|
17
|
import com.yohoufo.order.service.AbstractOrderPaymentService;
|
16
|
import com.yohoufo.order.service.DepositService;
|
18
|
import com.yohoufo.order.service.DepositService;
|
17
|
import com.yohoufo.order.service.deposit.DepositOrderService;
|
19
|
import com.yohoufo.order.service.deposit.DepositOrderService;
|
|
|
20
|
+import com.yohoufo.order.service.proxy.InBoxFacade;
|
18
|
import org.slf4j.Logger;
|
21
|
import org.slf4j.Logger;
|
19
|
import org.slf4j.LoggerFactory;
|
22
|
import org.slf4j.LoggerFactory;
|
20
|
import org.springframework.beans.factory.annotation.Autowired;
|
23
|
import org.springframework.beans.factory.annotation.Autowired;
|
21
|
import org.springframework.stereotype.Service;
|
24
|
import org.springframework.stereotype.Service;
|
22
|
|
25
|
|
|
|
26
|
+import javax.swing.text.html.Option;
|
23
|
import java.util.Objects;
|
27
|
import java.util.Objects;
|
|
|
28
|
+import java.util.Optional;
|
24
|
|
29
|
|
25
|
@Service
|
30
|
@Service
|
26
|
public class DepositOrderPaymentService extends AbstractOrderPaymentService {
|
31
|
public class DepositOrderPaymentService extends AbstractOrderPaymentService {
|
|
@@ -32,6 +37,12 @@ public class DepositOrderPaymentService extends AbstractOrderPaymentService { |
|
@@ -32,6 +37,12 @@ public class DepositOrderPaymentService extends AbstractOrderPaymentService { |
32
|
@Autowired
|
37
|
@Autowired
|
33
|
private DepositService depositService;
|
38
|
private DepositService depositService;
|
34
|
|
39
|
|
|
|
40
|
+ @Autowired
|
|
|
41
|
+ protected InBoxFacade inBoxFacade;
|
|
|
42
|
+
|
|
|
43
|
+ @Autowired
|
|
|
44
|
+ private SellerOrderGoodsMapper sellerOrderGoodsMapper;
|
|
|
45
|
+
|
35
|
@Override
|
46
|
@Override
|
36
|
public boolean isTimeoutCancelStatus(OrderInfo orderInfo) {
|
47
|
public boolean isTimeoutCancelStatus(OrderInfo orderInfo) {
|
37
|
return false;
|
48
|
return false;
|
|
@@ -151,6 +162,13 @@ public class DepositOrderPaymentService extends AbstractOrderPaymentService { |
|
@@ -151,6 +162,13 @@ public class DepositOrderPaymentService extends AbstractOrderPaymentService { |
151
|
if (result != 1) {
|
162
|
if (result != 1) {
|
152
|
logger.error("depositService.changeStorageStatus find wrong, depositCode is {}, result is {}", depositOrder.getDepositCode(), result);
|
163
|
logger.error("depositService.changeStorageStatus find wrong, depositCode is {}, result is {}", depositOrder.getDepositCode(), result);
|
153
|
return;
|
164
|
return;
|
|
|
165
|
+ } else {
|
|
|
166
|
+ StorageDeposit deposit = depositService.selectStorageDeposit(depositOrder.getUid(), depositOrder.getDepositCode());
|
|
|
167
|
+
|
|
|
168
|
+ SellerOrderGoods psog = Optional.ofNullable(deposit).map(StorageDeposit::getSkup)
|
|
|
169
|
+ .map(sellerOrderGoodsMapper::selectByPrimaryKey).orElse(null);
|
|
|
170
|
+
|
|
|
171
|
+ inBoxFacade.recallDepositnotify(deposit.getOwnerUid(), psog); // 更新待拣货状态成功后,发通知
|
154
|
}
|
172
|
}
|
155
|
}
|
173
|
}
|
156
|
|
174
|
|