...
|
...
|
@@ -2,8 +2,11 @@ package com.yohoufo.order.service.proxy; |
|
|
|
|
|
import com.yoho.message.sdk.service.ufo.IUFOSendService;
|
|
|
import com.yohobuy.ufo.model.enums.InboxBusinessTypeEnum;
|
|
|
import com.yohobuy.ufo.model.order.common.OrderStatus;
|
|
|
import com.yohobuy.ufo.model.order.constants.SkupType;
|
|
|
import com.yohoufo.dal.order.BuyerOrderStatusFlowMapper;
|
|
|
import com.yohoufo.dal.order.model.BuyerOrder;
|
|
|
import com.yohoufo.dal.order.model.BuyerOrderStatusFlow;
|
|
|
import com.yohoufo.dal.order.model.SellerOrderGoods;
|
|
|
import com.yohoufo.dal.product.ProductMapper;
|
|
|
import com.yohoufo.dal.product.model.Product;
|
...
|
...
|
@@ -14,6 +17,7 @@ import org.slf4j.Logger; |
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import java.util.Objects;
|
|
|
import java.util.Optional;
|
|
|
import java.util.function.Supplier;
|
|
|
|
...
|
...
|
@@ -27,6 +31,9 @@ public class SellerNoticeFacade extends BaseNoticeFacade { |
|
|
@Autowired
|
|
|
private ProductMapper productMapper;
|
|
|
|
|
|
@Autowired
|
|
|
private BuyerOrderStatusFlowMapper buyerOrderStatusFlowMapper;
|
|
|
|
|
|
@Override
|
|
|
public Logger getLogger() {
|
|
|
return log;
|
...
|
...
|
@@ -247,6 +254,33 @@ public class SellerNoticeFacade extends BaseNoticeFacade { |
|
|
}
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 鉴定中心 检测不通过
|
|
|
*
|
|
|
* @param sog
|
|
|
* @param orderCode 买家订单号
|
|
|
*/
|
|
|
public void detectNotPass(SellerOrderGoods sog, long orderCode) {
|
|
|
String logPrefix = "notice seller detect not pass";
|
|
|
Integer sellerUid = sog.getUid();
|
|
|
String prdName = sog.getProductName();
|
|
|
String sizeName = sog.getSizeName();
|
|
|
String goodsTypeTag = buildGoodsTypeTagForSeller(sog);
|
|
|
try {
|
|
|
BuyerOrderStatusFlow statusFlow = buyerOrderStatusFlowMapper.selectByStatus(orderCode, OrderStatus.PLATFORM_DETECTION_NOT_PASS.getCode());
|
|
|
String remark = BuyerOrderStatusFlow.formatRemarkWithPrefixAndSuffix(statusFlow);
|
|
|
Product product = productMapper.selectByPrimaryKey(sog.getProductId());
|
|
|
String productCode = product.getProductCode();
|
|
|
newNotice(sellerUid)
|
|
|
.withLogPrefix(logPrefix)
|
|
|
.withInBox(InboxBusinessTypeEnum.NOTICE_SELLER_WHEN_DETECTION_NOT_PASS, goodsTypeTag, prdName, sizeName, productCode, remark)
|
|
|
.withSms(InboxBusinessTypeEnum.SMS_NOTICE_SELLER_WHEN_DETECTION_NOT_PASS, goodsTypeTag, prdName, sizeName, productCode, remark, orderCode)
|
|
|
.send();
|
|
|
} catch (Exception e) {
|
|
|
log.warn("{} fail, sellerUid {}, prdName {} ", logPrefix, sellerUid, prdName, e);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
public void sellerDeliverWithTimes(SellerOrderGoods sog, long orderCode, int times, int leftTime, String timeUnit) {
|
|
|
String logPrefix = "notice seller seller deliver";
|
|
|
Integer sellerUid = sog.getUid();
|
...
|
...
|
|