Showing
4 changed files
with
12 additions
and
6 deletions
@@ -52,6 +52,7 @@ public class SellerWalletDetail { | @@ -52,6 +52,7 @@ public class SellerWalletDetail { | ||
52 | BUYER_CANCEL_NO_DELIVERY("买家取消(无物流)", 41), | 52 | BUYER_CANCEL_NO_DELIVERY("买家取消(无物流)", 41), |
53 | BUYER_CANCEL_DELIVERY("买家取消(有物流)", 42), | 53 | BUYER_CANCEL_DELIVERY("买家取消(有物流)", 42), |
54 | APPRAISE_OK("鉴定通过", 51), | 54 | APPRAISE_OK("鉴定通过", 51), |
55 | + APPRAISE_UNSURE("商品无法鉴定", 52), | ||
55 | MERCHANT_EXIT("商家退出入驻", 61); | 56 | MERCHANT_EXIT("商家退出入驻", 61); |
56 | 57 | ||
57 | private String name; | 58 | private String name; |
@@ -873,6 +873,7 @@ public class MerchantOrderPaymentService extends AbstractOrderPaymentService { | @@ -873,6 +873,7 @@ public class MerchantOrderPaymentService extends AbstractOrderPaymentService { | ||
873 | } else if (type == SellerWalletDetail.Type.SELLER_OFF | 873 | } else if (type == SellerWalletDetail.Type.SELLER_OFF |
874 | || type == SellerWalletDetail.Type.SYSTEM_OFF | 874 | || type == SellerWalletDetail.Type.SYSTEM_OFF |
875 | || type == SellerWalletDetail.Type.APPRAISE_OK | 875 | || type == SellerWalletDetail.Type.APPRAISE_OK |
876 | + || type == SellerWalletDetail.Type.APPRAISE_UNSURE | ||
876 | || type == SellerWalletDetail.Type.BUYER_CANCEL_DELIVERY | 877 | || type == SellerWalletDetail.Type.BUYER_CANCEL_DELIVERY |
877 | || type == SellerWalletDetail.Type.BUYER_CANCEL_NO_DELIVERY) { | 878 | || type == SellerWalletDetail.Type.BUYER_CANCEL_NO_DELIVERY) { |
878 | // 增加保证金 | 879 | // 增加保证金 |
@@ -3,7 +3,6 @@ package com.yohoufo.order.service.impl; | @@ -3,7 +3,6 @@ package com.yohoufo.order.service.impl; | ||
3 | import com.alibaba.fastjson.JSON; | 3 | import com.alibaba.fastjson.JSON; |
4 | import com.alibaba.fastjson.JSONObject; | 4 | import com.alibaba.fastjson.JSONObject; |
5 | import com.google.common.collect.Lists; | 5 | import com.google.common.collect.Lists; |
6 | -import com.google.common.collect.Range; | ||
7 | import com.yoho.core.rabbitmq.YhProducer; | 6 | import com.yoho.core.rabbitmq.YhProducer; |
8 | import com.yoho.error.ServiceError; | 7 | import com.yoho.error.ServiceError; |
9 | import com.yoho.error.exception.ServiceException; | 8 | import com.yoho.error.exception.ServiceException; |
@@ -52,12 +51,9 @@ import org.springframework.stereotype.Service; | @@ -52,12 +51,9 @@ import org.springframework.stereotype.Service; | ||
52 | 51 | ||
53 | import javax.annotation.Resource; | 52 | import javax.annotation.Resource; |
54 | import java.math.BigDecimal; | 53 | import java.math.BigDecimal; |
55 | -import java.time.LocalDateTime; | ||
56 | -import java.time.LocalTime; | ||
57 | import java.util.Arrays; | 54 | import java.util.Arrays; |
58 | import java.util.Objects; | 55 | import java.util.Objects; |
59 | import java.util.Optional; | 56 | import java.util.Optional; |
60 | -import java.util.UUID; | ||
61 | import java.util.concurrent.ArrayBlockingQueue; | 57 | import java.util.concurrent.ArrayBlockingQueue; |
62 | import java.util.concurrent.ExecutorService; | 58 | import java.util.concurrent.ExecutorService; |
63 | import java.util.concurrent.ThreadPoolExecutor; | 59 | import java.util.concurrent.ThreadPoolExecutor; |
@@ -1427,9 +1423,14 @@ public class AppraiseService { | @@ -1427,9 +1423,14 @@ public class AppraiseService { | ||
1427 | // 有货平台鉴定中 -> 已取消:商品无法鉴定 | 1423 | // 有货平台鉴定中 -> 已取消:商品无法鉴定 |
1428 | .withStateTransition(OrderStatus.PLATFORM_CHECKING, OrderStatus.PLATFORM_APPRAISE_UNSURE, orderStatusFlowService) | 1424 | .withStateTransition(OrderStatus.PLATFORM_CHECKING, OrderStatus.PLATFORM_APPRAISE_UNSURE, orderStatusFlowService) |
1429 | // 退保证金给卖家 | 1425 | // 退保证金给卖家 |
1430 | - .withRefundEarnestMoney(payRefundService::refund, sellerOrderMapper::selectBySkup).refundCase(RefundCase.SELLER_EARNEST_MONEY).and() | 1426 | + .withRefundEarnestMoney(payRefundService::refund, sellerOrderMapper::selectBySkup) |
1427 | + .refundCase(RefundCase.SELLER_EARNEST_MONEY) | ||
1428 | + .sellerWalletDetailType(SellerWalletDetail.Type.APPRAISE_UNSURE) | ||
1429 | + .and() | ||
1431 | // 退买家货款 | 1430 | // 退买家货款 |
1432 | - .withRefundGoodsMoney(payRefundService::refund).refundCase(RefundCase.BUYER_GOODS_MONEY).and() | 1431 | + .withRefundGoodsMoney(payRefundService::refund) |
1432 | + .refundCase(RefundCase.BUYER_GOODS_MONEY) | ||
1433 | + .and() | ||
1433 | // 通知卖家商品无法鉴定 | 1434 | // 通知卖家商品无法鉴定 |
1434 | .withNoticeSeller((soa, code) -> inBoxFacade.noticeSellerAppraiseUnsure(soa, code)).and() | 1435 | .withNoticeSeller((soa, code) -> inBoxFacade.noticeSellerAppraiseUnsure(soa, code)).and() |
1435 | // 通知买家商品无法鉴定(并发券) | 1436 | // 通知买家商品无法鉴定(并发券) |
@@ -6,6 +6,7 @@ import com.google.common.base.Verify; | @@ -6,6 +6,7 @@ import com.google.common.base.Verify; | ||
6 | import com.yoho.core.redis.cluster.operations.serializer.RedisKeyBuilder; | 6 | import com.yoho.core.redis.cluster.operations.serializer.RedisKeyBuilder; |
7 | import com.yoho.error.ServiceError; | 7 | import com.yoho.error.ServiceError; |
8 | import com.yoho.error.exception.ServiceException; | 8 | import com.yoho.error.exception.ServiceException; |
9 | +import com.yohobuy.ufo.model.order.bo.MerchantOrderAttachInfo; | ||
9 | import com.yohobuy.ufo.model.order.common.OrderStatus; | 10 | import com.yohobuy.ufo.model.order.common.OrderStatus; |
10 | import com.yohobuy.ufo.model.order.common.TabType; | 11 | import com.yohobuy.ufo.model.order.common.TabType; |
11 | import com.yohoufo.common.alarm.EventBusPublisher; | 12 | import com.yohoufo.common.alarm.EventBusPublisher; |
@@ -308,6 +309,7 @@ class BuyerOrderCancelHandler { | @@ -308,6 +309,7 @@ class BuyerOrderCancelHandler { | ||
308 | .refundCase(refundEarnestMoney.refundCase()) | 309 | .refundCase(refundEarnestMoney.refundCase()) |
309 | .orderCode(sellerOrder.getOrderCode()) | 310 | .orderCode(sellerOrder.getOrderCode()) |
310 | .refundAmount(earnestMoney.doubleValue()) | 311 | .refundAmount(earnestMoney.doubleValue()) |
312 | + .refundattch(MerchantOrderAttachInfo.builder().type(refundEarnestMoney.sellerWalletDetailType.getValue()).build()) | ||
311 | .build(); | 313 | .build(); |
312 | val billLogEventBuilder = BillLogEvent.builder() | 314 | val billLogEventBuilder = BillLogEvent.builder() |
313 | .buyerUid(uid) | 315 | .buyerUid(uid) |
@@ -407,6 +409,7 @@ class BuyerOrderCancelHandler { | @@ -407,6 +409,7 @@ class BuyerOrderCancelHandler { | ||
407 | private final BiConsumer<PaymentRequest, BillLogEvent.BillLogEventBuilder> refundConsumer; | 409 | private final BiConsumer<PaymentRequest, BillLogEvent.BillLogEventBuilder> refundConsumer; |
408 | private final Function<Integer, SellerOrder> sellerOrderFunction; | 410 | private final Function<Integer, SellerOrder> sellerOrderFunction; |
409 | private RefundCase refundCase; | 411 | private RefundCase refundCase; |
412 | + private SellerWalletDetail.Type sellerWalletDetailType; | ||
410 | 413 | ||
411 | BuyerOrderCancelHandler and() { | 414 | BuyerOrderCancelHandler and() { |
412 | BuyerOrderCancelHandler.this.refundEarnestMoney = this; | 415 | BuyerOrderCancelHandler.this.refundEarnestMoney = this; |
-
Please register or login to post a comment