1
|
package com.yohoufo.order.service.proxy;
|
1
|
package com.yohoufo.order.service.proxy;
|
2
|
|
2
|
|
3
|
-import com.alibaba.fastjson.JSON;
|
|
|
4
|
import com.yoho.message.sdk.common.constants.UFOMessageScene;
|
3
|
import com.yoho.message.sdk.common.constants.UFOMessageScene;
|
5
|
import com.yoho.message.sdk.service.ufo.IUFOSendService;
|
4
|
import com.yoho.message.sdk.service.ufo.IUFOSendService;
|
6
|
import com.yoho.message.sdk.service.ufo.UFOMessageService;
|
5
|
import com.yoho.message.sdk.service.ufo.UFOMessageService;
|
|
@@ -11,19 +10,14 @@ import com.yohoufo.dal.order.model.BuyerOrder; |
|
@@ -11,19 +10,14 @@ import com.yohoufo.dal.order.model.BuyerOrder; |
11
|
import com.yohoufo.dal.order.model.SellerOrderGoods;
|
10
|
import com.yohoufo.dal.order.model.SellerOrderGoods;
|
12
|
import com.yohoufo.dal.product.ProductMapper;
|
11
|
import com.yohoufo.dal.product.ProductMapper;
|
13
|
import com.yohoufo.dal.product.model.Product;
|
12
|
import com.yohoufo.dal.product.model.Product;
|
14
|
-import com.yohoufo.inboxclient.model.InBoxResponse;
|
|
|
15
|
-import com.yohoufo.inboxclient.model.InboxReqVO;
|
|
|
16
|
import com.yohoufo.order.service.impl.function.BuyerNoticeSender;
|
13
|
import com.yohoufo.order.service.impl.function.BuyerNoticeSender;
|
17
|
import lombok.NonNull;
|
14
|
import lombok.NonNull;
|
18
|
import lombok.extern.slf4j.Slf4j;
|
15
|
import lombok.extern.slf4j.Slf4j;
|
19
|
-import org.apache.commons.lang3.StringUtils;
|
|
|
20
|
import org.slf4j.Logger;
|
16
|
import org.slf4j.Logger;
|
21
|
import org.springframework.beans.factory.annotation.Autowired;
|
17
|
import org.springframework.beans.factory.annotation.Autowired;
|
22
|
import org.springframework.stereotype.Service;
|
18
|
import org.springframework.stereotype.Service;
|
23
|
|
19
|
|
24
|
-import java.util.Arrays;
|
|
|
25
|
import java.util.LinkedHashMap;
|
20
|
import java.util.LinkedHashMap;
|
26
|
-import java.util.List;
|
|
|
27
|
import java.util.Optional;
|
21
|
import java.util.Optional;
|
28
|
import java.util.function.Function;
|
22
|
import java.util.function.Function;
|
29
|
import java.util.function.Supplier;
|
23
|
import java.util.function.Supplier;
|
|
@@ -591,7 +585,24 @@ public class BuyerNoticeFacade extends BaseNoticeFacade { |
|
@@ -591,7 +585,24 @@ public class BuyerNoticeFacade extends BaseNoticeFacade { |
591
|
.withSms(InboxBusinessTypeEnum.SMS_NOTICE_BUYER_WHEN_SELLER_DELIVER, goodsTypeTag, prdName, sizeName, productCode, orderCode)
|
585
|
.withSms(InboxBusinessTypeEnum.SMS_NOTICE_BUYER_WHEN_SELLER_DELIVER, goodsTypeTag, prdName, sizeName, productCode, orderCode)
|
592
|
.send();
|
586
|
.send();
|
593
|
} catch (Exception e) {
|
587
|
} catch (Exception e) {
|
594
|
- log.warn("buyer paid fast delivery fail, uid {}, orderCode {} ",uid, orderCode, e);
|
588
|
+ log.warn("buyer paid fast delivery fail, uid {}, orderCode {} ", uid, orderCode, e);
|
|
|
589
|
+ }
|
|
|
590
|
+ }
|
|
|
591
|
+
|
|
|
592
|
+
|
|
|
593
|
+ public void noticeBuyerOfSellerSendOutTimeout(BuyerNoticeSender.Request request) {
|
|
|
594
|
+ Integer uid = request.getUid();
|
|
|
595
|
+ Long orderCode = request.getOrderCode();
|
|
|
596
|
+ try {
|
|
|
597
|
+ BuyerOrder buyerOrder = buyerOrderMapper.selectByOrderCode(orderCode);
|
|
|
598
|
+ newBuyerNotice(buyerOrder)
|
|
|
599
|
+ .withLogPrefix("notice buyer of seller send out timeout")
|
|
|
600
|
+ .withInBox(InboxBusinessTypeEnum.NOTICE_BUYER_SELLER_SEND_OUT_TIMEOUT, orderCode)
|
|
|
601
|
+ .withPush(() -> ufoSendService.sellerDeliverHours(String.valueOf(uid), String.valueOf(orderCode)))
|
|
|
602
|
+ .withSms(InboxBusinessTypeEnum.SMS_NOTICE_BUYER_SELLER_SEND_OUT_TIMEOUT, orderCode)
|
|
|
603
|
+ .send();
|
|
|
604
|
+ } catch (Exception e) {
|
|
|
605
|
+ log.warn("notice buyer of seller send out timeout fail,uid {}", uid, e);
|
595
|
}
|
606
|
}
|
596
|
}
|
607
|
}
|
597
|
|
608
|
|