|
@@ -102,6 +102,9 @@ public class BuyerOrderPaymentService extends AbstractOrderPaymentService { |
|
@@ -102,6 +102,9 @@ public class BuyerOrderPaymentService extends AbstractOrderPaymentService { |
102
|
@Autowired
|
102
|
@Autowired
|
103
|
private IExpressInfoService expressInfoService;
|
103
|
private IExpressInfoService expressInfoService;
|
104
|
|
104
|
|
|
|
105
|
+ @Autowired
|
|
|
106
|
+ private DepositService depositService;
|
|
|
107
|
+
|
105
|
private boolean isDepositWithQuickDeliverGoods(int uid, long orderCode, Integer oa){
|
108
|
private boolean isDepositWithQuickDeliverGoods(int uid, long orderCode, Integer oa){
|
106
|
BuyerOrderGoods pbog = buyerOrderGoodsMapper.selectOnlyByOrderCode(orderCode);
|
109
|
BuyerOrderGoods pbog = buyerOrderGoodsMapper.selectOnlyByOrderCode(orderCode);
|
107
|
SellerOrderGoods psog = sellerOrderGoodsMapper.selectByPrimaryKey(pbog.getSkup());
|
110
|
SellerOrderGoods psog = sellerOrderGoodsMapper.selectByPrimaryKey(pbog.getSkup());
|
|
@@ -125,7 +128,8 @@ public class BuyerOrderPaymentService extends AbstractOrderPaymentService { |
|
@@ -125,7 +128,8 @@ public class BuyerOrderPaymentService extends AbstractOrderPaymentService { |
125
|
OrderStatus targetOrderStatus = OrderStatus.HAS_PAYED;
|
128
|
OrderStatus targetOrderStatus = OrderStatus.HAS_PAYED;
|
126
|
boolean isQuickDeliver = false;
|
129
|
boolean isQuickDeliver = false;
|
127
|
boolean isDepositWithQuickDeliverGoods = false;
|
130
|
boolean isDepositWithQuickDeliverGoods = false;
|
128
|
- boolean isDerectPass = false;
|
131
|
+ //是否直接鉴定通过
|
|
|
132
|
+ boolean isDirectPass = false;
|
129
|
|
133
|
|
130
|
//门店订单支付后直接完成
|
134
|
//门店订单支付后直接完成
|
131
|
if (BuyerOrderUtils.isOffline(orderInfo)) {
|
135
|
if (BuyerOrderUtils.isOffline(orderInfo)) {
|
|
@@ -134,11 +138,12 @@ public class BuyerOrderPaymentService extends AbstractOrderPaymentService { |
|
@@ -134,11 +138,12 @@ public class BuyerOrderPaymentService extends AbstractOrderPaymentService { |
134
|
// 闪购发货
|
138
|
// 闪购发货
|
135
|
else if (isQuickDeliver = BuyerOrderUtils.isQuickDeliver(orderInfo.getAttributes())) {
|
139
|
else if (isQuickDeliver = BuyerOrderUtils.isQuickDeliver(orderInfo.getAttributes())) {
|
136
|
targetOrderStatus = OrderStatus.JUDGE_PASS;
|
140
|
targetOrderStatus = OrderStatus.JUDGE_PASS;
|
|
|
141
|
+ isDirectPass = true;
|
137
|
}
|
142
|
}
|
138
|
// 闪购寄存
|
143
|
// 闪购寄存
|
139
|
else if ((isDepositWithQuickDeliverGoods = isDepositWithQuickDeliverGoods(uid, orderCode, orderInfo.getAttributes()))) {
|
144
|
else if ((isDepositWithQuickDeliverGoods = isDepositWithQuickDeliverGoods(uid, orderCode, orderInfo.getAttributes()))) {
|
140
|
targetOrderStatus = OrderStatus.DONE;
|
145
|
targetOrderStatus = OrderStatus.DONE;
|
141
|
- isDerectPass = true;
|
146
|
+ isDirectPass = true;
|
142
|
}
|
147
|
}
|
143
|
logger.info("after paid updateOrderStatusPaid uid {} orderCode {} isQuickDeliver {} isDepositWithQuickDeliverGoods {} ",
|
148
|
logger.info("after paid updateOrderStatusPaid uid {} orderCode {} isQuickDeliver {} isDepositWithQuickDeliverGoods {} ",
|
144
|
uid, orderCode, isQuickDeliver, isDepositWithQuickDeliverGoods);
|
149
|
uid, orderCode, isQuickDeliver, isDepositWithQuickDeliverGoods);
|
|
@@ -156,7 +161,8 @@ public class BuyerOrderPaymentService extends AbstractOrderPaymentService { |
|
@@ -156,7 +161,8 @@ public class BuyerOrderPaymentService extends AbstractOrderPaymentService { |
156
|
logger.info("in updateOrderStatusPaid record status change, orderCode {}, status: {}",
|
161
|
logger.info("in updateOrderStatusPaid record status change, orderCode {}, status: {}",
|
157
|
orderCode, orderStatusCode);
|
162
|
orderCode, orderStatusCode);
|
158
|
orderStatusFlowService.addAsy(orderCode, orderStatusCode);
|
163
|
orderStatusFlowService.addAsy(orderCode, orderStatusCode);
|
159
|
- if (isDerectPass){
|
164
|
+ //打货款, 物权转移
|
|
|
165
|
+ if (isDirectPass){
|
160
|
boolean isDepositRequired = isDepositWithQuickDeliverGoods;
|
166
|
boolean isDepositRequired = isDepositWithQuickDeliverGoods;
|
161
|
appraiseService.processQuickDeliverOrderAfterPaid(orderCode, uid, isDepositRequired);
|
167
|
appraiseService.processQuickDeliverOrderAfterPaid(orderCode, uid, isDepositRequired);
|
162
|
}
|
168
|
}
|
|
@@ -253,12 +259,13 @@ public class BuyerOrderPaymentService extends AbstractOrderPaymentService { |
|
@@ -253,12 +259,13 @@ public class BuyerOrderPaymentService extends AbstractOrderPaymentService { |
253
|
* @param sellerOrderGoods
|
259
|
* @param sellerOrderGoods
|
254
|
*/
|
260
|
*/
|
255
|
private void processQuickDeliverOrder(BuyerOrder buyerOrder, SellerOrderGoods sellerOrderGoods){
|
261
|
private void processQuickDeliverOrder(BuyerOrder buyerOrder, SellerOrderGoods sellerOrderGoods){
|
256
|
- // notice
|
|
|
257
|
- inBoxFacade.noticeWhenQuickDeliverOrderPaid(buyerOrder.getUid(), buyerOrder.getOrderCode(), sellerOrderGoods);
|
|
|
258
|
Integer sellerUid = buyerOrder.getSellerUid();
|
262
|
Integer sellerUid = buyerOrder.getSellerUid();
|
259
|
Integer buyerUid = buyerOrder.getUid();
|
263
|
Integer buyerUid = buyerOrder.getUid();
|
260
|
Long orderCode = buyerOrder.getOrderCode();
|
264
|
Long orderCode = buyerOrder.getOrderCode();
|
261
|
Integer skup = sellerOrderGoods.getId();
|
265
|
Integer skup = sellerOrderGoods.getId();
|
|
|
266
|
+ // notice
|
|
|
267
|
+ inBoxFacade.noticeWhenQuickDeliverOrderPaid(buyerOrder.getUid(), buyerOrder.getOrderCode(), sellerOrderGoods);
|
|
|
268
|
+
|
262
|
try {
|
269
|
try {
|
263
|
// 插入物流调拨信息
|
270
|
// 插入物流调拨信息
|
264
|
expressInfoService.saveOperateTransferExpressInfo(OperateTransferExpressInfo.builder()
|
271
|
expressInfoService.saveOperateTransferExpressInfo(OperateTransferExpressInfo.builder()
|